T - request representation.@Contract(threading=STATELESS) public interface AsyncServerRequestHandler<T>
| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
AsyncServerRequestHandler.ResponseTrigger
Response trigger that can be used to submit a final HTTP response
and terminate HTTP request processing.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
handle(T requestObject,
AsyncServerRequestHandler.ResponseTrigger responseTrigger,
HttpContext context)
Triggered to handles the request object produced by the
AsyncRequestConsumer returned
from the prepare(HttpRequest, EntityDetails, HttpContext) method. |
AsyncRequestConsumer<T> |
prepare(HttpRequest request,
EntityDetails entityDetails,
HttpContext context)
Triggered to signal new incoming request.
|
AsyncRequestConsumer<T> prepare(HttpRequest request, EntityDetails entityDetails, HttpContext context) throws HttpException
AsyncRequestConsumer based on
properties of the request head and entity details and let it process the request data stream. The request
handler will be used to generate an object that represents request data.request - the incoming request head.entityDetails - the request entity details or null if the request
does not enclose an entity.context - the actual execution context.HttpExceptionvoid handle(T requestObject, AsyncServerRequestHandler.ResponseTrigger responseTrigger, HttpContext context) throws HttpException, IOException
AsyncRequestConsumer returned
from the prepare(HttpRequest, EntityDetails, HttpContext) method. The handler can choose
to send response messages immediately inside the call or asynchronously at some later point.requestObject - the request object.responseTrigger - the response trigger.context - the actual execution context.HttpExceptionIOExceptionCopyright © 2023. All rights reserved.