@Immutable public class BasicAsyncRequestHandler extends java.lang.Object implements HttpAsyncRequestHandler<HttpRequest>
HttpAsyncRequestHandler that delegates
the process of request handling to a HttpRequestHandler. Please note
that this handler buffers request content in memory and should be used for
relatively small request messages.| 构造器和说明 |
|---|
BasicAsyncRequestHandler(HttpRequestHandler handler) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
handle(HttpRequest request,
HttpAsyncExchange httpexchange,
HttpContext context)
Triggered to complete request processing and to initiate the process of
generating a response.
|
HttpAsyncRequestConsumer<HttpRequest> |
processRequest(HttpRequest request,
HttpContext context)
Triggered when an incoming request is received.
|
public BasicAsyncRequestHandler(HttpRequestHandler handler)
public HttpAsyncRequestConsumer<HttpRequest> processRequest(HttpRequest request, HttpContext context)
HttpAsyncRequestHandlerHttpAsyncRequestConsumer 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 HttpAsyncRequestHandler.handle(Object, HttpAsyncExchange, HttpContext)
method for further processing.processRequest 在接口中 HttpAsyncRequestHandler<HttpRequest>request - the entity enclosing request.context - the execution context.public void handle(HttpRequest request, HttpAsyncExchange httpexchange, HttpContext context) throws HttpException, java.io.IOException
HttpAsyncRequestHandlerHttpAsyncExchange once response content becomes available.handle 在接口中 HttpAsyncRequestHandler<HttpRequest>request - request data returned by the request consumer.httpexchange - HTTP exchange.context - HTTP execution context.HttpException - in case of HTTP protocol violation or a processing
problem.java.io.IOException - in case of an I/O error.