| Constructor and Description |
|---|
Service(Provider provider,
String type,
String algorithm,
String className,
List<String> aliases,
Map<String,String> attributes)
Constructs a new instance of
Service with the given
attributes. |
| Modifier and Type | Method and Description |
|---|---|
String |
getAlgorithm()
Returns the name of the algorithm implemented by this
Service. |
String |
getAttribute(String name)
Returns the value of the attribute with the specified
name. |
String |
getClassName()
Returns the name of the class implementing this
Service. |
Provider |
getProvider()
Returns the
Provider this Service belongs to. |
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. |
public Service(Provider provider, String type, String algorithm, String className, List<String> aliases, Map<String,String> attributes)
Service with the given
attributes.provider - the provider to which this service belongs.type - the type of this service (for example KeyPairGenerator).algorithm - the algorithm this service implements.className - the name of the class implementing this service.aliases - List of aliases for the algorithm name, or null if the implemented algorithm has no aliases.attributes - Map of additional attributes, or null if
this Service has no attributed.NullPointerException - if provider, type, algorithm or className
is null.public final String getType()
Service. For example KeyPairGenerator.Service.public final String getAlgorithm()
Service.Service.public final Provider getProvider()
Provider this Service belongs to.Provider this Service belongs to.public final String getClassName()
Service.Service.public final String getAttribute(String name)
name.name - the name of the attribute.null if no attribute
with the given name is set.NullPointerException - if name is null.public Object newInstance(Object constructorParameter) throws NoSuchAlgorithmException
Service.constructorParameter - the parameter that is used by the constructor, or null if the implementation does not declare a constructor
parameter.Service.NoSuchAlgorithmException - if the instance could not be constructed.InvalidParameterException - if the implementation does not support the specified
constructorParameter.public boolean supportsParameter(Object parameter)
Service supports the specified
constructor parameter.parameter - the parameter to test.true if this Service supports the specified
constructor parameter, false otherwise.