Class DefaultAsyncResponseExchangeHandlerFactory
- java.lang.Object
-
- org.apache.hc.core5.http.nio.support.DefaultAsyncResponseExchangeHandlerFactory
-
- All Implemented Interfaces:
HandlerFactory<AsyncServerExchangeHandler>
public final class DefaultAsyncResponseExchangeHandlerFactory extends java.lang.Object implements HandlerFactory<AsyncServerExchangeHandler>
Factory forAsyncServerExchangeHandler
instances that make use ofHttpRequestMapper
to dispatch the request to a particularAsyncServerExchangeHandler
for processing.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private Decorator<AsyncServerExchangeHandler>
decorator
private HttpRequestMapper<Supplier<AsyncServerExchangeHandler>>
mapper
-
Constructor Summary
Constructors Constructor Description DefaultAsyncResponseExchangeHandlerFactory(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper)
DefaultAsyncResponseExchangeHandlerFactory(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper, Decorator<AsyncServerExchangeHandler> decorator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncServerExchangeHandler
create(HttpRequest request, HttpContext context)
Creates a new handler instance based on properties of an incoming request message..private AsyncServerExchangeHandler
createHandler(HttpRequest request, HttpContext context)
-
-
-
Field Detail
-
mapper
private final HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper
-
decorator
private final Decorator<AsyncServerExchangeHandler> decorator
-
-
Constructor Detail
-
DefaultAsyncResponseExchangeHandlerFactory
public DefaultAsyncResponseExchangeHandlerFactory(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper, Decorator<AsyncServerExchangeHandler> decorator)
-
DefaultAsyncResponseExchangeHandlerFactory
public DefaultAsyncResponseExchangeHandlerFactory(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper)
-
-
Method Detail
-
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:HandlerFactory
Creates a new handler instance based on properties of an incoming request message..- Specified by:
create
in interfaceHandlerFactory<AsyncServerExchangeHandler>
- Parameters:
request
- the incoming request head.context
- the actual execution context.- Returns:
- handler
- Throws:
HttpException
-
-