Package javax.security.auth
Interface Destroyable
-
- All Known Subinterfaces:
PrivateKey,SecretKey
- All Known Implementing Classes:
SecretKeySpec
public interface DestroyableObjects such as credentials may optionally implement this interface to provide the capability to destroy its contents.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Destroy thisObject.booleanisDestroyed()Determine if thisObjecthas been destroyed.
-
-
-
Method Detail
-
destroy
void destroy() throws DestroyFailedExceptionDestroy thisObject.Sensitive information associated with this
Objectis destroyed or cleared. Subsequent calls to certain methods on thisObjectwill result in anIllegalStateExceptionbeing thrown.The default implementation throws
DestroyFailedException.- Throws:
DestroyFailedException- if the destroy operation fails.java.lang.SecurityException- if the caller does not have permission to destroy thisObject.
-
isDestroyed
boolean isDestroyed()
Determine if thisObjecthas been destroyed.The default implementation returns false.
- Returns:
- true if this
Objecthas been destroyed, false otherwise.
-
-