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 {@link NHttpClientEventHandler} interface into logically related HTTPmessage exchanges.
The caller is expected to pass an instance of {@link HttpAsyncClientExchangeHandler} to be used for the next seriesof HTTP message exchanges through the connection context using {@link #HTTP_HANDLER} attribute. HTTP exchange sequence is consideredcomplete when the {@link HttpAsyncClientExchangeHandler#isDone()} methodreturns
true
. The {@link HttpAsyncRequester} utility class canbe used to facilitate initiation of asynchronous HTTP request execution.
Individual
HttpAsyncClientExchangeHandler are expected to make use of a {@link org.apache.http.protocol.HttpProcessor} to generate mandatory protocolheaders 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 {@link HttpAsyncRequestProducer} and a {@link HttpAsyncResponseConsumer}.
@see HttpAsyncClientExchangeHandler
@since 4.2