Package javax.security.auth
Interface Destroyable
-
- All Known Implementing Classes:
KeyStore.PasswordProtection
public interface DestroyableAllows for special treatment of sensitive information, when it comes to destroying or clearing of the data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Erases the sensitive information.booleanisDestroyed()Returnstrueonce an object has been safely destroyed.
-
-
-
Method Detail
-
destroy
void destroy() throws DestroyFailedExceptionErases the sensitive information. Once an object is destroyed any calls to its methods will throw anIllegalStateException. If it does not succeed a DestroyFailedException is thrown.- Throws:
DestroyFailedException- if the information cannot be erased.
-
isDestroyed
boolean isDestroyed()
Returnstrueonce an object has been safely destroyed.- Returns:
- whether the object has been safely destroyed.
-
-