this.nettyConfig = nettyConfig;
this.sslEngineFactory = nettyConfig.getSslEngineFactory() != null? nettyConfig.getSslEngineFactory() : new SSLEngineFactory.DefaultSSLEngineFactory(config);
ChannelPool channelPool = nettyConfig.getChannelPool();
if (channelPool == null && config.isAllowPoolingConnections()) {
channelPool = new DefaultChannelPool(config, nettyTimer);
} else if (channelPool == null) {
channelPool = new NoopChannelPool();
}
this.channelPool = channelPool;