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. SinceSSLContextis an abstract class and requires an instance ofSSLContextSpi, this class effectively wraps anSSLContextas 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:
engineCreateSSLEnginein classSSLContextSpi
-
engineCreateSSLEngine
protected SSLEngine engineCreateSSLEngine(String peerHost, int peerPort)
- Specified by:
engineCreateSSLEnginein classSSLContextSpi
-
engineGetClientSessionContext
protected SSLSessionContext engineGetClientSessionContext()
- Specified by:
engineGetClientSessionContextin classSSLContextSpi
-
engineGetServerSessionContext
protected SSLSessionContext engineGetServerSessionContext()
- Specified by:
engineGetServerSessionContextin classSSLContextSpi
-
engineGetServerSocketFactory
protected SSLServerSocketFactory engineGetServerSocketFactory()
- Specified by:
engineGetServerSocketFactoryin classSSLContextSpi
-
engineGetSocketFactory
protected SSLSocketFactory engineGetSocketFactory()
- Specified by:
engineGetSocketFactoryin classSSLContextSpi
-
engineInit
protected void engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws KeyManagementException
- Specified by:
engineInitin classSSLContextSpi- Throws:
KeyManagementException
-
getDelegate
protected SSLContext getDelegate()
-
configureSSLEngine
protected SSLEngine configureSSLEngine(SSLEngine engine)
Configures anSSLEnginebased on the configurers in instance. The return value from this method may beengineor it may be a decorated instance there of. Consequently, any subsequent actions onenginemust be performed using the returned value.- Parameters:
engine- the engine to configure- Returns:
engineor a decorated instance there of
-
configureSSLSocketFactory
protected SSLSocketFactory configureSSLSocketFactory(SSLSocketFactory factory)
Configures anSSLSocketFactorybased on the configurers in this instance. The return value from this method may befactoryor it may be a decorated instance there of. Consequently, any subsequent actions onfactorymust be performed using the returned value.- Parameters:
factory- the factory to configure- Returns:
factoryor a decorated instance there of
-
configureSSLServerSocketFactory
protected SSLServerSocketFactory configureSSLServerSocketFactory(SSLServerSocketFactory factory)
Configures anSSLServerSocketFactorybased on the configurers in this instance. The return value from this method may befactoryor it may be a decorated instance there of. Consequently, any subsequent actions onfactorymust be performed using the returned value.- Parameters:
factory- the factory to configure- Returns:
factoryor a decorated instance there of
-
-