com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig Java Examples
The following examples show how to use
com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HttpClient.java From ob1k with Apache License 2.0 | 5 votes |
private static NettyAsyncHttpProviderConfig createConfig() { final NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig(); final NioClientSocketChannelFactory channelFactory = new NioClientSocketChannelFactory(); nettyConfig.setSocketChannelFactory(channelFactory); nettyConfig.setChunkedFileChunkSize(CHUNKED_FILE_CHUNK_SIZE); final HashedWheelTimer timer = new HashedWheelTimer(); timer.start(); nettyConfig.setNettyTimer(timer); registerShutdownHook(channelFactory, timer); return nettyConfig; }