Top Description Fields Constructors Methods
org.apache.hc.core5.http.nio.support

public Class BasicServerExchangeHandler<T>

extends AbstractServerExchangeHandler<T>
Class Inheritance
Imports
java.io.IOException, org.apache.hc.core5.http.EntityDetails, .HttpException, .HttpRequest, org.apache.hc.core5.http.nio.AsyncRequestConsumer, .AsyncServerRequestHandler, org.apache.hc.core5.http.protocol.HttpContext, org.apache.hc.core5.util.Args

Basic AbstractServerExchangeHandler implementation that delegates request processing and response generation to a AsyncServerRequestHandler.
Since
5.0

Field Summary

Modifier and TypeField and Description
private final AsyncServerRequestHandler<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
handle(final T
the request message.
requestMessage
,
final AsyncServerRequestHandler.ResponseTrigger
the response trigger.
responseTrigger
,
final HttpContext
the actual execution context.
context
)

Implements abstract org.apache.hc.core5.http.nio.support.AbstractServerExchangeHandler.handle.

Triggered to handles the request object produced by the AsyncRequestConsumer returned from the supplyConsumer(HttpRequest, EntityDetails, HttpContext) method.
protected AsyncRequestConsumer<T>
supplyConsumer(final HttpRequest
the request message.
request
,
final EntityDetails
the request entity details.
entityDetails
,
final HttpContext
the actual execution context.
context
)

Implements abstract org.apache.hc.core5.http.nio.support.AbstractServerExchangeHandler.supplyConsumer.

Triggered to supply a request consumer to process the incoming request.
Inherited from org.apache.hc.core5.http.nio.support.AbstractServerExchangeHandler:
availableconsumefailedhandleRequestproducereleaseResourcesstreamEndupdateCapacity

Field Detail

requestHandlerback to summary
private final AsyncServerRequestHandler<T> requestHandler

Constructor Detail

BasicServerExchangeHandlerback to summary
public BasicServerExchangeHandler(final AsyncServerRequestHandler<T> requestHandler)

Method Detail

handleback to summary
protected void handle(final T requestMessage, final AsyncServerRequestHandler.ResponseTrigger responseTrigger, final HttpContext context) throws HttpException, IOException

Implements abstract org.apache.hc.core5.http.nio.support.AbstractServerExchangeHandler.handle.

Doc from org.apache.hc.core5.http.nio.support.AbstractServerExchangeHandler.handle.

Triggered to handles the request object produced by the AsyncRequestConsumer returned from the supplyConsumer(HttpRequest, EntityDetails, HttpContext) method. The handler can choose to send response messages immediately inside the call or asynchronously at some later point.

Parameters
requestMessage:T

the request message.

responseTrigger:AsyncServerRequestHandler.ResponseTrigger

the response trigger.

context:HttpContext

the actual execution context.

Annotations
@Override
supplyConsumerback to summary
protected AsyncRequestConsumer<T> supplyConsumer(final HttpRequest request, final EntityDetails entityDetails, final HttpContext context) throws HttpException

Implements abstract org.apache.hc.core5.http.nio.support.AbstractServerExchangeHandler.supplyConsumer.

Doc from org.apache.hc.core5.http.nio.support.AbstractServerExchangeHandler.supplyConsumer.

Triggered to supply a request consumer to process the incoming request.

Parameters
request:HttpRequest

the request message.

entityDetails:EntityDetails

the request entity details.

context:HttpContext

the actual execution context.

Returns:AsyncRequestConsumer<T>

the request consumer.

Annotations
@Override