class DefaultClientExchangeHandlerImpl<T> extends AbstractClientExchangeHandler
HttpAsyncClientExchangeHandler
.
Instances of this class are expected to be accessed by one thread at a time only.
The AbstractClientExchangeHandler.cancel()
method can be called concurrently by multiple threads.
Modifier and Type | Field and Description |
---|---|
private InternalClientExec |
exec |
private org.apache.http.nio.protocol.HttpAsyncRequestProducer |
requestProducer |
private org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> |
responseConsumer |
private org.apache.http.concurrent.BasicFuture<T> |
resultFuture |
private InternalState |
state |
log
Constructor and Description |
---|
DefaultClientExchangeHandlerImpl(org.apache.commons.logging.Log log,
org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer,
org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer,
org.apache.http.client.protocol.HttpClientContext localContext,
org.apache.http.concurrent.BasicFuture<T> resultFuture,
NHttpClientConnectionManager connmgr,
org.apache.http.ConnectionReuseStrategy connReuseStrategy,
org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy,
InternalClientExec exec) |
Modifier and Type | Method and Description |
---|---|
void |
abortConnection() |
void |
consumeContent(org.apache.http.nio.ContentDecoder decoder,
org.apache.http.nio.IOControl ioctrl) |
(package private) boolean |
executionCancelled() |
(package private) void |
executionFailed(java.lang.Exception ex) |
org.apache.http.HttpRequest |
generateRequest() |
void |
inputTerminated() |
void |
produceContent(org.apache.http.nio.ContentEncoder encoder,
org.apache.http.nio.IOControl ioctrl) |
(package private) void |
releaseResources() |
void |
requestCompleted() |
void |
responseCompleted() |
void |
responseReceived(org.apache.http.HttpResponse response) |
void |
start() |
cancel, close, discardConnection, failed, getActualRoute, getConnection, getCurrentRequest, getCurrentResponse, getId, getRoute, isCompleted, isDone, isRouteEstablished, manageConnectionPersistence, markCompleted, markConnectionNonReusable, onRouteComplete, onRouteToProxy, onRouteToTarget, onRouteTunnelToTarget, onRouteUpgrade, releaseConnection, requestConnection, setCurrentRequest, setCurrentResponse, setRoute, verifytRoute
private final org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer
private final org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer
private final org.apache.http.concurrent.BasicFuture<T> resultFuture
private final InternalClientExec exec
private final InternalState state
public DefaultClientExchangeHandlerImpl(org.apache.commons.logging.Log log, org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, org.apache.http.client.protocol.HttpClientContext localContext, org.apache.http.concurrent.BasicFuture<T> resultFuture, NHttpClientConnectionManager connmgr, org.apache.http.ConnectionReuseStrategy connReuseStrategy, org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy, InternalClientExec exec)
void releaseResources()
releaseResources
in class AbstractClientExchangeHandler
void executionFailed(java.lang.Exception ex)
executionFailed
in class AbstractClientExchangeHandler
boolean executionCancelled()
executionCancelled
in class AbstractClientExchangeHandler
public void start() throws org.apache.http.HttpException, java.io.IOException
org.apache.http.HttpException
java.io.IOException
public org.apache.http.HttpRequest generateRequest() throws java.io.IOException, org.apache.http.HttpException
java.io.IOException
org.apache.http.HttpException
public void produceContent(org.apache.http.nio.ContentEncoder encoder, org.apache.http.nio.IOControl ioctrl) throws java.io.IOException
java.io.IOException
public void requestCompleted()
public void responseReceived(org.apache.http.HttpResponse response) throws java.io.IOException, org.apache.http.HttpException
java.io.IOException
org.apache.http.HttpException
public void consumeContent(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl) throws java.io.IOException
java.io.IOException
public void responseCompleted() throws java.io.IOException, org.apache.http.HttpException
java.io.IOException
org.apache.http.HttpException
public void inputTerminated()
public void abortConnection()