Class H2RequesterBootstrap


  • public class H2RequesterBootstrap
    extends java.lang.Object
    H2AsyncRequester bootstrap.
    Since:
    5.0
    • Method Detail

      • setIOReactorConfig

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

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

        public final H2RequesterBootstrap setH2Config​(H2Config h2Config)
        Sets HTTP/2 protocol parameters
        Returns:
        this instance.
      • setHttp1Config

        public final H2RequesterBootstrap setHttp1Config​(org.apache.hc.core5.http.config.Http1Config http1Config)
        Sets HTTP/1.1 protocol parameters
        Returns:
        this instance.
      • setCharCodingConfig

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

        public final H2RequesterBootstrap setDefaultMaxPerRoute​(int defaultMaxPerRoute)
      • setTimeToLive

        public final H2RequesterBootstrap setTimeToLive​(org.apache.hc.core5.util.TimeValue timeToLive)
      • setPoolReusePolicy

        public final H2RequesterBootstrap setPoolReusePolicy​(org.apache.hc.core5.pool.PoolReusePolicy poolReusePolicy)
        Sets PoolReusePolicy instance.
        Returns:
        this instance.
      • setPoolConcurrencyPolicy

        @Experimental
        public final H2RequesterBootstrap setPoolConcurrencyPolicy​(org.apache.hc.core5.pool.PoolConcurrencyPolicy poolConcurrencyPolicy)
        Sets PoolConcurrencyPolicy instance.
        Returns:
        this instance.
      • setMaxPendingCommandsPerConnection

        public final H2RequesterBootstrap setMaxPendingCommandsPerConnection​(int maxPendingCommandsPerConnection)
      • setPingAckTimeout

        public final H2RequesterBootstrap 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
      • setTlsStrategy

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

        public final H2RequesterBootstrap setHandshakeTimeout​(org.apache.hc.core5.util.Timeout handshakeTimeout)
      • setIOSessionDecorator

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

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

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

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

        public final H2RequesterBootstrap setStreamListener​(org.apache.hc.core5.http.impl.Http1StreamListener http1StreamListener)
        Sets Http1StreamListener instance.
        Returns:
        this instance.
      • setConnPoolListener

        public final H2RequesterBootstrap setConnPoolListener​(org.apache.hc.core5.pool.ConnPoolListener<org.apache.hc.core5.http.HttpHost> connPoolListener)
        Sets ConnPoolListener instance.
        Returns:
        this instance.
      • setUriPatternType

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

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

        @Deprecated
        public final H2RequesterBootstrap registerVirtual​(java.lang.String hostname,
                                                          java.lang.String uriPattern,
                                                          org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier)
        Returns:
        this instance.