public interface HttpAsyncRequestHandler<T>
HttpAsyncRequestHandlerrepresents a routine for asynchronous processing of a specific group of non-blocking HTTP requests. Protocol handlers are designed to take care of protocol specific aspects, whereas individual request handlers are expected to take care of application specific HTTP processing. The main purpose of a request handler is to generate a response object with a content entity to be sent back to the client in response to the given request.
|Modifier and Type||Method and Description|
Triggered to complete request processing and to initiate the process of generating a response.
Triggered when an incoming request is received.
HttpAsyncRequestConsumer<T> processRequest(HttpRequest request, HttpContext context) throws HttpException, IOException
HttpAsyncRequestConsumerthat will be used to process the request and consume message content if enclosed. The consumer can optionally parse or transform the message content into a structured object which is then passed onto the
handle(Object, HttpAsyncExchange, HttpContext)method for further processing.
void handle(T data, HttpAsyncExchange httpExchange, HttpContext context) throws HttpException, IOException
HttpAsyncExchangeonce response content becomes available.
Copyright © 2005–2016 The Apache Software Foundation. All rights reserved.