class MinimalClientExchangeHandlerImpl<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 org.apache.http.protocol.HttpProcessor |
httpProcessor |
private org.apache.http.client.protocol.HttpClientContext |
localContext |
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 |
log
Constructor and Description |
---|
MinimalClientExchangeHandlerImpl(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.protocol.HttpProcessor httpProcessor,
org.apache.http.ConnectionReuseStrategy connReuseStrategy,
org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy) |
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.client.protocol.HttpClientContext localContext
private final org.apache.http.concurrent.BasicFuture<T> resultFuture
private final org.apache.http.protocol.HttpProcessor httpProcessor
public MinimalClientExchangeHandlerImpl(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.protocol.HttpProcessor httpProcessor, org.apache.http.ConnectionReuseStrategy connReuseStrategy, org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy)
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()