|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
javax.security.auth.login
|
Nested Class Summary | |
---|---|
static interface |
Configuration.Parameters
This represents a marker interface for Configuration parameters. |
Constructor Summary | |
---|---|
protected |
Configuration()
Sole constructor. |
Method Summary | |
---|---|
abstract AppConfigurationEntry[] |
getAppConfigurationEntry(String name)
Retrieve the AppConfigurationEntries for the specified name from this Configuration. |
static Configuration |
getConfiguration()
Get the installed login Configuration. |
static Configuration |
getInstance(String type,
Configuration.Parameters params)
Returns a Configuration object of the specified type. |
static Configuration |
getInstance(String type,
Configuration.Parameters params,
Provider provider)
Returns a Configuration object of the specified type. |
static Configuration |
getInstance(String type,
Configuration.Parameters params,
String provider)
Returns a Configuration object of the specified type. |
Configuration.Parameters |
getParameters()
Return Configuration parameters. |
Provider |
getProvider()
Return the Provider of this Configuration. |
String |
getType()
Return the type of this Configuration. |
void |
refresh()
Refresh and reload the Configuration. |
static void |
setConfiguration(Configuration configuration)
Set the login Configuration . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Configuration()
Method Detail |
---|
public static Configuration getConfiguration()
Configuration.setConfiguration
method,
then that object is returned. Otherwise, a default
Configuration object is returned.
SecurityException
- if the caller does not have permission
to retrieve the Configuration.setConfiguration(javax.security.auth.login.Configuration)
public static void setConfiguration(Configuration configuration)
Configuration
.
configuration
- the new Configuration
SecurityException
- if the current thread does not have
Permission to set the Configuration
.getConfiguration()
public static Configuration getInstance(String type, Configuration.Parameters params) throws NoSuchAlgorithmException
This method traverses the list of registered security providers, starting with the most preferred Provider. A new Configuration object encapsulating the ConfigurationSpi implementation from the first Provider that supports the specified type is returned.
Note that the list of registered providers may be retrieved via
the Security.getProviders()
method.
type
- the specified Configuration type. See Appendix A in the
Java Cryptography Architecture API Specification & Reference
for a list of standard Configuration types.params
- parameters for the Configuration, which may be null.
SecurityException
- if the caller does not have permission
to get a Configuration instance for the specified type.
NullPointerException
- if the specified type is null.
IllegalArgumentException
- if the specified parameters
are not understood by the ConfigurationSpi implementation
from the selected Provider.
NoSuchAlgorithmException
- if no Provider supports a
ConfigurationSpi implementation for the specified type.Provider
public static Configuration getInstance(String type, Configuration.Parameters params, String provider) throws NoSuchProviderException, NoSuchAlgorithmException
A new Configuration object encapsulating the ConfigurationSpi implementation from the specified provider is returned. The specified provider must be registered in the provider list.
Note that the list of registered providers may be retrieved via
the Security.getProviders()
method.
type
- the specified Configuration type. See Appendix A in the
Java Cryptography Architecture API Specification & Reference
for a list of standard Configuration types.params
- parameters for the Configuration, which may be null.provider
- the provider.
SecurityException
- if the caller does not have permission
to get a Configuration instance for the specified type.
NullPointerException
- if the specified type is null.
IllegalArgumentException
- if the specified provider
is null or empty,
or if the specified parameters are not understood by
the ConfigurationSpi implementation from the specified provider.
NoSuchProviderException
- if the specified provider is not
registered in the security provider list.
NoSuchAlgorithmException
- if the specified provider does not
support a ConfigurationSpi implementation for the specified
type.Provider
public static Configuration getInstance(String type, Configuration.Parameters params, Provider provider) throws NoSuchAlgorithmException
A new Configuration object encapsulating the ConfigurationSpi implementation from the specified Provider object is returned. Note that the specified Provider object does not have to be registered in the provider list.
type
- the specified Configuration type. See Appendix A in the
Java Cryptography Architecture API Specification & Reference
for a list of standard Configuration types.params
- parameters for the Configuration, which may be null.provider
- the Provider.
SecurityException
- if the caller does not have permission
to get a Configuration instance for the specified type.
NullPointerException
- if the specified type is null.
IllegalArgumentException
- if the specified Provider is null,
or if the specified parameters are not understood by
the ConfigurationSpi implementation from the specified Provider.
NoSuchAlgorithmException
- if the specified Provider does not
support a ConfigurationSpi implementation for the specified
type.Provider
public Provider getProvider()
This Configuration instance will only have a Provider if it
was obtained via a call to Configuration.getInstance
.
Otherwise this method returns null.
public String getType()
This Configuration instance will only have a type if it
was obtained via a call to Configuration.getInstance
.
Otherwise this method returns null.
public Configuration.Parameters getParameters()
This Configuration instance will only have parameters if it
was obtained via a call to Configuration.getInstance
.
Otherwise this method returns null.
public abstract AppConfigurationEntry[] getAppConfigurationEntry(String name)
name
- the name used to index the Configuration.
public void refresh()
This method causes this Configuration object to refresh/reload its
contents in an implementation-dependent manner.
For example, if this Configuration object stores its entries in a file,
calling refresh
may cause the file to be re-read.
The default implementation of this method does nothing. This method should be overridden if a refresh operation is supported by the implementation.
SecurityException
- if the caller does not have permission
to refresh its Configuration.