Class H2MultiplexingRequesterBootstrap

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

public class H2MultiplexingRequesterBootstrap extends Object
Since:
5.0
  • Method Details

    • bootstrap

      public static H2MultiplexingRequesterBootstrap bootstrap()
    • setIOReactorConfig

      public final H2MultiplexingRequesterBootstrap setIOReactorConfig(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig)
      Sets I/O reactor configuration.
      Returns:
      this instance.
    • setHttpProcessor

      public final H2MultiplexingRequesterBootstrap setHttpProcessor(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor)
      Sets HttpProcessor instance.
      Returns:
      this instance.
    • setH2Config

      public final H2MultiplexingRequesterBootstrap setH2Config(H2Config h2Config)
      Sets HTTP/2 protocol parameters
      Returns:
      this instance.
    • setCharCodingConfig

      public final H2MultiplexingRequesterBootstrap setCharCodingConfig(org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig)
      Sets message char coding.
      Returns:
      this instance.
    • setTlsStrategy

      public final H2MultiplexingRequesterBootstrap setTlsStrategy(org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy)
      Sets TlsStrategy instance.
      Returns:
      this instance.
    • setStrictALPNHandshake

      public final H2MultiplexingRequesterBootstrap setStrictALPNHandshake(boolean strictALPNHandshake)
    • setIOSessionDecorator

      public final H2MultiplexingRequesterBootstrap setIOSessionDecorator(org.apache.hc.core5.function.Decorator<org.apache.hc.core5.reactor.IOSession> ioSessionDecorator)
      Sets IOSession Decorator instance.
      Returns:
      this instance.
    • setExceptionCallback

      public final H2MultiplexingRequesterBootstrap setExceptionCallback(org.apache.hc.core5.function.Callback<Exception> exceptionCallback)
      Sets Exception Callback instance.
      Returns:
      this instance.
    • setIOSessionListener

      public final H2MultiplexingRequesterBootstrap setIOSessionListener(org.apache.hc.core5.reactor.IOSessionListener sessionListener)
      Sets IOSessionListener instance.
      Returns:
      this instance.
    • setIOReactorMetricsListener

      public final H2MultiplexingRequesterBootstrap setIOReactorMetricsListener(org.apache.hc.core5.reactor.IOReactorMetricsListener threadPoolListener)
      Sets IOReactorMetricsListener instance.
      Returns:
      this instance.
      Since:
      5.4
    • setMaxCommandsPerConnection

      @Experimental public final H2MultiplexingRequesterBootstrap setMaxCommandsPerConnection(int max)
      Sets a hard limit on the number of pending commands execution commands that can be queued per connection. When the limit is reached, new submissions fail fast with RejectedExecutionException. A value <= 0 disables the limit (default). Note: this limit applies to commands waiting in the connection's internal queue (backlog). HTTP/2 in-flight concurrency is governed separately by protocol settings (e.g. MAX_CONCURRENT_STREAMS).
      Parameters:
      max - maximum number of pending commands per connection; <= 0 to disable the limit.
      Returns:
      this instance.
      Since:
      5.5
    • setPingAckTimeout

      public final H2MultiplexingRequesterBootstrap setPingAckTimeout(org.apache.hc.core5.util.Timeout pingAckTimeout)
      Sets the timeout applied while waiting for the HTTP/2 PING ACK emitted during pre-flight connection validation. When unset, the default of 5 seconds is used.
      Returns:
      this instance.
      Since:
      5.5
    • setStreamListener

      public final H2MultiplexingRequesterBootstrap setStreamListener(H2StreamListener streamListener)
      Sets H2StreamListener instance.
      Returns:
      this instance.
    • setStreamListener

      public final H2MultiplexingRequesterBootstrap setStreamListener(FrameFactory frameFactory)
      Sets FrameFactory instance.
      Returns:
      this instance.
      Since:
      5.4
    • setUriPatternType

      public final H2MultiplexingRequesterBootstrap setUriPatternType(org.apache.hc.core5.http.protocol.UriPatternType uriPatternType)
      Sets UriPatternType for handler registration.
      Returns:
      this instance.
    • register

      public final H2MultiplexingRequesterBootstrap register(String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.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 H2MultiplexingRequesterBootstrap register(String hostname, String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.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 H2MultiplexingRequesterBootstrap registerVirtual(String hostname, String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier)
      Returns:
      this instance.
    • create

      public H2MultiplexingRequester create()