Class DefaultAsyncResponseExchangeHandlerFactory
java.lang.Object
org.apache.hc.core5.http.nio.support.DefaultAsyncResponseExchangeHandlerFactory
- All Implemented Interfaces:
HandlerFactory<AsyncServerExchangeHandler>
public final class DefaultAsyncResponseExchangeHandlerFactory
extends Object
implements HandlerFactory<AsyncServerExchangeHandler>
Factory for
AsyncServerExchangeHandler instances that make use
of HttpRequestMapper to dispatch
the request to a particular AsyncServerExchangeHandler for processing.- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Decorator<AsyncServerExchangeHandler> private final HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> -
Constructor Summary
ConstructorsConstructorDescriptionDefaultAsyncResponseExchangeHandlerFactory(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper) DefaultAsyncResponseExchangeHandlerFactory(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper, Decorator<AsyncServerExchangeHandler> decorator) -
Method Summary
Modifier and TypeMethodDescriptioncreate(HttpRequest request, HttpContext context) Creates a new handler instance based on properties of an incoming request message..private AsyncServerExchangeHandlercreateHandler(HttpRequest request, HttpContext context)
-
Field Details
-
mapper
-
decorator
-
-
Constructor Details
-
DefaultAsyncResponseExchangeHandlerFactory
public DefaultAsyncResponseExchangeHandlerFactory(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper, Decorator<AsyncServerExchangeHandler> decorator) -
DefaultAsyncResponseExchangeHandlerFactory
public DefaultAsyncResponseExchangeHandlerFactory(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper)
-
-
Method Details
-
createHandler
private AsyncServerExchangeHandler createHandler(HttpRequest request, HttpContext context) throws HttpException - Throws:
HttpException
-
create
public AsyncServerExchangeHandler create(HttpRequest request, HttpContext context) throws HttpException Description copied from interface:HandlerFactoryCreates a new handler instance based on properties of an incoming request message..- Specified by:
createin interfaceHandlerFactory<AsyncServerExchangeHandler>- Parameters:
request- the incoming request head.context- the actual execution context.- Returns:
- handler
- Throws:
HttpException
-