Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Provider.Service

public static class Provider.Service
extends Object

java.lang.Object
   ↳ java.security.Provider.Service


Service represents a service in the Java Security infrastructure. Each service describes its type, the algorithm it implements, to which provider it belongs and other properties.

Summary

Public constructors

Provider.Service(Provider provider, String type, String algorithm, String className, List<String> aliases, Map<StringString> attributes)

Constructs a new instance of Service with the given attributes.

Public methods

final String getAlgorithm()

Returns the name of the algorithm implemented by this Service.

final String getAttribute(String name)

Returns the value of the attribute with the specified name.

final String getClassName()

Returns the name of the class implementing this Service.

final Provider getProvider()

Returns the Provider this Service belongs to.

final String getType()

Returns the type of this Service.

Object newInstance(Object constructorParameter)

Creates and returns a new instance of the implementation described by this Service.

boolean supportsParameter(Object parameter)

Indicates whether this Service supports the specified constructor parameter.

String toString()

Returns a string containing a concise, human-readable description of this Service.

Inherited methods

From class java.lang.Object

Public constructors

Provider.Service

Added in API level 1
Provider.Service (Provider provider, 
                String type, 
                String algorithm, 
                String className, 
                List<String> aliases, 
                Map<StringString> attributes)

Constructs a new instance of Service with the given attributes.

Parameters
provider Provider: the provider to which this service belongs.
type String: the type of this service (for example KeyPairGenerator).
algorithm String: the algorithm this service implements.
className String: the name of the class implementing this service.
aliases List: List of aliases for the algorithm name, or null if the implemented algorithm has no aliases.
attributes Map: Map of additional attributes, or null if this Service has no attributed.
Throws
NullPointerException if provider, type, algorithm or className is null.

Public methods

getAlgorithm

Added in API level 1
String getAlgorithm ()

Returns the name of the algorithm implemented by this Service.

Returns
String the name of the algorithm implemented by this Service.

getAttribute

Added in API level 1
String getAttribute (String name)

Returns the value of the attribute with the specified name.

Parameters
name String: the name of the attribute.
Returns
String the value of the attribute, or null if no attribute with the given name is set.
Throws
NullPointerException if name is null.

getClassName

Added in API level 1
String getClassName ()

Returns the name of the class implementing this Service.

Returns
String the name of the class implementing this Service.

getProvider

Added in API level 1
Provider getProvider ()

Returns the Provider this Service belongs to.

Returns
Provider the Provider this Service belongs to.

getType

Added in API level 1
String getType ()

Returns the type of this Service. For example KeyPairGenerator.

Returns
String the type of this Service.

newInstance

Added in API level 1
Object newInstance (Object constructorParameter)

Creates and returns a new instance of the implementation described by this Service.

Parameters
constructorParameter Object: the parameter that is used by the constructor, or null if the implementation does not declare a constructor parameter.
Returns
Object a new instance of the implementation described by this Service.
Throws
NoSuchAlgorithmException if the instance could not be constructed.
InvalidParameterException if the implementation does not support the specified constructorParameter.

supportsParameter

Added in API level 1
boolean supportsParameter (Object parameter)

Indicates whether this Service supports the specified constructor parameter.

Parameters
parameter Object: the parameter to test.
Returns
boolean true if this Service supports the specified constructor parameter, false otherwise.

toString

Added in API level 1
String toString ()

Returns a string containing a concise, human-readable description of this Service.

Returns
String a printable representation for this Service.
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.