@ThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public abstract class SafeKeyManager<K extends SafeKey<K>,P extends SafeKeyProvider<K>> extends Object implements KeyManager<K>
| Modifier | Constructor and Description |
|---|---|
protected |
SafeKeyManager()
Constructs a new safe key manager.
|
| Modifier and Type | Method and Description |
|---|---|
P |
getKeyProvider(URI resource)
Returns the key provider for the given protected resource.
|
int |
getPriority()
Returns a priority to help the key manager service locator.
|
P |
moveKeyProvider(URI oldResource,
URI newResource)
Moves the key provider from the URI
oldResource to
newResource. |
protected abstract P |
newKeyProvider()
Returns a new key provider.
|
P |
removeKeyProvider(URI resource)
Removes the key provider for the given protected resource.
|
private P |
removeKeyProvider0(URI resource) |
String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
private final Map<URI,P extends SafeKeyProvider<K>> providers
protected SafeKeyManager()
protected abstract P newKeyProvider()
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)
The returned key provider is invalidated and will behave as if prompting for the secret key had been disabled or cancelled by the user.
removeKeyProvider in interface KeyManager<K extends SafeKey<K>>resource - the URI of the protected resource.public int getPriority()
KeyManager0.getPriority in interface KeyManager<K extends SafeKey<K>>Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.