gnu.crypto.auth.callback

Class Engine


(package private) final class Engine
extends Object

Generic implementation of the getInstance methods in the various engine classes in java.security.

These classes (Signature for example) can be thought of as the "chrome, upholstery, and steering wheel", and the SPI (service provider interface, e.g. SignatureSpi) classes can be thought of as the "engine" -- providing the actual functionality of whatever cryptographic algorithm the instance represents.

Author:
Casey Marshall
See Also:
Provider

Method Summary

(package private) static Object
getInstance(String service, String algorithm, Provider provider)
Get the implementation for algorithm for service service from provider.
(package private) static Object
getInstance(String service, String algorithm, Provider provider, Object[] initArgs)
Get the implementation for algorithm for service service from provider, passing initArgs to the SPI class's constructor (which cannot be null; pass a zero-length array if the SPI takes no arguments).

Method Details

getInstance

(package private) static Object getInstance(String service,
                                            String algorithm,
                                            Provider provider)
            throws InvocationTargetException,
                   NoSuchAlgorithmException
Get the implementation for algorithm for service service from provider. The service is e.g. "Signature", and the algorithm "DSA".
Parameters:
service - The service name.
algorithm - The name of the algorithm to get.
provider - The provider to get the implementation from.
Returns:
The engine class for the specified algorithm; the object returned is typically a subclass of the SPI class for that service, but callers should check that this is so.

getInstance

(package private) static Object getInstance(String service,
                                            String algorithm,
                                            Provider provider,
                                            Object[] initArgs)
            throws InvocationTargetException,
                   NoSuchAlgorithmException
Get the implementation for algorithm for service service from provider, passing initArgs to the SPI class's constructor (which cannot be null; pass a zero-length array if the SPI takes no arguments). The service is e.g. "Signature", and the algorithm "DSA".
Parameters:
service - The service name.
algorithm - The name of the algorithm to get.
provider - The provider to get the implementation from.
initArgs - The arguments to pass to the SPI class's constructor (cannot be null).
Returns:
The engine class for the specified algorithm; the object returned is typically a subclass of the SPI class for that service, but callers should check that this is so.

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.