public interface HttpAsyncRequestHandler<T>
Modifier and Type | Method and Description |
---|---|
void |
handle(T data,
HttpAsyncExchange httpExchange,
HttpContext context)
Triggered to complete request processing and to initiate the process of
generating a response.
|
HttpAsyncRequestConsumer<T> |
processRequest(HttpRequest request,
HttpContext context)
Triggered when an incoming request is received.
|
HttpAsyncRequestConsumer<T> processRequest(HttpRequest request, HttpContext context) throws HttpException, IOException
HttpAsyncRequestConsumer
that 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.request
- the entity enclosing request.context
- the execution context.IOException
- in case of an I/O error.HttpException
- in case of HTTP protocol violation or a processing
problem.void handle(T data, HttpAsyncExchange httpExchange, HttpContext context) throws HttpException, IOException
HttpAsyncExchange
once response content becomes available.data
- request data returned by the request consumer.httpExchange
- HTTP exchange.context
- HTTP execution context.IOException
- in case of an I/O error.HttpException
- in case of HTTP protocol violation or a processing
problem.Copyright © 2005-2014 The Apache Software Foundation. All Rights Reserved.