KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > security > auth > Destroyable


1 /*
2  * @(#)Destroyable.java 1.11 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.security.auth;
9
10 /**
11  * Objects such as credentials may optionally implement this interface
12  * to provide the capability to destroy its contents.
13  *
14  * @version 1.11, 12/19/03
15  * @see javax.security.auth.Subject
16  */

17 public interface Destroyable {
18
19     /**
20      * Destroy this <code>Object</code>.
21      *
22      * <p> Sensitive information associated with this <code>Object</code>
23      * is destroyed or cleared. Subsequent calls to certain methods
24      * on this <code>Object</code> will result in an
25      * <code>IllegalStateException</code> being thrown.
26      *
27      * <p>
28      *
29      * @exception DestroyFailedException if the destroy operation fails. <p>
30      *
31      * @exception SecurityException if the caller does not have permission
32      * to destroy this <code>Object</code>.
33      */

34     void destroy() throws DestroyFailedException JavaDoc;
35
36     /**
37      * Determine if this <code>Object</code> has been destroyed.
38      *
39      * <p>
40      *
41      * @return true if this <code>Object</code> has been destroyed,
42      * false otherwise.
43      */

44     boolean isDestroyed();
45 }
46
Popular Tags