javax.net.ssl

Class SSLContextSpi

public abstract class SSLContextSpi extends Object

The Service Provider Interface (SPI) for SSLContext objects.
Constructor Summary
SSLContextSpi()
Create a new SSLContextSpi.
Method Summary
protected abstract SSLEngineengineCreateSSLEngine()
Returns a new {@link SSLEngine} for this context.
protected abstract SSLEngineengineCreateSSLEngine(String host, int port)
Returns a new {@link SSLEngine} for this context, for the given host name and port number.
protected abstract SSLSessionContextengineGetClientSessionContext()
Returns the set of SSL sessions available for client connections.
protected abstract SSLSessionContextengineGetServerSessionContext()
Returns the set of SSL sessions available for server connections.
protected abstract SSLServerSocketFactoryengineGetServerSocketFactory()
Returns the SSL server socket factory.
protected abstract SSLSocketFactoryengineGetSocketFactory()
Returns the SSL client socket factory.
protected abstract voidengineInit(KeyManager[] keyManagers, TrustManager[] trustManagers, SecureRandom random)
Initialize this context with key and trust managers, and a source of randomness.

Constructor Detail

SSLContextSpi

public SSLContextSpi()
Create a new SSLContextSpi.

Method Detail

engineCreateSSLEngine

protected abstract SSLEngine engineCreateSSLEngine()
Returns a new {@link SSLEngine} for this context.

Returns: A new SSLEngine.

Since: 1.5

engineCreateSSLEngine

protected abstract SSLEngine engineCreateSSLEngine(String host, int port)
Returns a new {@link SSLEngine} for this context, for the given host name and port number.

Parameters: host The local host name. port The local port number.

Returns: A new SSLEngine.

Since: 1.5

engineGetClientSessionContext

protected abstract SSLSessionContext engineGetClientSessionContext()
Returns the set of SSL sessions available for client connections.

Returns: The set of SSL sessions available for client connections.

engineGetServerSessionContext

protected abstract SSLSessionContext engineGetServerSessionContext()
Returns the set of SSL sessions available for server connections.

Returns: The set of SSL sessions available for server connections.

engineGetServerSocketFactory

protected abstract SSLServerSocketFactory engineGetServerSocketFactory()
Returns the SSL server socket factory.

Returns: The SSL server socket factory.

engineGetSocketFactory

protected abstract SSLSocketFactory engineGetSocketFactory()
Returns the SSL client socket factory.

Returns: The SSL client socket factory.

engineInit

protected abstract void engineInit(KeyManager[] keyManagers, TrustManager[] trustManagers, SecureRandom random)
Initialize this context with key and trust managers, and a source of randomness. All of the parameters are optional.

Parameters: keyManagers The set of key managers. trustManagers The set of trust managers. random The source of randomness.

Throws: KeyManagementException If this context cannot be initialized with these parameters.