@ThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public class SafeKeyManager<K extends SafeKey<K>,P extends SafeKeyProvider<K>> extends Object implements KeyManager<K>
| Modifier and Type | Field and Description |
|---|---|
private KeyProvider.Factory<? extends P> |
factory |
private Map<URI,P> |
providers |
| Constructor and Description |
|---|
SafeKeyManager(KeyProvider.Factory<? extends P> factory)
Constructs a new default key manager.
|
| Modifier and Type | Method and Description |
|---|---|
P |
getKeyProvider(URI resource)
Returns the key provider for the given protected resource.
|
P |
moveKeyProvider(URI oldResource,
URI newResource)
Moves the key provider from the URI
oldResource to
newResource. |
P |
removeKeyProvider(URI resource)
Removes the key provider for the given protected resource.
|
private P |
removeKeyProvider0(URI resource) |
private final Map<URI,P extends SafeKeyProvider<K>> providers
private final KeyProvider.Factory<? extends P extends SafeKeyProvider<K>> factory
public SafeKeyManager(KeyProvider.Factory<? extends P> factory)
factory - the factory for creating new key providers.public P getKeyProvider(URI resource)
KeyManagergetKeyProvider in interface KeyManager<K extends SafeKey<K>>resource - the URI of the protected resource.public P moveKeyProvider(URI oldResource, URI newResource)
KeyManageroldResource to
newResource.moveKeyProvider in interface KeyManager<K extends SafeKey<K>>oldResource - the old URI of the protected resource.newResource - the new URI of the protected resource.newResource.public P removeKeyProvider(URI resource)
KeyManagerremoveKeyProvider in interface KeyManager<K extends SafeKey<K>>resource - the URI of the protected resource.Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.