Search in sources :

Example 1 with HttpChannelPoolFactory

use of com.linkedin.r2.netty.client.http.HttpChannelPoolFactory in project rest.li by linkedin.

the class ChannelPoolManagerFactoryImpl method buildStream.

@Override
public ChannelPoolManager buildStream(ChannelPoolManagerKey channelPoolManagerKey) {
    DefaultChannelGroup channelGroup = new DefaultChannelGroup("R2 client channels", _eventLoopGroup.next());
    ChannelPoolFactory channelPoolFactory;
    if (_usePipelineV2) {
        channelPoolFactory = new HttpChannelPoolFactory(_scheduler, _eventLoopGroup, channelGroup, channelPoolManagerKey.getStrategy(), channelPoolManagerKey.getSslContext(), channelPoolManagerKey.getSslParameters(), channelPoolManagerKey.getMaxPoolSize(), channelPoolManagerKey.getMinPoolSize(), channelPoolManagerKey.getPoolWaiterSize(), MAX_INITIAL_LINE_LENGTH, channelPoolManagerKey.getMaxHeaderSize(), channelPoolManagerKey.getMaxChunkSize(), channelPoolManagerKey.getMaxConcurrentConnectionInitializations(), channelPoolManagerKey.getIdleTimeout(), channelPoolManagerKey.getMaxResponseSize(), channelPoolManagerKey.isTcpNoDelay(), _enableSSLSessionResumption, _channelPoolWaiterTimeout, _connectTimeout, _sslHandShakeTimeout);
    } else {
        channelPoolFactory = new HttpNettyStreamChannelPoolFactory(channelPoolManagerKey.getMaxPoolSize(), channelPoolManagerKey.getIdleTimeout(), channelPoolManagerKey.getPoolWaiterSize(), channelPoolManagerKey.getStrategy(), channelPoolManagerKey.getMinPoolSize(), channelPoolManagerKey.isTcpNoDelay(), _scheduler, channelPoolManagerKey.getMaxConcurrentConnectionInitializations(), channelPoolManagerKey.getSslContext(), channelPoolManagerKey.getSslParameters(), channelPoolManagerKey.getMaxHeaderSize(), channelPoolManagerKey.getMaxChunkSize(), channelPoolManagerKey.getMaxResponseSize(), _enableSSLSessionResumption, _eventLoopGroup, channelGroup, _channelPoolWaiterTimeout, _connectTimeout, _sslHandShakeTimeout);
    }
    return new ChannelPoolManagerImpl(channelPoolFactory, channelPoolManagerKey.getName() + "-Stream", channelGroup, _scheduler);
}
Also used : DefaultChannelGroup(io.netty.channel.group.DefaultChannelGroup) HttpNettyStreamChannelPoolFactory(com.linkedin.r2.transport.http.client.stream.http.HttpNettyStreamChannelPoolFactory) HttpChannelPoolFactory(com.linkedin.r2.netty.client.http.HttpChannelPoolFactory) Http2NettyStreamChannelPoolFactory(com.linkedin.r2.transport.http.client.stream.http2.Http2NettyStreamChannelPoolFactory) Http2ChannelPoolFactory(com.linkedin.r2.netty.client.http2.Http2ChannelPoolFactory) HttpNettyChannelPoolFactory(com.linkedin.r2.transport.http.client.rest.HttpNettyChannelPoolFactory) HttpChannelPoolFactory(com.linkedin.r2.netty.client.http.HttpChannelPoolFactory) HttpNettyStreamChannelPoolFactory(com.linkedin.r2.transport.http.client.stream.http.HttpNettyStreamChannelPoolFactory)

Aggregations

HttpChannelPoolFactory (com.linkedin.r2.netty.client.http.HttpChannelPoolFactory)1 Http2ChannelPoolFactory (com.linkedin.r2.netty.client.http2.Http2ChannelPoolFactory)1 HttpNettyChannelPoolFactory (com.linkedin.r2.transport.http.client.rest.HttpNettyChannelPoolFactory)1 HttpNettyStreamChannelPoolFactory (com.linkedin.r2.transport.http.client.stream.http.HttpNettyStreamChannelPoolFactory)1 Http2NettyStreamChannelPoolFactory (com.linkedin.r2.transport.http.client.stream.http2.Http2NettyStreamChannelPoolFactory)1 DefaultChannelGroup (io.netty.channel.group.DefaultChannelGroup)1