K
- the type of the prompting keys.@ThreadSafe public class PromptingKeyManager<K extends PromptingKey<K>> extends AbstractKeyManager<K>
PromptingKeyManagerMap
Constructor and Description |
---|
PromptingKeyManager(PromptingKey.View<K> view)
Constructs a new prompting key manager.
|
Modifier and Type | Method and Description |
---|---|
PromptingKey.View<K> |
getView() |
void |
link(URI oldResource,
URI newResource)
Notifies this key manager that a protected resource has been linked.
|
PromptingKeyProvider<K> |
provider(URI resource)
Returns a key provider for accessing the identified protected resource.
|
void |
release(URI resource)
Notifies this key manager that a protected resource has been released.
|
protected void |
resetCancelledKey(URI resource)
Resets the state of the key provider for the given protected resource
if and only if prompting for the key has been cancelled.
|
protected void |
resetUnconditionally(URI resource)
Resets the state of the key provider for the given protected resource
unconditionally.
|
String |
toString()
Returns a string representation of this object for logging and debugging
purposes.
|
void |
unlink(URI resource)
Notifies this key manager that a protected resource has been unlinked.
|
equals, hashCode
public PromptingKeyManager(PromptingKey.View<K> view)
view
- the view for key prompting.public final PromptingKey.View<K> getView()
public void link(URI oldResource, URI newResource)
KeyManager
oldResource
- the old URI of the protected resource.newResource
- the new URI of the protected resource.public PromptingKeyProvider<K> provider(URI resource)
KeyManager
resource
- the URI of the protected resource.public void release(URI resource)
The implementation in the class PromptingKeyManager
forwards the
call to resetCancelledKey(URI)
.
resource
- the URI of the protected resource.protected void resetCancelledKey(URI resource)
resource
- the URI of the protected resource.protected void resetUnconditionally(URI resource)
resource
- the URI of the protected resource.public String toString()
toString
in class AbstractKeyManager<K extends PromptingKey<K>>
public void unlink(URI resource)
KeyManager
KeyManager.release(java.net.URI)
.resource
- the URI of the protected resource.Copyright © 2012–2016 Schlichtherle IT Services. All rights reserved.