public abstract class Provider extends Properties
Provider is the abstract superclass for all security providers in the
Java security infrastructure.| Modifier and Type | Class and Description |
|---|---|
static class |
Provider.Service
Service represents a service in the Java Security infrastructure. |
defaults| Modifier | Constructor and Description |
|---|---|
protected |
Provider(String name,
double version,
String info)
Constructs a new instance of
Provider with its name, version and
description. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all properties used to look up services implemented by this
Provider. |
Set<Map.Entry<Object,Object>> |
entrySet()
Returns a set of the mappings contained in this
Hashtable. |
String |
getInfo()
Returns a description of the services being provided.
|
String |
getName()
Returns the name of this provider.
|
Provider.Service |
getService(String type,
String algorithm)
Returns the service with the specified
type implementing the
specified algorithm, or null if no such implementation
exists. |
Set<Provider.Service> |
getServices()
Returns an unmodifiable
Set of all services registered by this
provider. |
double |
getVersion()
Returns the version number for the services being provided.
|
Set<Object> |
keySet()
Returns a set of the keys contained in this
Hashtable. |
void |
load(InputStream inStream)
Loads properties from the specified
InputStream, assumed to be ISO-8859-1. |
Object |
put(Object key,
Object value)
Maps the specified
key property name to the specified value. |
void |
putAll(Map<?,?> t)
Copies all from the provided map to this
Provider. |
protected void |
putService(Provider.Service s)
Adds a
Service to this Provider. |
Object |
remove(Object key)
Removes the specified
key and its associated value from this
Provider. |
protected void |
removeService(Provider.Service s)
Removes a previously registered
Service from this Provider. |
String |
toString()
Returns a string containing a concise, human-readable description of
this
Provider including its name and its version. |
Collection<Object> |
values()
Returns a collection of the values contained in this
Hashtable. |
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNamesclone, contains, containsKey, containsValue, elements, equals, get, hashCode, isEmpty, keys, rehash, sizepublic String getName()
public double getVersion()
public String getInfo()
public String toString()
Provider including its name and its version.public void clear()
Provider.clear in interface Map<Object,Object>clear in class Hashtable<Object,Object>Hashtable.isEmpty(),
Hashtable.sizepublic void load(InputStream inStream) throws IOException
PropertiesInputStream, assumed to be ISO-8859-1.
See "Character Encoding".load in class PropertiesinStream - the InputStreamIOExceptionpublic void putAll(Map<?,?> t)
Provider.public Set<Map.Entry<Object,Object>> entrySet()
HashtableHashtable. Each
element in the set is a Map.Entry. The set is backed by this
Hashtable so changes to one are reflected by the other. The set
does not support adding.public Set<Object> keySet()
HashtableHashtable. The set
is backed by this Hashtable so changes to one are reflected by
the other. The set does not support adding.public Collection<Object> values()
HashtableHashtable.
The collection is backed by this Hashtable so changes to one are
reflected by the other. The collection does not support adding.public Object put(Object key, Object value)
key property name to the specified value.put in interface Map<Object,Object>put in class Hashtable<Object,Object>key - the name of the property.value - the value of the property.key
,or null if it did not have one.Hashtable.elements(),
Hashtable.get(java.lang.Object),
Hashtable.keys(),
Object.equals(java.lang.Object)public Object remove(Object key)
key and its associated value from this
Provider.remove in interface Map<Object,Object>remove in class Hashtable<Object,Object>key - the name of the propertykey ,or
null if no mapping was presentHashtable.get(java.lang.Object),
Hashtable.put(K, V)public Provider.Service getService(String type, String algorithm)
type implementing the
specified algorithm, or null if no such implementation
exists.
If two services match the requested type and algorithm, the one added
with the putService(Service) is returned (as opposed to the one
added via put(Object, Object).
type - the type of the service (for example KeyPairGenerator)algorithm - the algorithm name (case insensitive)null if no such implementation
existspublic Set<Provider.Service> getServices()
Set of all services registered by this
provider.Set of all services registered by this
providerprotected void putService(Provider.Service s)
Service to this Provider. If a service with the
same name was registered via this method, it is replace.s - the Service to registerprotected void removeService(Provider.Service s)
Service from this Provider.s - the Service to removeNullPointerException - if s is null