/* * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.security.auth; /** * Objects such as credentials may optionally implement this interface * to provide the capability to destroy its contents. * * @see javax.security.auth.Subject */ public interface Destroyable { /** * 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. * *

* * @exception DestroyFailedException if the destroy operation fails.

* * @exception SecurityException if the caller does not have permission * to destroy this Object. */ void destroy() throws DestroyFailedException; /** * Determine if this Object has been destroyed. * *

* * @return true if this Object has been destroyed, * false otherwise. */ boolean isDestroyed(); }