org.apache.hc.core5.http.nio.support

## 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

- - ### Constructor Summary

    Constructors
    Constructor and 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 and Description
    --- | ---
    `AsyncServerExchangeHandler` | `create(HttpRequest request, HttpContext context)` Creates a new handler instance based on properties of an incoming request message..

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultAsyncResponseExchangeHandlerFactory

          public DefaultAsyncResponseExchangeHandlerFactory(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper,
                                                            Decorator<AsyncServerExchangeHandler> decorator)

    - #### DefaultAsyncResponseExchangeHandlerFactory

          public DefaultAsyncResponseExchangeHandlerFactory(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> mapper)

  - ### Method Detail

    - #### 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 interface `HandlerFactory<AsyncServerExchangeHandler>`
      Parameters:
        `request` - the incoming reqquest head.
        `context` - the actual execution context.
      Returns:
        handler
      Throws:
        `HttpException`

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.