javax.security.auth
Interface Destroyable

All Known Implementing Classes:
KerberosKey sample code for javax.security.auth.kerberos.KerberosKey definition code for javax.security.auth.kerberos.KerberosKey , KerberosTicket sample code for javax.security.auth.kerberos.KerberosTicket definition code for javax.security.auth.kerberos.KerberosTicket , KeyStore.PasswordProtection sample code for java.security.KeyStore.PasswordProtection definition code for java.security.KeyStore.PasswordProtection , X500PrivateCredential sample code for javax.security.auth.x500.X500PrivateCredential definition code for javax.security.auth.x500.X500PrivateCredential

public interface Destroyable

Objects such as credentials may optionally implement this interface to provide the capability to destroy its contents.

See Also:
Subject sample code for javax.security.auth.Subject definition code for javax.security.auth.Subject

Method Summary
 void destroy sample code for javax.security.auth.Destroyable.destroy() definition code for javax.security.auth.Destroyable.destroy() ()
          Destroy this Object.
 boolean isDestroyed sample code for javax.security.auth.Destroyable.isDestroyed() definition code for javax.security.auth.Destroyable.isDestroyed() ()
          Determine if this Object has been destroyed.
 

Method Detail

destroy sample code for javax.security.auth.Destroyable.destroy() definition code for javax.security.auth.Destroyable.destroy()

void destroy()
             throws DestroyFailedException sample code for javax.security.auth.DestroyFailedException definition code for javax.security.auth.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.

Throws:
DestroyFailedException sample code for javax.security.auth.DestroyFailedException definition code for javax.security.auth.DestroyFailedException - if the destroy operation fails.

SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if the caller does not have permission to destroy this Object.

isDestroyed sample code for javax.security.auth.Destroyable.isDestroyed() definition code for javax.security.auth.Destroyable.isDestroyed()

boolean isDestroyed()
Determine if this Object has been destroyed.

Returns:
true if this Object has been destroyed, false otherwise.