Class AsyncNHttpClientHandler

java.lang.Object
org.apache.http.nio.protocol.NHttpHandlerBase
org.apache.http.nio.protocol.AsyncNHttpClientHandler
All Implemented Interfaces:
NHttpClientHandler

@Deprecated @Contract(threading=IMMUTABLE_CONDITIONAL) public class AsyncNHttpClientHandler extends NHttpHandlerBase implements NHttpClientHandler
Deprecated.
Fully asynchronous HTTP client side protocol handler that implements the essential requirements of the HTTP protocol for the server side message processing as described by RFC 2616. It is capable of executing HTTP requests with nearly constant memory footprint. Only HTTP message heads are stored in memory, while content of message bodies is streamed directly from the entity to the underlying channel (and vice versa) using ConsumingNHttpEntity and ProducingNHttpEntity interfaces. When using this implementation, it is important to ensure that entities supplied for writing implement ProducingNHttpEntity. Doing so will allow the entity to be written out asynchronously. If entities supplied for writing do not implement the ProducingNHttpEntity interface, a delegate is added that buffers the entire contents in memory. Additionally, the buffering might take place in the I/O dispatch thread, which could cause I/O to block temporarily. For best results, one must ensure that all entities set on HttpRequests from NHttpRequestExecutionHandler implement ProducingNHttpEntity. If incoming responses enclose a content entity, NHttpRequestExecutionHandler are expected to return a ConsumingNHttpEntity for reading the content. After the entity is finished reading the data, NHttpRequestExecutionHandler.handleResponse(HttpResponse, HttpContext) method is called to process the response.

The following parameters can be used to customize the behavior of this class:

Since:
4.0