java.security
Class Provider

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.Dictionary sample code for java.util.Dictionary definition code for java.util.Dictionary <K,V>
      extended by java.util.Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
          extended by java.util.Properties sample code for java.util.Properties definition code for java.util.Properties 
              extended by java.security.Provider
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Direct Known Subclasses:
AuthProvider sample code for java.security.AuthProvider definition code for java.security.AuthProvider

public abstract class Provider
extends Properties sample code for java.util.Properties definition code for java.util.Properties

This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security. Services that a provider may implement include:

Each provider has a name and a version number, and is configured in each runtime it is installed in.

See The Provider Class in the "Java Cryptography Architecture API Specification & Reference" for information about how a particular type of provider, the cryptographic service provider, works and is installed. However, please note that a provider can be used to implement any security service in Java that uses a pluggable architecture with a choice of implementations that fit underneath.

Some provider implementations may encounter unrecoverable internal errors during their operation, for example a failure to communicate with a security token. A ProviderException sample code for java.security.ProviderException definition code for java.security.ProviderException should be used to indicate such errors.

The service type Provider is reserved for use by the security framework. Services of this type cannot be added, removed, or modified by applications. The following attributes are automatically placed in each Provider object:

NameValue
Provider.id name String.valueOf(provider.getName())
Provider.id version String.valueOf(provider.getVersion())
Provider.id info String.valueOf(provider.getInfo())
Provider.id className provider.getClass().getName()

See Also:
Serialized Form

Nested Class Summary
static class Provider.Service sample code for java.security.Provider.Service definition code for java.security.Provider.Service
          The description of a security service.
 
Field Summary
 
Fields inherited from class java.util.Properties sample code for java.util.Properties definition code for java.util.Properties
defaults sample code for java.util.Properties.defaults definition code for java.util.Properties.defaults
 
Constructor Summary
protected Provider sample code for java.security.Provider.Provider(java.lang.String, double, java.lang.String) definition code for java.security.Provider.Provider(java.lang.String, double, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name, double version, String sample code for java.lang.String definition code for java.lang.String  info)
          Constructs a provider with the specified name, version number, and information.
 
Method Summary
 void clear sample code for java.security.Provider.clear() definition code for java.security.Provider.clear() ()
          Clears this provider so that it no longer contains the properties used to look up facilities implemented by the provider.
 Set sample code for java.util.Set definition code for java.util.Set <Map.Entry sample code for java.util.Map.Entry definition code for java.util.Map.Entry <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >> entrySet sample code for java.security.Provider.entrySet() definition code for java.security.Provider.entrySet() ()
          Returns an unmodifiable Set view of the property entries contained in this Provider.
 String sample code for java.lang.String definition code for java.lang.String getInfo sample code for java.security.Provider.getInfo() definition code for java.security.Provider.getInfo() ()
          Returns a human-readable description of the provider and its services.
 String sample code for java.lang.String definition code for java.lang.String getName sample code for java.security.Provider.getName() definition code for java.security.Provider.getName() ()
          Returns the name of this provider.
 Provider.Service sample code for java.security.Provider.Service definition code for java.security.Provider.Service getService sample code for java.security.Provider.getService(java.lang.String, java.lang.String) definition code for java.security.Provider.getService(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  type, String sample code for java.lang.String definition code for java.lang.String  algorithm)
          Get the service describing this Provider's implementation of the specified type of this algorithm or alias.
 Set sample code for java.util.Set definition code for java.util.Set <Provider.Service sample code for java.security.Provider.Service definition code for java.security.Provider.Service > getServices sample code for java.security.Provider.getServices() definition code for java.security.Provider.getServices() ()
          Get an unmodifiable Set of all services supported by this Provider.
 double getVersion sample code for java.security.Provider.getVersion() definition code for java.security.Provider.getVersion() ()
          Returns the version number for this provider.
 Set sample code for java.util.Set definition code for java.util.Set <Object sample code for java.lang.Object definition code for java.lang.Object > keySet sample code for java.security.Provider.keySet() definition code for java.security.Provider.keySet() ()
          Returns an unmodifiable Set view of the property keys contained in this provider.
 void load sample code for java.security.Provider.load(java.io.InputStream) definition code for java.security.Provider.load(java.io.InputStream) (InputStream sample code for java.io.InputStream definition code for java.io.InputStream  inStream)
          Reads a property list (key and element pairs) from the input stream.
 Object sample code for java.lang.Object definition code for java.lang.Object put sample code for java.security.Provider.put(java.lang.Object, java.lang.Object) definition code for java.security.Provider.put(java.lang.Object, java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Object sample code for java.lang.Object definition code for java.lang.Object  value)
          Sets the key property to have the specified value.
 void putAll sample code for java.security.Provider.putAll(java.util.Map) definition code for java.security.Provider.putAll(java.util.Map) (Map sample code for java.util.Map definition code for java.util.Map <?,?> t)
          Copies all of the mappings from the specified Map to this provider.
protected  void putService sample code for java.security.Provider.putService(java.security.Provider.Service) definition code for java.security.Provider.putService(java.security.Provider.Service) (Provider.Service sample code for java.security.Provider.Service definition code for java.security.Provider.Service  s)
          Add a service.
 Object sample code for java.lang.Object definition code for java.lang.Object remove sample code for java.security.Provider.remove(java.lang.Object) definition code for java.security.Provider.remove(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          Removes the key property (and its corresponding value).
protected  void removeService sample code for java.security.Provider.removeService(java.security.Provider.Service) definition code for java.security.Provider.removeService(java.security.Provider.Service) (Provider.Service sample code for java.security.Provider.Service definition code for java.security.Provider.Service  s)
          Remove a service previously added using putService() sample code for java.security.Provider.putService(java.security.Provider.Service) definition code for java.security.Provider.putService(java.security.Provider.Service) .
 String sample code for java.lang.String definition code for java.lang.String toString sample code for java.security.Provider.toString() definition code for java.security.Provider.toString() ()
          Returns a string with the name and the version number of this provider.
 Collection sample code for java.util.Collection definition code for java.util.Collection <Object sample code for java.lang.Object definition code for java.lang.Object > values sample code for java.security.Provider.values() definition code for java.security.Provider.values() ()
          Returns an unmodifiable Collection view of the property values contained in this provider.
 
Methods inherited from class java.util.Properties sample code for java.util.Properties definition code for java.util.Properties
getProperty sample code for java.util.Properties.getProperty(java.lang.String) definition code for java.util.Properties.getProperty(java.lang.String) , getProperty sample code for java.util.Properties.getProperty(java.lang.String, java.lang.String) definition code for java.util.Properties.getProperty(java.lang.String, java.lang.String) , list sample code for java.util.Properties.list(java.io.PrintStream) definition code for java.util.Properties.list(java.io.PrintStream) , list sample code for java.util.Properties.list(java.io.PrintWriter) definition code for java.util.Properties.list(java.io.PrintWriter) , loadFromXML sample code for java.util.Properties.loadFromXML(java.io.InputStream) definition code for java.util.Properties.loadFromXML(java.io.InputStream) , propertyNames sample code for java.util.Properties.propertyNames() definition code for java.util.Properties.propertyNames() , save sample code for java.util.Properties.save(java.io.OutputStream, java.lang.String) definition code for java.util.Properties.save(java.io.OutputStream, java.lang.String) , setProperty sample code for java.util.Properties.setProperty(java.lang.String, java.lang.String) definition code for java.util.Properties.setProperty(java.lang.String, java.lang.String) , store sample code for java.util.Properties.store(java.io.OutputStream, java.lang.String) definition code for java.util.Properties.store(java.io.OutputStream, java.lang.String) , storeToXML sample code for java.util.Properties.storeToXML(java.io.OutputStream, java.lang.String) definition code for java.util.Properties.storeToXML(java.io.OutputStream, java.lang.String) , storeToXML sample code for java.util.Properties.storeToXML(java.io.OutputStream, java.lang.String, java.lang.String) definition code for java.util.Properties.storeToXML(java.io.OutputStream, java.lang.String, java.lang.String)
 
Methods inherited from class java.util.Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable
clone sample code for java.util.Hashtable.clone() definition code for java.util.Hashtable.clone() , contains sample code for java.util.Hashtable.contains(java.lang.Object) definition code for java.util.Hashtable.contains(java.lang.Object) , containsKey sample code for java.util.Hashtable.containsKey(java.lang.Object) definition code for java.util.Hashtable.containsKey(java.lang.Object) , containsValue sample code for java.util.Hashtable.containsValue(java.lang.Object) definition code for java.util.Hashtable.containsValue(java.lang.Object) , elements sample code for java.util.Hashtable.elements() definition code for java.util.Hashtable.elements() , equals sample code for java.util.Hashtable.equals(java.lang.Object) definition code for java.util.Hashtable.equals(java.lang.Object) , get sample code for java.util.Hashtable.get(java.lang.Object) definition code for java.util.Hashtable.get(java.lang.Object) , hashCode sample code for java.util.Hashtable.hashCode() definition code for java.util.Hashtable.hashCode() , isEmpty sample code for java.util.Hashtable.isEmpty() definition code for java.util.Hashtable.isEmpty() , keys sample code for java.util.Hashtable.keys() definition code for java.util.Hashtable.keys() , rehash sample code for java.util.Hashtable.rehash() definition code for java.util.Hashtable.rehash() , size sample code for java.util.Hashtable.size() definition code for java.util.Hashtable.size()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

Provider sample code for java.security.Provider(java.lang.String, double, java.lang.String) definition code for java.security.Provider(java.lang.String, double, java.lang.String)

protected Provider(String sample code for java.lang.String definition code for java.lang.String  name,
                   double version,
                   String sample code for java.lang.String definition code for java.lang.String  info)
Constructs a provider with the specified name, version number, and information.

Parameters:
name - the provider name.
version - the provider version number.
info - a description of the provider and its services.
Method Detail

getName sample code for java.security.Provider.getName() definition code for java.security.Provider.getName()

public String sample code for java.lang.String definition code for java.lang.String  getName()
Returns the name of this provider.

Returns:
the name of this provider.

getVersion sample code for java.security.Provider.getVersion() definition code for java.security.Provider.getVersion()

public double getVersion()
Returns the version number for this provider.

Returns:
the version number for this provider.

getInfo sample code for java.security.Provider.getInfo() definition code for java.security.Provider.getInfo()

public String sample code for java.lang.String definition code for java.lang.String  getInfo()
Returns a human-readable description of the provider and its services. This may return an HTML page, with relevant links.

Returns:
a description of the provider and its services.

toString sample code for java.security.Provider.toString() definition code for java.security.Provider.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string with the name and the version number of this provider.

Overrides:
toString sample code for java.util.Hashtable.toString() definition code for java.util.Hashtable.toString() in class Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Returns:
the string with the name and the version number for this provider.

clear sample code for java.security.Provider.clear() definition code for java.security.Provider.clear()

public void clear()
Clears this provider so that it no longer contains the properties used to look up facilities implemented by the provider.

First, if there is a security manager, its checkSecurityAccess method is called with the string "clearProviderProperties."+name (where name is the provider name) to see if it's ok to clear this provider. If the default implementation of checkSecurityAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a SecurityPermission("clearProviderProperties."+name) permission.

Specified by:
clear sample code for java.util.Map.clear() definition code for java.util.Map.clear() in interface Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Overrides:
clear sample code for java.util.Hashtable.clear() definition code for java.util.Hashtable.clear() in class Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) sample code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) definition code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) method denies access to clear this provider
Since:
1.2

load sample code for java.security.Provider.load(java.io.InputStream) definition code for java.security.Provider.load(java.io.InputStream)

public void load(InputStream sample code for java.io.InputStream definition code for java.io.InputStream  inStream)
          throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Reads a property list (key and element pairs) from the input stream.

Overrides:
load sample code for java.util.Properties.load(java.io.InputStream) definition code for java.util.Properties.load(java.io.InputStream) in class Properties sample code for java.util.Properties definition code for java.util.Properties
Parameters:
inStream - the input stream.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if an error occurred when reading from the input stream.
See Also:
Properties.load(java.io.InputStream) sample code for java.util.Properties.load(java.io.InputStream) definition code for java.util.Properties.load(java.io.InputStream)

putAll sample code for java.security.Provider.putAll(java.util.Map<?, ?>) definition code for java.security.Provider.putAll(java.util.Map<?, ?>)

public void putAll(Map sample code for java.util.Map definition code for java.util.Map <?,?> t)
Copies all of the mappings from the specified Map to this provider. These mappings will replace any properties that this provider had for any of the keys currently in the specified Map.

Specified by:
putAll sample code for java.util.Map.putAll(java.util.Map) definition code for java.util.Map.putAll(java.util.Map) in interface Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Overrides:
putAll sample code for java.util.Hashtable.putAll(java.util.Map) definition code for java.util.Hashtable.putAll(java.util.Map) in class Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Parameters:
t - Mappings to be stored in this map.
Since:
1.2

entrySet sample code for java.security.Provider.entrySet() definition code for java.security.Provider.entrySet()

public Set sample code for java.util.Set definition code for java.util.Set <Map.Entry sample code for java.util.Map.Entry definition code for java.util.Map.Entry <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >> entrySet()
Returns an unmodifiable Set view of the property entries contained in this Provider.

Specified by:
entrySet sample code for java.util.Map.entrySet() definition code for java.util.Map.entrySet() in interface Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Overrides:
entrySet sample code for java.util.Hashtable.entrySet() definition code for java.util.Hashtable.entrySet() in class Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Returns:
a set view of the mappings contained in this map.
Since:
1.2
See Also:
Map.Entry sample code for java.util.Map.Entry definition code for java.util.Map.Entry

keySet sample code for java.security.Provider.keySet() definition code for java.security.Provider.keySet()

public Set sample code for java.util.Set definition code for java.util.Set <Object sample code for java.lang.Object definition code for java.lang.Object > keySet()
Returns an unmodifiable Set view of the property keys contained in this provider.

Specified by:
keySet sample code for java.util.Map.keySet() definition code for java.util.Map.keySet() in interface Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Overrides:
keySet sample code for java.util.Hashtable.keySet() definition code for java.util.Hashtable.keySet() in class Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Returns:
a set view of the keys contained in this map.
Since:
1.2

values sample code for java.security.Provider.values() definition code for java.security.Provider.values()

public Collection sample code for java.util.Collection definition code for java.util.Collection <Object sample code for java.lang.Object definition code for java.lang.Object > values()
Returns an unmodifiable Collection view of the property values contained in this provider.

Specified by:
values sample code for java.util.Map.values() definition code for java.util.Map.values() in interface Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Overrides:
values sample code for java.util.Hashtable.values() definition code for java.util.Hashtable.values() in class Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Returns:
a collection view of the values contained in this map.
Since:
1.2

put sample code for java.security.Provider.put(java.lang.Object, java.lang.Object) definition code for java.security.Provider.put(java.lang.Object, java.lang.Object)

public Object sample code for java.lang.Object definition code for java.lang.Object  put(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                  Object sample code for java.lang.Object definition code for java.lang.Object  value)
Sets the key property to have the specified value.

First, if there is a security manager, its checkSecurityAccess method is called with the string "putProviderProperty."+name, where name is the provider name, to see if it's ok to set this provider's property values. If the default implementation of checkSecurityAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a SecurityPermission("putProviderProperty."+name) permission.

Specified by:
put sample code for java.util.Map.put(K, V) definition code for java.util.Map.put(K, V) in interface Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Overrides:
put sample code for java.util.Hashtable.put(K, V) definition code for java.util.Hashtable.put(K, V) in class Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Parameters:
key - the property key.
value - the property value.
Returns:
the previous value of the specified property (key), or null if it did not have one.
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) sample code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) definition code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) method denies access to set property values.
Since:
1.2
See Also:
Object.equals(Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable.get(Object) sample code for java.util.Hashtable.get(java.lang.Object) definition code for java.util.Hashtable.get(java.lang.Object)

remove sample code for java.security.Provider.remove(java.lang.Object) definition code for java.security.Provider.remove(java.lang.Object)

public Object sample code for java.lang.Object definition code for java.lang.Object  remove(Object sample code for java.lang.Object definition code for java.lang.Object  key)
Removes the key property (and its corresponding value).

First, if there is a security manager, its checkSecurityAccess method is called with the string "removeProviderProperty."+name, where name is the provider name, to see if it's ok to remove this provider's properties. If the default implementation of checkSecurityAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a SecurityPermission("removeProviderProperty."+name) permission.

Specified by:
remove sample code for java.util.Map.remove(java.lang.Object) definition code for java.util.Map.remove(java.lang.Object) in interface Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Overrides:
remove sample code for java.util.Hashtable.remove(java.lang.Object) definition code for java.util.Hashtable.remove(java.lang.Object) in class Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Parameters:
key - the key for the property to be removed.
Returns:
the value to which the key had been mapped, or null if the key did not have a mapping.
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) sample code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) definition code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) method denies access to remove this provider's properties.
Since:
1.2

getService sample code for java.security.Provider.getService(java.lang.String, java.lang.String) definition code for java.security.Provider.getService(java.lang.String, java.lang.String)

public Provider.Service sample code for java.security.Provider.Service definition code for java.security.Provider.Service  getService(String sample code for java.lang.String definition code for java.lang.String  type,
                                   String sample code for java.lang.String definition code for java.lang.String  algorithm)
Get the service describing this Provider's implementation of the specified type of this algorithm or alias. If no such implementation exists, this method returns null. If there are two matching services, one added to this provider using putService() sample code for java.security.Provider.putService(java.security.Provider.Service) definition code for java.security.Provider.putService(java.security.Provider.Service) and one added via put() sample code for java.security.Provider.put(java.lang.Object, java.lang.Object) definition code for java.security.Provider.put(java.lang.Object, java.lang.Object) , the service added via putService() sample code for java.security.Provider.putService(java.security.Provider.Service) definition code for java.security.Provider.putService(java.security.Provider.Service) is returned.

Parameters:
type - the type of service sample code for java.security.Provider.Service definition code for java.security.Provider.Service requested (for example, MessageDigest)
algorithm - the case insensitive algorithm name (or alternate alias) of the service requested (for example, SHA-1)
Returns:
the service describing this Provider's matching service or null if no such service exists
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if type or algorithm is null
Since:
1.5

getServices sample code for java.security.Provider.getServices() definition code for java.security.Provider.getServices()

public Set sample code for java.util.Set definition code for java.util.Set <Provider.Service sample code for java.security.Provider.Service definition code for java.security.Provider.Service > getServices()
Get an unmodifiable Set of all services supported by this Provider.

Returns:
an unmodifiable Set of all services supported by this Provider
Since:
1.5

putService sample code for java.security.Provider.putService(java.security.Provider.Service) definition code for java.security.Provider.putService(java.security.Provider.Service)

protected void putService(Provider.Service sample code for java.security.Provider.Service definition code for java.security.Provider.Service  s)
Add a service. If a service of the same type with the same algorithm name exists and it was added using putService() sample code for java.security.Provider.putService(java.security.Provider.Service) definition code for java.security.Provider.putService(java.security.Provider.Service) , it is replaced by the new service. This method also places information about this service in the provider's Hashtable values in the format described in the Java Cryptography Architecture API Specification & Reference .

Also, if there is a security manager, its checkSecurityAccess method is called with the string "putProviderProperty."+name, where name is the provider name, to see if it's ok to set this provider's property values. If the default implementation of checkSecurityAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a SecurityPermission("putProviderProperty."+name) permission.

Parameters:
s - the Service to add
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) sample code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) definition code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) method denies access to set property values.
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if s is null
Since:
1.5

removeService sample code for java.security.Provider.removeService(java.security.Provider.Service) definition code for java.security.Provider.removeService(java.security.Provider.Service)

protected void removeService(Provider.Service sample code for java.security.Provider.Service definition code for java.security.Provider.Service  s)
Remove a service previously added using putService() sample code for java.security.Provider.putService(java.security.Provider.Service) definition code for java.security.Provider.putService(java.security.Provider.Service) . The specified service is removed from this provider. It will no longer be returned by getService() sample code for java.security.Provider.getService(java.lang.String, java.lang.String) definition code for java.security.Provider.getService(java.lang.String, java.lang.String) and its information will be removed from this provider's Hashtable.

Also, if there is a security manager, its checkSecurityAccess method is called with the string "removeProviderProperty."+name, where name is the provider name, to see if it's ok to remove this provider's properties. If the default implementation of checkSecurityAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a SecurityPermission("removeProviderProperty."+name) permission.

Parameters:
s - the Service to be removed
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) sample code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) definition code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) method denies access to remove this provider's properties.
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if s is null
Since:
1.5