org.apache.hc.core5.http2.nio.support

## Class DefaultAsyncPushConsumerFactory

- java.lang.Object
- - org.apache.hc.core5.http2.nio.support.DefaultAsyncPushConsumerFactory

- All Implemented Interfaces:
    HandlerFactory<AsyncPushConsumer>

      public final class DefaultAsyncPushConsumerFactory
      extends Object
      implements HandlerFactory<AsyncPushConsumer>

  Factory for `AsyncPushConsumer` instances that make use of `HttpRequestMapper` to dispatch the request to a particular `AsyncPushConsumer` for processing.
  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultAsyncPushConsumerFactory(HttpRequestMapper<Supplier<AsyncPushConsumer>> mapper)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AsyncPushConsumer` | `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

    - #### DefaultAsyncPushConsumerFactory

          public DefaultAsyncPushConsumerFactory(HttpRequestMapper<Supplier<AsyncPushConsumer>> mapper)

  - ### Method Detail

    - #### create

          public AsyncPushConsumer 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<AsyncPushConsumer>`
      Parameters:
        `request` - the incoming request head.
        `context` - the actual execution context.
      Returns:
        handler
      Throws:
        `HttpException` - in case of an HTTP protocol violation.

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