javax.net.ssl
Class TrustManagerFactory
java.lang.Object
javax.net.ssl.TrustManagerFactory
public class TrustManagerFactory
extends java.lang.Object
A factory for creating trust manager objects.
String | getAlgorithm() - Returns the name of this trust manager algorithm.
|
static String | getDefaultAlgorithm() - Returns the default algorithm for trust manager factories.
|
static TrustManagerFactory | getInstance(String algorithm) - Returns an instance of a trust manager factory for the given algorithm
from the first provider that implements it.
|
static TrustManagerFactory | getInstance(String algorithm, Provider provider) - Returns an instance of a trust manager factory for the given algorithm
from the specified provider.
|
static TrustManagerFactory | getInstance(String algorithm, String provider) - Returns an instance of a trust manager factory for the given algorithm
from the named provider.
|
Provider | getProvider() - Returns the provider of the underlying implementation.
|
TrustManager[] | getTrustManagers() - Returns the trust managers created by this factory.
|
void | init(KeyStore store) - Initialize this instance with a key store.
|
void | init(ManagerFactoryParameters params) - Initialize this instance with some algorithm-specific parameters.
|
TrustManagerFactory
protected TrustManagerFactory(TrustManagerFactorySpi tmfSpi,
Provider provider,
String algorithm)
Creates a new trust manager factory.
tmfSpi
- The underlying engine class.provider
- The provider of the engine class.algorithm
- The trust manager algorithm name.
getAlgorithm
public final String getAlgorithm()
Returns the name of this trust manager algorithm.
getDefaultAlgorithm
public static final String getDefaultAlgorithm()
Returns the default algorithm for trust manager factories. The value
returned is either the value of the security property
"ssl.TrustManagerFactory.algorithm" if it is set, or the value "JessieX509"
if not.
- The default algorithm name.
Security.getProperty(java.lang.String)
getInstance
public static final TrustManagerFactory getInstance(String algorithm)
throws NoSuchAlgorithmException
Returns an instance of a trust manager factory for the given algorithm
from the first provider that implements it.
algorithm
- The name of the algorithm to get.
- The instance of the trust manager factory.
getInstance
public static final TrustManagerFactory getInstance(String algorithm,
Provider provider)
throws NoSuchAlgorithmException
Returns an instance of a trust manager factory for the given algorithm
from the specified provider.
algorithm
- The name of the algorithm to get.provider
- The provider to get the instance from.
- The instance of the trust manager factory.
getInstance
public static final TrustManagerFactory getInstance(String algorithm,
String provider)
throws NoSuchAlgorithmException,
NoSuchProviderException
Returns an instance of a trust manager factory for the given algorithm
from the named provider.
algorithm
- The name of the algorithm to get.provider
- The name of the provider to get the instance from.
- The instance of the trust manager factory.
getProvider
public final Provider getProvider()
Returns the provider of the underlying implementation.
getTrustManagers
public final TrustManager[] getTrustManagers()
Returns the trust managers created by this factory.
init
public final void init(KeyStore store)
throws KeyStoreException
Initialize this instance with a key store. The key store may be null,
in which case a default will be used.
init
public final void init(ManagerFactoryParameters params)
throws InvalidAlgorithmParameterException
Initialize this instance with some algorithm-specific parameters.