Objects such as credentials may optionally implement this interface to provide the capability to destroy its contents.
Subject
destroy() Destroy this Object . | |
isDestroyed() Determine if this Object has been destroyed. |
public voiddestroy() throwsDestroyFailedException
Object
. Sensitive information associated with thisObject
is destroyed or cleared. Subsequent calls to certain methods on thisObject
will result in anIllegalStateException
being thrown.
DestroyFailedException
- if the destroy operation fails.java.lang.SecurityException
- if the caller does not have permissionto destroy thisObject
.public booleanisDestroyed()
Object
has been destroyed.Object
has been destroyed,false otherwise.