TrueZIP Driver ZIP.RAES (TZP) 7.1

de.schlichtherle.truezip.key
Interface KeyManager<K>

Type Parameters:
K - The type of the keys.
All Known Implementing Classes:
PromptingKeyManager, SafeKeyManager

@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public interface KeyManager<K>

A container for key providers for protected resources which need to get created or opened by client applications.

Implementations must be safe for multi-threading.

Author:
Christian Schlichtherle

Method Summary
 KeyProvider<K> getKeyProvider(URI resource)
          Returns the key provider for the given protected resource.
 KeyProvider<K> moveKeyProvider(URI oldResource, URI newResource)
          Moves the key provider from the URI oldResource to newResource.
 KeyProvider<K> removeKeyProvider(URI resource)
          Removes the key provider for the given protected resource.
 

Method Detail

getKeyProvider

KeyProvider<K> getKeyProvider(URI resource)
Returns the key provider for the given protected resource. If no key provider is mapped, a new key provider is created and returned.

Parameters:
resource - the URI of the protected resource.
Returns:
The key provider mapped for the protected resource.

moveKeyProvider

@Nullable
KeyProvider<K> moveKeyProvider(URI oldResource,
                                        URI newResource)
Moves the key provider from the URI oldResource to newResource.

Parameters:
oldResource - the old URI of the protected resource.
newResource - the new URI of the protected resource.
Returns:
The key provider which was previously mapped for the protected resource newResource.
Throws:
IllegalArgumentException - if no key provider exists for oldResource or if oldResource compares equal to newResource.

removeKeyProvider

@Nullable
KeyProvider<K> removeKeyProvider(URI resource)
Removes the key provider for the given protected resource.

Parameters:
resource - the URI of the protected resource.
Returns:
The key provider which was previously mapped for the protected resource.
Throws:
IllegalArgumentException - if no key provider exists for resource.

TrueZIP Driver ZIP.RAES (TZP) 7.1

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.