Class AsyncServerPipeline.RequestHandlingStage<I,O>
java.lang.Object
org.apache.hc.core5.http.nio.support.AsyncServerPipeline.RequestHandlingStage<I,O>
- Enclosing class:
AsyncServerPipeline
Request handling stage.
- Since:
- 5.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HandlerResolver<HttpRequest, AsyncRequestConsumer<I>> private final Validator<HttpRequest> private final Resolver<O, AsyncResponseProducer> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRequestHandlingStage(Validator<HttpRequest> requestValidator, HandlerResolver<HttpRequest, AsyncRequestConsumer<I>> requestConsumerResolver, Resolver<O, AsyncResponseProducer> responseProducerResolver) -
Method Summary
Modifier and TypeMethodDescriptionerrorMessage(Resolver<Exception, String> messageMapper) Configures the pipeline to resolve the exception to a response error message.exception(Resolver<Exception, AsyncResponseProducer> exceptionMapper) Configures the pipeline to resolve the exception to a response message stream.handle(ExchangeHandler<I, O> exchangeHandler) Configures the pipeline to handle the message exchange by generating a response object based on the properties of the request object.
-
Field Details
-
requestValidator
-
requestConsumerResolver
-
responseProducerResolver
-
-
Constructor Details
-
RequestHandlingStage
private RequestHandlingStage(Validator<HttpRequest> requestValidator, HandlerResolver<HttpRequest, AsyncRequestConsumer<I>> requestConsumerResolver, Resolver<O, AsyncResponseProducer> responseProducerResolver)
-
-
Method Details
-
exception
public AsyncServerPipeline.ExceptionStage<I,O> exception(Resolver<Exception, AsyncResponseProducer> exceptionMapper) Configures the pipeline to resolve the exception to a response message stream. -
errorMessage
-
handle
Configures the pipeline to handle the message exchange by generating a response object based on the properties of the request object.
-