public class NettyAsyncHttpProvider extends org.jboss.netty.channel.SimpleChannelUpstreamHandler implements AsyncHttpProvider
Constructor and Description |
---|
NettyAsyncHttpProvider(AsyncHttpClientConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the current underlying TCP/HTTP connection.
|
<T> ListenableFuture<T> |
execute(Request request,
AsyncHandler<T> asyncHandler)
Execute the request and invoke the
AsyncHandler when the response arrive. |
void |
flushChannelPoolPartition(String partitionId) |
void |
flushChannelPoolPartitions(ChannelPoolPartitionSelector selector) |
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, exceptionCaught, handleUpstream, messageReceived, writeComplete
public NettyAsyncHttpProvider(AsyncHttpClientConfig config)
public void close()
AsyncHttpProvider
close
in interface AsyncHttpProvider
public <T> ListenableFuture<T> execute(Request request, AsyncHandler<T> asyncHandler) throws IOException
AsyncHttpProvider
AsyncHandler
when the response arrive.execute
in interface AsyncHttpProvider
asyncHandler
- an instance of AsyncHandler
ListenableFuture
of Type T.IOException
public void flushChannelPoolPartition(String partitionId)
public void flushChannelPoolPartitions(ChannelPoolPartitionSelector selector)
Copyright © 2014. All Rights Reserved.