Package org.asynchttpclient.netty.ssl
Class DefaultSslEngineFactory
- java.lang.Object
-
- org.asynchttpclient.netty.ssl.SslEngineFactoryBase
-
- org.asynchttpclient.netty.ssl.DefaultSslEngineFactory
-
- All Implemented Interfaces:
SslEngineFactory
public class DefaultSslEngineFactory extends SslEngineFactoryBase
-
-
Constructor Summary
Constructors Constructor Description DefaultSslEngineFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.netty.handler.ssl.SslContextBuilderconfigureSslContextBuilder(io.netty.handler.ssl.SslContextBuilder builder)The last step of configuring the SslContextBuilder used to create an SslContext when no context is provided in theAsyncHttpClientConfig.voiddestroy()Perform any necessary cleanup.voidinit(AsyncHttpClientConfig config)Perform any necessary one-time configuration.SSLEnginenewSslEngine(AsyncHttpClientConfig config, String peerHost, int peerPort)Creates a newSSLEngine.-
Methods inherited from class org.asynchttpclient.netty.ssl.SslEngineFactoryBase
configureSslEngine, domain
-
-
-
-
Method Detail
-
newSslEngine
public SSLEngine newSslEngine(AsyncHttpClientConfig config, String peerHost, int peerPort)
Description copied from interface:SslEngineFactoryCreates a newSSLEngine.- Parameters:
config- the client configpeerHost- the peer hostnamepeerPort- the peer port- Returns:
- new engine
-
init
public void init(AsyncHttpClientConfig config) throws SSLException
Description copied from interface:SslEngineFactoryPerform any necessary one-time configuration. This will be called just once beforenewSslEngineis called for the first time.- Parameters:
config- the client config- Throws:
SSLException- if initialization fails. If an exception is thrown, the instance will not be used as client creation will fail.
-
destroy
public void destroy()
Description copied from interface:SslEngineFactoryPerform any necessary cleanup.
-
configureSslContextBuilder
protected io.netty.handler.ssl.SslContextBuilder configureSslContextBuilder(io.netty.handler.ssl.SslContextBuilder builder)
The last step of configuring the SslContextBuilder used to create an SslContext when no context is provided in theAsyncHttpClientConfig. This defaults to no-op and is intended to be overridden as needed.- Parameters:
builder- builder with normal configuration applied- Returns:
- builder to be used to build context (can be the same object as the input)
-
-