public class BasicServerExchangeHandler<T> extends AbstractServerExchangeHandler<T>
AbstractServerExchangeHandler
implementation that delegates
request processing and response generation to a AsyncServerRequestHandler
.Constructor and Description |
---|
BasicServerExchangeHandler(AsyncServerRequestHandler<T> requestHandler) |
Modifier and Type | Method and Description |
---|---|
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, updateCapacity
public BasicServerExchangeHandler(AsyncServerRequestHandler<T> requestHandler)
protected AsyncRequestConsumer<T> supplyConsumer(HttpRequest request, EntityDetails entityDetails, HttpContext context) throws HttpException
AbstractServerExchangeHandler
supplyConsumer
in class AbstractServerExchangeHandler<T>
request
- the request message.entityDetails
- the request entity details.context
- the actual execution context.HttpException
protected void handle(T requestMessage, AsyncServerRequestHandler.ResponseTrigger responseTrigger, HttpContext context) throws HttpException, IOException
AbstractServerExchangeHandler
AsyncRequestConsumer
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
in class AbstractServerExchangeHandler<T>
requestMessage
- the request message.responseTrigger
- the response trigger.context
- the actual execution context.HttpException
IOException
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.