KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)Refreshable.java 1.9 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
12  * interface to provide the capability to refresh itself.
13  * For example, a credential with a particular time-restricted lifespan
14  * may implement this interface to allow callers to refresh the time period
15  * for which it is valid.
16  *
17  * @version 1.9, 12/19/03
18  * @see javax.security.auth.Subject
19  */

20 public interface Refreshable {
21
22     /**
23      * Determine if this <code>Object</code> is current.
24      *
25      * <p>
26      *
27      * @return true if this <code>Object</code> is currently current,
28      * false otherwise.
29      */

30     boolean isCurrent();
31  
32     /**
33      * Update or extend the validity period for this
34      * <code>Object</code>.
35      *
36      * <p>
37      *
38      * @exception SecurityException if the caller does not have permission
39      * to update or extend the validity period for this
40      * <code>Object</code>. <p>
41      *
42      * @exception RefreshFailedException if the refresh attempt failed.
43      */

44     void refresh() throws RefreshFailedException JavaDoc;
45 }
46
Popular Tags