java.security
public abstract class Provider extends Properties implements 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.
defaults
Modifier | Constructor and Description |
---|---|
protected |
Provider(String name,
double version,
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 . |
Object |
get(Object key)
Return the value in this Hashtable associated with the supplied key,
or
null if the key maps to nothing. |
String |
getInfo()
This method returns a textual description of the
Provider . |
String |
getName()
This method returns the name assigned to this
Provider . |
double |
getVersion()
This method retunrs the version number of this
Provider . |
Object |
put(Object key,
Object value)
Maps a key property to a designated value.
|
Object |
remove(Object key)
This method removes the specified key entry (and its associated value)
from the property mapping collection.
|
String |
toString()
This method returns a
String representation of this
object. |
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML
protected Provider(String name, double version, 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 String getName()
Provider
.Provider
's name.public double getVersion()
Provider
.Provider
's version number.public String getInfo()
Provider
.Provider
.public Object put(Object key, 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 Map<Object,Object>
put
in class Hashtable<Object,Object>
key
- The property key.value
- The property value.key
),
or null
if it did not have one.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 Object get(Object key)
Hashtable
null
if the key maps to nothing.get
in interface Map<Object,Object>
get
in class Hashtable<Object,Object>
key
- the key for which to fetch an associated valueHashtable.put(Object, Object)
,
Hashtable.containsKey(Object)
public Object remove(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)
.
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)
.
public String toString()
String
representation of this
object. This will include the Provider
name and
version number.toString
in class Hashtable<Object,Object>
String
representation of this object.Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)