javax.security.auth
Interface Destroyable
-
- All Known Implementing Classes:
- X500PrivateCredential
public interface DestroyableObjects such as credentials may optionally implement this interface to provide the capability to destroy its contents.- See Also:
Subject
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method and Description default voiddestroy()Destroy thisObject.default booleanisDestroyed()Determine if thisObjecthas been destroyed.
-
-
-
Method Detail
-
destroy
default 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
default boolean isDestroyed()
Determine if thisObjecthas been destroyed.The default implementation returns false.
- Returns:
- true if this
Objecthas been destroyed, false otherwise.
-
-