Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Provider

public abstract class Provider
extends Properties

java.lang.Object
   ↳ java.util.Dictionary<java.lang.Objectjava.lang.Object>
     ↳ java.util.Hashtable<java.lang.Objectjava.lang.Object>
       ↳ java.util.Properties
         ↳ java.security.Provider
Known Direct Subclasses


Provider is the abstract superclass for all security providers in the Java security infrastructure.

Summary

Nested classes

class Provider.Service

Service represents a service in the Java Security infrastructure. 

Inherited fields

From class java.util.Properties

Protected constructors

Provider(String name, double version, String info)

Constructs a new instance of Provider with its name, version and description.

Public methods

void clear()

Clears all properties used to look up services implemented by this Provider.

Set<Entry<ObjectObject>> 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.

Object remove(Object key)

Removes the specified key and its associated value 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.

Protected methods

void putService(Provider.Service s)

Adds a Service to this Provider.

void removeService(Provider.Service s)

Removes a previously registered Service from this Provider.

Inherited methods

From class java.util.Properties
From class java.util.Hashtable
From class java.util.Dictionary
From class java.lang.Object
From interface java.util.Map

Protected constructors

Provider

Added in API level 1
Provider (String name, 
                double version, 
                String info)

Constructs a new instance of Provider with its name, version and description.

Parameters
name String: the name of the provider.
version double: the version of the provider.
info String: a description of the provider.

Public methods

clear

Added in API level 1
void clear ()

Clears all properties used to look up services implemented by this Provider.

entrySet

Added in API level 1
Set<Entry<ObjectObject>> entrySet ()

Returns a set of the mappings contained in this Hashtable. 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.

Returns
Set<Entry<ObjectObject>> a set of the mappings.

getInfo

Added in API level 1
String getInfo ()

Returns a description of the services being provided.

Returns
String a description of the services being provided.

getName

Added in API level 1
String getName ()

Returns the name of this provider.

Returns
String the name of this provider.

getService

Added in API level 1
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.

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).

Parameters
type String: the type of the service (for example KeyPairGenerator)
algorithm String: the algorithm name (case insensitive)
Returns
Provider.Service the requested service, or null if no such implementation exists

getServices

Added in API level 1
Set<Provider.Service> getServices ()

Returns an unmodifiable Set of all services registered by this provider.

Returns
Set<Provider.Service> an unmodifiable Set of all services registered by this provider

getVersion

Added in API level 1
double getVersion ()

Returns the version number for the services being provided.

Returns
double the version number for the services being provided.

keySet

Added in API level 1
Set<Object> keySet ()

Returns a set of the keys contained in this Hashtable. The set is backed by this Hashtable so changes to one are reflected by the other. The set does not support adding.

Returns
Set<Object> a set of the keys.

load

Added in API level 1
void load (InputStream inStream)

Loads properties from the specified InputStream, assumed to be ISO-8859-1. See "Character Encoding".

Parameters
inStream InputStream: the InputStream
Throws
IOException

put

Added in API level 1
Object put (Object key, 
                Object value)

Maps the specified key property name to the specified value.

Parameters
key Object: the name of the property.
value Object: the value of the property.
Returns
Object the value that was previously mapped to the specified key ,or null if it did not have one.

putAll

Added in API level 1
void putAll (Map<?, ?> t)

Copies all from the provided map to this Provider.

Parameters
t Map: the mappings to copy to this provider.

remove

Added in API level 1
Object remove (Object key)

Removes the specified key and its associated value from this Provider.

Parameters
key Object: the name of the property
Returns
Object the value that was mapped to the specified key ,or null if no mapping was present

toString

Added in API level 1
String toString ()

Returns a string containing a concise, human-readable description of this Provider including its name and its version.

Returns
String a printable representation for this Provider.

values

Added in API level 1
Collection<Object> values ()

Returns a collection of the values contained in this Hashtable. The collection is backed by this Hashtable so changes to one are reflected by the other. The collection does not support adding.

Returns
Collection<Object> a collection of the values.

Protected methods

putService

Added in API level 1
void putService (Provider.Service s)

Adds a Service to this Provider. If a service with the same name was registered via this method, it is replace.

Parameters
s Provider.Service: the Service to register

removeService

Added in API level 1
void removeService (Provider.Service s)

Removes a previously registered Service from this Provider.

Parameters
s Provider.Service: the Service to remove
Throws
NullPointerException if s is null
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.