java.lang.Object java.security.Provider$ServiceThe description of a security service. It encapsulates the properties of a service and contains a factory method to obtain new implementation instances of this service.
Each service has a provider that offers the service, a type, an algorithm name, and the name of the class that implements the service. Optionally, it also includes a list of alternate algorithm names for this service (aliases) and attributes, which are a map of (name, value) String pairs.
This class defines the methods supportsParameter() and newInstance() which are used by the Java security framework when it searches for suitable services and instantes them. The valid arguments to those methods depend on the type of service. For the service types defined within Java SE, see the Java Cryptography Architecture API Specification & Reference for the valid values. Note that components outside of Java SE can define additional types of services and their behavior.
Instances of this class are immutable.
public Service(Provider provider, String type, String algorithm, String className, List<String> aliases, Map<String, String> attributes)
|Method from java.security.Provider$Service Summary:|
|addAttribute, getAlgorithm, getAttribute, getClassName, getProvider, getType, newInstance, supportsParameter, toString|
|Methods from java.lang.Object:|
|clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait|
|Method from java.security.Provider$Service Detail:|
void addAttribute(String type, String value)
public final String getAlgorithm()
public final String getAttribute(String name)
public final String getClassName()
public final Provider getProvider()
public Object newInstance(Object constructorParameter) throws NoSuchAlgorithmException
The default implementation uses reflection to invoke the standard constructor for this type of service. Security providers can override this method to implement instantiation in a different way. For details and the values of constructorParameter that are valid for the various types of services see the Java Cryptography Architecture API Specification & Reference.
public boolean supportsParameter(Object parameter)
The security provider framework uses this method with some types of services to quickly exclude non-matching implementations for consideration. Applications will typically not need to call it.
For details and the values of parameter that are valid for the various types of services see the top of this class and the Java Cryptography Architecture API Specification & Reference. Security providers can override it to implement their own test.
public String toString()