Package org.apache.camel.support.jsse
Class BaseSSLContextParameters.SSLContextSpiDecorator
java.lang.Object
javax.net.ssl.SSLContextSpi
org.apache.camel.support.jsse.BaseSSLContextParameters.SSLContextSpiDecorator
- Enclosing class:
BaseSSLContextParameters
Class needed to provide decoration of an existing
SSLContext
. Since SSLContext
is an abstract
class and requires an instance of SSLContextSpi
, this class effectively wraps an SSLContext
as if
it were an SSLContextSpi
, allowing us to achieve decoration.-
Constructor Summary
ConstructorDescriptionSSLContextSpiDecorator
(SSLContext context, List<BaseSSLContextParameters.Configurer<SSLEngine>> sslEngineConfigurers, List<BaseSSLContextParameters.Configurer<SSLSocketFactory>> sslSocketFactoryConfigurers, List<BaseSSLContextParameters.Configurer<SSLServerSocketFactory>> sslServerSocketFactoryConfigurers) -
Method Summary
Modifier and TypeMethodDescriptionprotected SSLEngine
configureSSLEngine
(SSLEngine engine) Configures anSSLEngine
based on the configurers in instance.protected SSLServerSocketFactory
Configures anSSLServerSocketFactory
based on the configurers in this instance.protected SSLSocketFactory
Configures anSSLSocketFactory
based on the configurers in this instance.protected SSLEngine
protected SSLEngine
engineCreateSSLEngine
(String peerHost, int peerPort) protected SSLSessionContext
protected SSLSessionContext
protected SSLServerSocketFactory
protected SSLSocketFactory
protected void
engineInit
(KeyManager[] km, TrustManager[] tm, SecureRandom random) protected SSLContext
Methods inherited from class javax.net.ssl.SSLContextSpi
engineGetDefaultSSLParameters, engineGetSupportedSSLParameters
-
Constructor Details
-
SSLContextSpiDecorator
public SSLContextSpiDecorator(SSLContext context, List<BaseSSLContextParameters.Configurer<SSLEngine>> sslEngineConfigurers, List<BaseSSLContextParameters.Configurer<SSLSocketFactory>> sslSocketFactoryConfigurers, List<BaseSSLContextParameters.Configurer<SSLServerSocketFactory>> sslServerSocketFactoryConfigurers)
-
-
Method Details
-
engineCreateSSLEngine
- Specified by:
engineCreateSSLEngine
in classSSLContextSpi
-
engineCreateSSLEngine
- Specified by:
engineCreateSSLEngine
in classSSLContextSpi
-
engineGetClientSessionContext
- Specified by:
engineGetClientSessionContext
in classSSLContextSpi
-
engineGetServerSessionContext
- Specified by:
engineGetServerSessionContext
in classSSLContextSpi
-
engineGetServerSocketFactory
- Specified by:
engineGetServerSocketFactory
in classSSLContextSpi
-
engineGetSocketFactory
- Specified by:
engineGetSocketFactory
in classSSLContextSpi
-
engineInit
protected void engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws KeyManagementException - Specified by:
engineInit
in classSSLContextSpi
- Throws:
KeyManagementException
-
getDelegate
-
configureSSLEngine
Configures anSSLEngine
based on the configurers in instance. The return value from this method may beengine
or it may be a decorated instance there of. Consequently, any subsequent actions onengine
must be performed using the returned value.- Parameters:
engine
- the engine to configure- Returns:
engine
or a decorated instance there of
-
configureSSLSocketFactory
Configures anSSLSocketFactory
based on the configurers in this instance. The return value from this method may befactory
or it may be a decorated instance there of. Consequently, any subsequent actions onfactory
must be performed using the returned value.- Parameters:
factory
- the factory to configure- Returns:
factory
or a decorated instance there of
-
configureSSLServerSocketFactory
Configures anSSLServerSocketFactory
based on the configurers in this instance. The return value from this method may befactory
or it may be a decorated instance there of. Consequently, any subsequent actions onfactory
must be performed using the returned value.- Parameters:
factory
- the factory to configure- Returns:
factory
or a decorated instance there of
-