01 /*
02 * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
03 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04 *
05 * This code is free software; you can redistribute it and/or modify it
06 * under the terms of the GNU General Public License version 2 only, as
07 * published by the Free Software Foundation. Sun designates this
08 * particular file as subject to the "Classpath" exception as provided
09 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25
26 package javax.security.auth.login;
27
28 /**
29 * This class defines the <i>Service Provider Interface</i> (<b>SPI</b>)
30 * for the <code>Configuration</code> class.
31 * All the abstract methods in this class must be implemented by each
32 * service provider who wishes to supply a Configuration implementation.
33 *
34 * <p> Subclass implementations of this abstract class must provide
35 * a public constructor that takes a <code>Configuration.Parameters</code>
36 * object as an input parameter. This constructor also must throw
37 * an IllegalArgumentException if it does not understand the
38 * <code>Configuration.Parameters</code> input.
39 *
40 * @version 1.8, 05/05/07
41 *
42 * @since 1.6
43 */
44
45 public abstract class ConfigurationSpi {
46 /**
47 * Retrieve the AppConfigurationEntries for the specified <i>name</i>.
48 *
49 * <p>
50 *
51 * @param name the name used to index the Configuration.
52 *
53 * @return an array of AppConfigurationEntries for the specified
54 * <i>name</i>, or null if there are no entries.
55 */
56 protected abstract AppConfigurationEntry[] engineGetAppConfigurationEntry(
57 String name);
58
59 /**
60 * Refresh and reload the Configuration.
61 *
62 * <p> This method causes this Configuration object to refresh/reload its
63 * contents in an implementation-dependent manner.
64 * For example, if this Configuration object stores its entries in a file,
65 * calling <code>refresh</code> may cause the file to be re-read.
66 *
67 * <p> The default implementation of this method does nothing.
68 * This method should be overridden if a refresh operation is supported
69 * by the implementation.
70 *
71 * @exception SecurityException if the caller does not have permission
72 * to refresh its Configuration.
73 */
74 protected void engineRefresh() {
75 }
76 }
|