public abstract class Provider extends java.util.Properties implements java.io.Serializable
Providers are installed by name and version number. See the static
initializer of the Security class for the default
security providers installed by this class library.
| Modifier | Constructor and Description |
|---|---|
protected |
Provider(java.lang.String name,
double version,
java.lang.String info)
This method initializes a new instance of
Provider to have
the specified name, version, and description information. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
This method clears the entire property collection such that it no longer
contains the properties used to look up the services provided by
this
Provider. |
java.lang.Object |
get(java.lang.Object key)
Return the value in this Hashtable associated with the supplied key,
or
null if the key maps to nothing. |
java.lang.String |
getInfo()
This method returns a textual description of the
Provider. |
java.lang.String |
getName()
This method returns the name assigned to this
Provider. |
double |
getVersion()
This method retunrs the version number of this
Provider. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Maps a key property to a designated value.
|
java.lang.Object |
remove(java.lang.Object key)
This method removes the specified key entry (and its associated value)
from the property mapping collection.
|
java.lang.String |
toString()
This method returns a
String representation of this
object. |
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXMLprotected Provider(java.lang.String name, double version, java.lang.String info)
Provider to have
the specified name, version, and description information.name - The name to assign to this Provider.version - The version number for this Provider.info - A textual description of this provider.public java.lang.String getName()
Provider.Provider's name.public double getVersion()
Provider.Provider's version number.public java.lang.String getInfo()
Provider.Provider.public java.lang.Object put(java.lang.Object key, java.lang.Object value)
If there is an installed SecurityManager object in the underlying
VM, its SecurityManager.checkSecurityAccess(String) method is
called with the string "putProviderProperty." + name, where
name is this provider's name. For the default implementation
this translates into a SecurityManager.checkPermission(Permission)
for a SecurityPermission("putProviderProperty." + name).
put in interface java.util.Map<java.lang.Object,java.lang.Object>put in class java.util.Hashtable<java.lang.Object,java.lang.Object>key - The property key.value - The property value.key),
or null if it did not have one.java.lang.SecurityException - If a security manager is installed and its
SecurityManager.checkSecurityAccess(String) method
disallows adding properties at run-time.Object.equals(Object),
Hashtable.get(Object)public java.lang.Object get(java.lang.Object key)
java.util.Hashtablenull if the key maps to nothing.get in interface java.util.Map<java.lang.Object,java.lang.Object>get in class java.util.Hashtable<java.lang.Object,java.lang.Object>key - the key for which to fetch an associated valueHashtable.put(Object, Object),
Hashtable.containsKey(Object)public java.lang.Object remove(java.lang.Object key)
If there is an installed SecurityManager object in the underlying
VM, its SecurityManager.checkSecurityAccess(String) method is
called with the string "removeProviderProperty." + name, where
name is this provider's name. For the default implementation
this translates into a SecurityManager.checkPermission(Permission)
for a SecurityPermission("removeProviderProperty." + name).
remove in interface java.util.Map<java.lang.Object,java.lang.Object>remove in class java.util.Hashtable<java.lang.Object,java.lang.Object>key - The key to removenull if no
previous value.public void clear()
Provider.
If there is an installed SecurityManager object in the underlying
VM, its SecurityManager.checkSecurityAccess(String) method is
called with the string "clearProviderProperties." + name,
where name is this provider's name. For the default
implementation this translates into a
SecurityManager.checkPermission(Permission) for a
SecurityPermission("clearProviderProperties." + name).
clear in interface java.util.Map<java.lang.Object,java.lang.Object>clear in class java.util.Hashtable<java.lang.Object,java.lang.Object>public java.lang.String toString()
String representation of this
object. This will include the Provider name and
version number.toString in class java.util.Hashtable<java.lang.Object,java.lang.Object>String representation of this object.Object.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)