HttpAsyncService is a fully asynchronous HTTP server side protocol handler based on the non-blocking (NIO) I/O model.
HttpAsyncServerProtocolHandler translates individual events fired through the {@link NHttpServerEventHandler} interface into logically relatedHTTP message exchanges.
Upon receiving an incoming request
HttpAsyncService verifies the message for compliance with the server expectations using {@link HttpAsyncExpectationVerifier}, if provided, and then {@link HttpAsyncRequestHandlerMapper} is used to map the requestto a particular {@link HttpAsyncRequestHandler} intended to handlethe request with the given URI. The protocol handler uses the selected {@link HttpAsyncRequestHandler} instance to process the incoming requestand to generate an outgoing response.
HttpAsyncService relies on {@link HttpProcessor} to generatemandatory protocol headers for all outgoing messages and apply common, cross-cutting message transformations to all incoming and outgoing messages, whereas individual {@link HttpAsyncRequestHandler}s are expected to implement application specific content generation and processing.
Individual {@link HttpAsyncRequestHandler}s do not have to submit a response immediately. They can defer transmission of an HTTP response back to the client without blocking the I/O thread by delegating the process of request handling to another service or a worker thread. HTTP response can be submitted as a later a later point of time once response content becomes available.
@since 4.2