Class H2MultiplexingRequesterBootstrap


  • public class H2MultiplexingRequesterBootstrap
    extends java.lang.Object
    Since:
    5.0
    • Method Detail

      • 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.
      • 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.
      • 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<java.lang.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
      • 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​(java.lang.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​(java.lang.String hostname,
                                                               java.lang.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