KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > security > auth > login > ConfigurationSpi


1 /*
2  * @(#)ConfigurationSpi.java 1.2 05/11/17
3  *
4  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8
9 package javax.security.auth.login;
10
11 /**
12  * This class defines the <i>Service Provider Interface</i> (<b>SPI</b>)
13  * for the <code>Configuration</code> class.
14  * All the abstract methods in this class must be implemented by each
15  * service provider who wishes to supply a Configuration implementation.
16  *
17  * <p> Subclass implementations of this abstract class must provide
18  * a public constructor that takes a <code>Configuration.Parameters</code>
19  * object as an input parameter. This constructor also must throw
20  * an IllegalArgumentException if it does not understand the
21  * <code>Configuration.Parameters</code> input.
22  *
23  * @version 1.2, 11/17/05
24  *
25  * @since 1.6
26  */

27
28 public abstract class ConfigurationSpi {
29     /**
30      * Retrieve the AppConfigurationEntries for the specified <i>name</i>.
31      *
32      * <p>
33      *
34      * @param name the name used to index the Configuration.
35      *
36      * @return an array of AppConfigurationEntries for the specified
37      * <i>name</i>, or null if there are no entries.
38      */

39     protected abstract AppConfigurationEntry JavaDoc[] engineGetAppConfigurationEntry
40                                                         (String JavaDoc name);
41
42     /**
43      * Refresh and reload the Configuration.
44      *
45      * <p> This method causes this Configuration object to refresh/reload its
46      * contents in an implementation-dependent manner.
47      * For example, if this Configuration object stores its entries in a file,
48      * calling <code>refresh</code> may cause the file to be re-read.
49      *
50      * <p> The default implementation of this method does nothing.
51      * This method should be overridden if a refresh operation is supported
52      * by the implementation.
53      *
54      * @exception SecurityException if the caller does not have permission
55      * to refresh its Configuration.
56      */

57     protected void engineRefresh() { }
58 }
59
Popular Tags