public class BasicServerExchangeHandler<T> extends AbstractServerExchangeHandler<T>
AbstractServerExchangeHandler implementation that delegates
request processing and response generation to a AsyncServerRequestHandler.| 构造器和说明 |
|---|
BasicServerExchangeHandler(AsyncServerRequestHandler<T> requestHandler) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
handle(T requestMessage,
AsyncServerRequestHandler.ResponseTrigger responseTrigger,
HttpContext context)
Triggered to handles the request object produced by the
AsyncRequestConsumer returned
from the AbstractServerExchangeHandler.supplyConsumer(HttpRequest, EntityDetails, HttpContext) method. |
protected AsyncRequestConsumer<T> |
supplyConsumer(HttpRequest request,
EntityDetails entityDetails,
HttpContext context)
Triggered to supply a request consumer to process the incoming request.
|
available, consume, failed, handleRequest, produce, releaseResources, streamEnd, updateCapacitypublic BasicServerExchangeHandler(AsyncServerRequestHandler<T> requestHandler)
protected AsyncRequestConsumer<T> supplyConsumer(HttpRequest request, EntityDetails entityDetails, HttpContext context) throws HttpException
AbstractServerExchangeHandlersupplyConsumer 在类中 AbstractServerExchangeHandler<T>request - the request message.entityDetails - the request entity details.context - the actual execution context.HttpExceptionprotected void handle(T requestMessage, AsyncServerRequestHandler.ResponseTrigger responseTrigger, HttpContext context) throws HttpException, IOException
AbstractServerExchangeHandlerAsyncRequestConsumer returned
from the AbstractServerExchangeHandler.supplyConsumer(HttpRequest, EntityDetails, HttpContext) method. The handler
can choose to send response messages immediately inside the call or asynchronously
at some later point.handle 在类中 AbstractServerExchangeHandler<T>requestMessage - the request message.responseTrigger - the response trigger.context - the actual execution context.HttpExceptionIOExceptionCopyright © 2023. All rights reserved.