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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static H2RequesterBootstrap` | `bootstrap()`
    `H2AsyncRequester` | `create()`
    `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)` Registers the given `AsyncPushConsumer` `Supplier` as a handler for URIs matching the given host and the pattern.
    `H2RequesterBootstrap` | `setCharCodingConfig(CharCodingConfig charCodingConfig)` Sets message char coding.
    `H2RequesterBootstrap` | `setConnPoolListener(ConnPoolListener<HttpHost> connPoolListener)` Assigns `ConnPoolListener` instance.
    `H2RequesterBootstrap` | `setDefaultMaxPerRoute(int defaultMaxPerRoute)`
    `H2RequesterBootstrap` | `setExceptionCallback(Callback<Exception> exceptionCallback)` Assigns `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)` Assigns `HttpProcessor` instance.
    `H2RequesterBootstrap` | `setIOReactorConfig(IOReactorConfig ioReactorConfig)` Sets I/O reactor configuration.
    `H2RequesterBootstrap` | `setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)` Assigns `IOSession` `Decorator` instance.
    `H2RequesterBootstrap` | `setIOSessionListener(IOSessionListener sessionListener)` Assigns `IOSessionListener` instance.
    `H2RequesterBootstrap` | `setMaxTotal(int maxTotal)`
    `H2RequesterBootstrap` | `setPoolConcurrencyPolicy(PoolConcurrencyPolicy poolConcurrencyPolicy)` Assigns `PoolConcurrencyPolicy` instance.
    `H2RequesterBootstrap` | `setPoolReusePolicy(PoolReusePolicy poolReusePolicy)` Assigns `PoolReusePolicy` instance.
    `H2RequesterBootstrap` | `setStreamListener(H2StreamListener streamListener)` Assigns `H2StreamListener` instance.
    `H2RequesterBootstrap` | `setStreamListener(Http1StreamListener http1StreamListener)` Assigns `Http1StreamListener` instance.
    `H2RequesterBootstrap` | `setTimeToLive(TimeValue timeToLive)`
    `H2RequesterBootstrap` | `setTlsStrategy(TlsStrategy tlsStrategy)` Assigns `TlsStrategy` instance.
    `H2RequesterBootstrap` | `setUriPatternType(UriPatternType uriPatternType)` Assigns `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.

    - #### setHttpProcessor

          public final H2RequesterBootstrap setHttpProcessor(HttpProcessor httpProcessor)

      Assigns `HttpProcessor` instance.

    - #### setVersionPolicy

          public final H2RequesterBootstrap setVersionPolicy(HttpVersionPolicy versionPolicy)

      Sets HTTP protocol version policy

    - #### setH2Config

          public final H2RequesterBootstrap setH2Config(H2Config h2Config)

      Sets HTTP/2 protocol parameters

    - #### setHttp1Config

          public final H2RequesterBootstrap setHttp1Config(Http1Config http1Config)

      Sets HTTP/1.1 protocol parameters

    - #### setCharCodingConfig

          public final H2RequesterBootstrap setCharCodingConfig(CharCodingConfig charCodingConfig)

      Sets message char coding.

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

      Assigns `PoolReusePolicy` instance.

    - #### setPoolConcurrencyPolicy

          @Experimental
          public final H2RequesterBootstrap setPoolConcurrencyPolicy(PoolConcurrencyPolicy poolConcurrencyPolicy)

      Assigns `PoolConcurrencyPolicy` instance.

    - #### setTlsStrategy

          public final H2RequesterBootstrap setTlsStrategy(TlsStrategy tlsStrategy)

      Assigns `TlsStrategy` instance.

    - #### setHandshakeTimeout

          public final H2RequesterBootstrap setHandshakeTimeout(Timeout handshakeTimeout)

    - #### setIOSessionDecorator

          public final H2RequesterBootstrap setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)

      Assigns `IOSession` `Decorator` instance.

    - #### setExceptionCallback

          public final H2RequesterBootstrap setExceptionCallback(Callback<Exception> exceptionCallback)

      Assigns `Exception` `Callback` instance.

    - #### setIOSessionListener

          public final H2RequesterBootstrap setIOSessionListener(IOSessionListener sessionListener)

      Assigns `IOSessionListener` instance.

    - #### setStreamListener

          public final H2RequesterBootstrap setStreamListener(H2StreamListener streamListener)

      Assigns `H2StreamListener` instance.

    - #### setStreamListener

          public final H2RequesterBootstrap setStreamListener(Http1StreamListener http1StreamListener)

      Assigns `Http1StreamListener` instance.

    - #### setConnPoolListener

          public final H2RequesterBootstrap setConnPoolListener(ConnPoolListener<HttpHost> connPoolListener)

      Assigns `ConnPoolListener` instance.

    - #### setUriPatternType

          public final H2RequesterBootstrap setUriPatternType(UriPatternType uriPatternType)

      Assigns `UriPatternType` for handler registration.

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

    - #### registerVirtual

          public final H2RequesterBootstrap registerVirtual(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.

    - #### create

          public H2AsyncRequester create()

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