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
protected static final class BaseSSLContextParameters.SSLContextSpiDecorator extends SSLContextSpi
Class needed to provide decoration of an existingSSLContext
. SinceSSLContext
is an abstract class and requires an instance ofSSLContextSpi
, this class effectively wraps anSSLContext
as if it were anSSLContextSpi
, allowing us to achieve decoration.
-
-
Constructor Summary
Constructors Constructor Description SSLContextSpiDecorator(SSLContext context, List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLEngine>> sslEngineConfigurers, List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLSocketFactory>> sslSocketFactoryConfigurers, List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLServerSocketFactory>> sslServerSocketFactoryConfigurers)
-
Method Summary
-
Methods inherited from class javax.net.ssl.SSLContextSpi
engineGetDefaultSSLParameters, engineGetSupportedSSLParameters
-
-
-
-
Constructor Detail
-
SSLContextSpiDecorator
public SSLContextSpiDecorator(SSLContext context, List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLEngine>> sslEngineConfigurers, List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLSocketFactory>> sslSocketFactoryConfigurers, List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLServerSocketFactory>> sslServerSocketFactoryConfigurers)
-
-
Method Detail
-
engineCreateSSLEngine
protected SSLEngine engineCreateSSLEngine()
- Specified by:
engineCreateSSLEngine
in classSSLContextSpi
-
engineCreateSSLEngine
protected SSLEngine engineCreateSSLEngine(String peerHost, int peerPort)
- Specified by:
engineCreateSSLEngine
in classSSLContextSpi
-
engineGetClientSessionContext
protected SSLSessionContext engineGetClientSessionContext()
- Specified by:
engineGetClientSessionContext
in classSSLContextSpi
-
engineGetServerSessionContext
protected SSLSessionContext engineGetServerSessionContext()
- Specified by:
engineGetServerSessionContext
in classSSLContextSpi
-
engineGetServerSocketFactory
protected SSLServerSocketFactory engineGetServerSocketFactory()
- Specified by:
engineGetServerSocketFactory
in classSSLContextSpi
-
engineGetSocketFactory
protected SSLSocketFactory 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
protected SSLContext getDelegate()
-
configureSSLEngine
protected SSLEngine configureSSLEngine(SSLEngine engine)
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
protected SSLSocketFactory configureSSLSocketFactory(SSLSocketFactory factory)
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
protected SSLServerSocketFactory configureSSLServerSocketFactory(SSLServerSocketFactory factory)
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
-
-