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.
TrustManagerFactory
protected TrustManagerFactory(javax.net.ssl.TrustManagerFactorySpi tmfSpi, Provider provider, String algorithm)
Creates a new trust manager factory.
Parameters:
getAlgorithm
public final String getAlgorithm()
Returns the name of this trust manager algorithm.
Returns:
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.
Returns:
- The default algorithm name.
See Also:
getInstance
public static final TrustManagerFactory getInstance(String algorithm)
Returns an instance of a trust manager factory for the given algorithm
from the first provider that implements it.
Parameters:
Returns:
- The instance of the trust manager factory.
Throws:
- If no provider implements the given
algorithm.
getInstance
public static final TrustManagerFactory getInstance(String algorithm, Provider provider)
Returns an instance of a trust manager factory for the given algorithm
from the specified provider.
Parameters:
Returns:
- The instance of the trust manager factory.
Throws:
- If the provider does not implement the
given algorithm.
- If the provider argument is null.
getInstance
public static final TrustManagerFactory getInstance(String algorithm, String provider)
Returns an instance of a trust manager factory for the given algorithm
from the named provider.
Parameters:
Returns:
- The instance of the trust manager factory.
Throws:
- If the provider does not implement the
given algorithm.
- If there is no such named provider.
- If the provider argument is null.
getProvider
public final Provider getProvider()
Returns the provider of the underlying implementation.
Returns:
getTrustManagers
public final TrustManager[] getTrustManagers()
Returns the trust managers created by this factory.
Returns:
init
public final void init(KeyStore store)
Initialize this instance with a key store. The key store may be null,
in which case a default will be used.
Parameters:
Throws:
- If there is a problem reading from the
key store.
init
public final void init(javax.net.ssl.ManagerFactoryParameters params)
Initialize this instance with some algorithm-specific parameters.
Parameters:
Throws:
- If the supplied parameters
are inappropriate for this instance.