.
Instances of this class represent a secure socket protocol
implementation which acts as a factory for secure socket
factories. This class is initialized with an optional set of
key and trust managers and source of secure random bytes.
| Method from com.sun.net.ssl.SSLContext Detail: |
public static SSLContext getInstance(String protocol) throws NoSuchAlgorithmException {
try {
Object[] objs = SSLSecurity.getImpl(protocol, "SSLContext",
(String) null);
return new SSLContext((SSLContextSpi)objs[0], (Provider)objs[1],
protocol);
} catch (NoSuchProviderException e) {
throw new NoSuchAlgorithmException(protocol + " not found");
}
} Deprecated!Generates a SSLContext object that implements the
specified secure socket protocol. |
public static SSLContext getInstance(String protocol,
String provider) throws NoSuchProviderException, NoSuchAlgorithmException {
if (provider == null || provider.length() == 0)
throw new IllegalArgumentException("missing provider");
Object[] objs = SSLSecurity.getImpl(protocol, "SSLContext",
provider);
return new SSLContext((SSLContextSpi)objs[0], (Provider)objs[1],
protocol);
} Deprecated!Generates a SSLContext object that implements the
specified secure socket protocol. |
public static SSLContext getInstance(String protocol,
Provider provider) throws NoSuchAlgorithmException {
if (provider == null)
throw new IllegalArgumentException("missing provider");
Object[] objs = SSLSecurity.getImpl(protocol, "SSLContext",
provider);
return new SSLContext((SSLContextSpi)objs[0], (Provider)objs[1],
protocol);
} Deprecated!Generates a SSLContext object that implements the
specified secure socket protocol. |
public final String getProtocol() {
return this.protocol;
} Deprecated!Returns the protocol name of this SSLContext object.
This is the same name that was specified in one of the
getInstance calls that created this
SSLContext object. |
public final Provider getProvider() {
return this.provider;
} Deprecated!Returns the provider of this SSLContext object. |
public final SSLServerSocketFactory getServerSocketFactory() {
return contextSpi.engineGetServerSocketFactory();
} Deprecated!Returns a ServerSocketFactory object for
this context. |
public final SSLSocketFactory getSocketFactory() {
return contextSpi.engineGetSocketFactory();
} Deprecated!Returns a SocketFactory object for this
context. |
public final void init(KeyManager[] km,
TrustManager[] tm,
SecureRandom random) throws KeyManagementException {
contextSpi.engineInit(km, tm, random);
} Deprecated!Initializes this context. Either of the first two parameters
may be null in which case the installed security providers will
be searched for the highest priority implementation of the
appropriate factory. Likewise, the secure random parameter may
be null in which case the default implementation will be used. |