org.apache.hc.core5.http2.impl.nio.bootstrap

## Class H2RequesterBootstrap

- java.lang.Object
- - org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap

-     public class H2RequesterBootstrap
      extends Object

  `H2AsyncRequester` bootstrap.
  Since:
    5.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static H2RequesterBootstrap` | `bootstrap()`
    `H2AsyncRequester` | `create()`
    `H2RequesterBootstrap` | `register(String hostname, String uriPattern, Supplier<AsyncPushConsumer> supplier)` Registers the given `AsyncPushConsumer` `Supplier` as a handler for URIs matching the given host and the pattern.
    `H2RequesterBootstrap` | `register(String uriPattern, Supplier<AsyncPushConsumer> supplier)` Registers the given `AsyncPushConsumer` `Supplier` as a default handler for URIs matching the given pattern.
    `H2RequesterBootstrap` | `registerVirtual(String hostname, String uriPattern, Supplier<AsyncPushConsumer> supplier)` Deprecated. Use `register(String, String, Supplier)`.
    `H2RequesterBootstrap` | `setCharCodingConfig(CharCodingConfig charCodingConfig)` Sets message char coding.
    `H2RequesterBootstrap` | `setConnPoolListener(ConnPoolListener<HttpHost> connPoolListener)` Sets `ConnPoolListener` instance.
    `H2RequesterBootstrap` | `setDefaultMaxPerRoute(int defaultMaxPerRoute)`
    `H2RequesterBootstrap` | `setExceptionCallback(Callback<Exception> exceptionCallback)` Sets `Exception` `Callback` instance.
    `H2RequesterBootstrap` | `setH2Config(H2Config h2Config)` Sets HTTP/2 protocol parameters
    `H2RequesterBootstrap` | `setHandshakeTimeout(Timeout handshakeTimeout)`
    `H2RequesterBootstrap` | `setHttp1Config(Http1Config http1Config)` Sets HTTP/1.1 protocol parameters
    `H2RequesterBootstrap` | `setHttpProcessor(HttpProcessor httpProcessor)` Sets `HttpProcessor` instance.
    `H2RequesterBootstrap` | `setIOReactorConfig(IOReactorConfig ioReactorConfig)` Sets I/O reactor configuration.
    `H2RequesterBootstrap` | `setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)` Sets `IOSession` `Decorator` instance.
    `H2RequesterBootstrap` | `setIOSessionListener(IOSessionListener sessionListener)` Sets `IOSessionListener` instance.
    `H2RequesterBootstrap` | `setMaxTotal(int maxTotal)`
    `H2RequesterBootstrap` | `setPoolConcurrencyPolicy(PoolConcurrencyPolicy poolConcurrencyPolicy)` Sets `PoolConcurrencyPolicy` instance.
    `H2RequesterBootstrap` | `setPoolReusePolicy(PoolReusePolicy poolReusePolicy)` Sets `PoolReusePolicy` instance.
    `H2RequesterBootstrap` | `setStreamListener(H2StreamListener streamListener)` Sets `H2StreamListener` instance.
    `H2RequesterBootstrap` | `setStreamListener(Http1StreamListener http1StreamListener)` Sets `Http1StreamListener` instance.
    `H2RequesterBootstrap` | `setTimeToLive(TimeValue timeToLive)`
    `H2RequesterBootstrap` | `setTlsStrategy(TlsStrategy tlsStrategy)` Sets `TlsStrategy` instance.
    `H2RequesterBootstrap` | `setUriPatternType(UriPatternType uriPatternType)` Sets `UriPatternType` for handler registration.
    `H2RequesterBootstrap` | `setVersionPolicy(HttpVersionPolicy versionPolicy)` Sets HTTP protocol version policy

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

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

- - ### Method Detail

    - #### bootstrap

          public static H2RequesterBootstrap bootstrap()

    - #### setIOReactorConfig

          public final H2RequesterBootstrap setIOReactorConfig(IOReactorConfig ioReactorConfig)

      Sets I/O reactor configuration.
      Returns:
        this instance.

    - #### setHttpProcessor

          public final H2RequesterBootstrap setHttpProcessor(HttpProcessor httpProcessor)

      Sets `HttpProcessor` instance.
      Returns:
        this instance.

    - #### setVersionPolicy

          public final H2RequesterBootstrap setVersionPolicy(HttpVersionPolicy versionPolicy)

      Sets HTTP protocol version policy
      Returns:
        this instance.

    - #### setH2Config

          public final H2RequesterBootstrap setH2Config(H2Config h2Config)

      Sets HTTP/2 protocol parameters
      Returns:
        this instance.

    - #### setHttp1Config

          public final H2RequesterBootstrap setHttp1Config(Http1Config http1Config)

      Sets HTTP/1.1 protocol parameters
      Returns:
        this instance.

    - #### setCharCodingConfig

          public final H2RequesterBootstrap setCharCodingConfig(CharCodingConfig charCodingConfig)

      Sets message char coding.
      Returns:
        this instance.

    - #### setDefaultMaxPerRoute

          public final H2RequesterBootstrap setDefaultMaxPerRoute(int defaultMaxPerRoute)

    - #### setMaxTotal

          public final H2RequesterBootstrap setMaxTotal(int maxTotal)

    - #### setTimeToLive

          public final H2RequesterBootstrap setTimeToLive(TimeValue timeToLive)

    - #### setPoolReusePolicy

          public final H2RequesterBootstrap setPoolReusePolicy(PoolReusePolicy poolReusePolicy)

      Sets `PoolReusePolicy` instance.
      Returns:
        this instance.

    - #### setPoolConcurrencyPolicy

          @Experimental
          public final H2RequesterBootstrap setPoolConcurrencyPolicy(PoolConcurrencyPolicy poolConcurrencyPolicy)

      Sets `PoolConcurrencyPolicy` instance.
      Returns:
        this instance.

    - #### setTlsStrategy

          public final H2RequesterBootstrap setTlsStrategy(TlsStrategy tlsStrategy)

      Sets `TlsStrategy` instance.
      Returns:
        this instance.

    - #### setHandshakeTimeout

          public final H2RequesterBootstrap setHandshakeTimeout(Timeout handshakeTimeout)

    - #### setIOSessionDecorator

          public final H2RequesterBootstrap setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)

      Sets `IOSession` `Decorator` instance.
      Returns:
        this instance.

    - #### setExceptionCallback

          public final H2RequesterBootstrap setExceptionCallback(Callback<Exception> exceptionCallback)

      Sets `Exception` `Callback` instance.
      Returns:
        this instance.

    - #### setIOSessionListener

          public final H2RequesterBootstrap setIOSessionListener(IOSessionListener sessionListener)

      Sets `IOSessionListener` instance.
      Returns:
        this instance.

    - #### setStreamListener

          public final H2RequesterBootstrap setStreamListener(H2StreamListener streamListener)

      Sets `H2StreamListener` instance.
      Returns:
        this instance.

    - #### setStreamListener

          public final H2RequesterBootstrap setStreamListener(Http1StreamListener http1StreamListener)

      Sets `Http1StreamListener` instance.
      Returns:
        this instance.

    - #### setConnPoolListener

          public final H2RequesterBootstrap setConnPoolListener(ConnPoolListener<HttpHost> connPoolListener)

      Sets `ConnPoolListener` instance.
      Returns:
        this instance.

    - #### setUriPatternType

          public final H2RequesterBootstrap setUriPatternType(UriPatternType uriPatternType)

      Sets `UriPatternType` for handler registration.
      Returns:
        this instance.

    - #### register

          public final H2RequesterBootstrap register(String uriPattern,
                                                     Supplier<AsyncPushConsumer> supplier)

      Registers the given `AsyncPushConsumer` `Supplier` as a default handler for URIs matching the given pattern.
      Parameters:
        `uriPattern` - the pattern to register the handler for.
        `supplier` - the handler supplier.
      Returns:
        this instance.

    - #### register

          public final H2RequesterBootstrap register(String hostname,
                                                     String uriPattern,
                                                     Supplier<AsyncPushConsumer> supplier)

      Registers the given `AsyncPushConsumer` `Supplier` as a handler for URIs matching the given host and the pattern.
      Parameters:
        `hostname` - the host name
        `uriPattern` - the pattern to register the handler for.
        `supplier` - the handler supplier.
      Returns:
        this instance.
      Since:
        5.3

    - #### registerVirtual

          @Deprecated
          public final H2RequesterBootstrap registerVirtual(String hostname,
                                                                        String uriPattern,
                                                                        Supplier<AsyncPushConsumer> supplier)

      Deprecated. Use `register(String, String, Supplier)`.
      Returns:
        this instance.

    - #### create

          public H2AsyncRequester create()

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