Class HttpAsyncRequestExecutor

java.lang.Object
org.apache.http.nio.protocol.HttpAsyncRequestExecutor
All Implemented Interfaces:
NHttpClientEventHandler

@Contract(threading=IMMUTABLE_CONDITIONAL) public class HttpAsyncRequestExecutor extends Object implements NHttpClientEventHandler
HttpAsyncRequestExecutor is a fully asynchronous HTTP client side protocol handler based on the NIO (non-blocking) I/O model. HttpAsyncRequestExecutor translates individual events fired through the NHttpClientEventHandler interface into logically related HTTP message exchanges.

The caller is expected to pass an instance of HttpAsyncClientExchangeHandler to be used for the next series of HTTP message exchanges through the connection context using HTTP_HANDLER attribute. HTTP exchange sequence is considered complete when the HttpAsyncClientExchangeHandler.isDone() method returns true. The HttpAsyncRequester utility class can be used to facilitate initiation of asynchronous HTTP request execution.

Individual HttpAsyncClientExchangeHandler are expected to make use of a HttpProcessor to generate mandatory protocol headers for all outgoing messages and apply common, cross-cutting message transformations to all incoming and outgoing messages. HttpAsyncClientExchangeHandlers can delegate implementation of application specific content generation and processing to a HttpAsyncRequestProducer and a HttpAsyncResponseConsumer.

Since:
4.2
See Also: