Top Description Methods
javax.security.auth

public Interface Destroyable

Known Direct Subinterfaces
java.security.PrivateKey, javax.crypto.SecretKey
Known Direct Implementers
javax.security.auth.x500.X500PrivateCredential, java.security.KeyStore.PasswordProtection

Objects such as credentials may optionally implement this interface to provide the capability to destroy its contents.
Since
1.4
See Also
javax.security.auth.Subject

Method Summary

Modifier and TypeMethod and Description
public default void
destroy()

Destroy this Object.

public default boolean

Returns:

true if this Object has been destroyed, false otherwise.
isDestroyed
()

Determine if this Object has been destroyed.

Method Detail

destroyback to summary
public default void destroy() throws DestroyFailedException

Destroy this Object.

Sensitive information associated with this Object is destroyed or cleared. Subsequent calls to certain methods on this Object will result in an IllegalStateException being thrown.

Implementation Specification

The default implementation throws DestroyFailedException.

Exceptions
DestroyFailedException:
if the destroy operation fails.
SecurityException:
if the caller does not have permission to destroy this Object.
isDestroyedback to summary
public default boolean isDestroyed()

Determine if this Object has been destroyed.

Implementation Specification

The default implementation returns false.

Returns:boolean

true if this Object has been destroyed, false otherwise.