use of com.linkedin.r2.netty.client.http2.Http2ChannelPoolFactory in project rest.li by linkedin.
the class ChannelPoolManagerFactoryImpl method buildHttp2Stream.
@Override
public ChannelPoolManager buildHttp2Stream(ChannelPoolManagerKey channelPoolManagerKey) {
DefaultChannelGroup channelGroup = new DefaultChannelGroup("R2 client channels", _eventLoopGroup.next());
ChannelPoolFactory channelPoolFactory;
if (_usePipelineV2) {
channelPoolFactory = new Http2ChannelPoolFactory(_scheduler, _eventLoopGroup, channelGroup, channelPoolManagerKey.getStrategy(), channelPoolManagerKey.getSslContext(), channelPoolManagerKey.getSslParameters(), channelPoolManagerKey.getMaxPoolSize(), channelPoolManagerKey.getMinPoolSize(), channelPoolManagerKey.getPoolWaiterSize(), MAX_INITIAL_LINE_LENGTH, channelPoolManagerKey.getMaxHeaderSize(), channelPoolManagerKey.getMaxChunkSize(), channelPoolManagerKey.getIdleTimeout(), channelPoolManagerKey.getMaxResponseSize(), channelPoolManagerKey.isTcpNoDelay(), _enableSSLSessionResumption, _connectTimeout, _sslHandShakeTimeout);
} else {
channelPoolFactory = new Http2NettyStreamChannelPoolFactory(channelPoolManagerKey.getIdleTimeout(), channelPoolManagerKey.getPoolWaiterSize(), channelPoolManagerKey.getMinPoolSize(), channelPoolManagerKey.isTcpNoDelay(), _scheduler, channelPoolManagerKey.getSslContext(), channelPoolManagerKey.getSslParameters(), channelPoolManagerKey.getGracefulShutdownTimeout(), channelPoolManagerKey.getMaxHeaderSize(), channelPoolManagerKey.getMaxChunkSize(), channelPoolManagerKey.getMaxResponseSize(), _enableSSLSessionResumption, _eventLoopGroup, channelGroup, _connectTimeout, _sslHandShakeTimeout);
}
return new ChannelPoolManagerImpl(channelPoolFactory, channelPoolManagerKey.getName() + "-HTTP/2-Stream", channelGroup, _scheduler);
}
Aggregations