Class H2MultiplexingRequesterBootstrap
- java.lang.Object
-
- org.apache.hc.core5.http2.impl.nio.bootstrap.H2MultiplexingRequesterBootstrap
-
public class H2MultiplexingRequesterBootstrap extends java.lang.ObjectH2MultiplexingRequesterbootstrap.- Since:
- 5.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static H2MultiplexingRequesterBootstrapbootstrap()H2MultiplexingRequestercreate()H2MultiplexingRequesterBootstrapregister(java.lang.String hostname, java.lang.String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier)Registers the givenAsyncPushConsumerSupplieras a handler for URIs matching the given host and the pattern.H2MultiplexingRequesterBootstrapregister(java.lang.String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier)Registers the givenAsyncPushConsumerSupplieras a default handler for URIs matching the given pattern.H2MultiplexingRequesterBootstrapregisterVirtual(java.lang.String hostname, java.lang.String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier)Deprecated.H2MultiplexingRequesterBootstrapsetCharCodingConfig(org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig)Sets message char coding.H2MultiplexingRequesterBootstrapsetExceptionCallback(org.apache.hc.core5.function.Callback<java.lang.Exception> exceptionCallback)SetsExceptionCallbackinstance.H2MultiplexingRequesterBootstrapsetH2Config(H2Config h2Config)Sets HTTP/2 protocol parametersH2MultiplexingRequesterBootstrapsetHttpProcessor(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor)SetsHttpProcessorinstance.H2MultiplexingRequesterBootstrapsetIOReactorConfig(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig)Sets I/O reactor configuration.H2MultiplexingRequesterBootstrapsetIOReactorMetricsListener(org.apache.hc.core5.reactor.IOReactorMetricsListener threadPoolListener)SetsIOReactorMetricsListenerinstance.H2MultiplexingRequesterBootstrapsetIOSessionDecorator(org.apache.hc.core5.function.Decorator<org.apache.hc.core5.reactor.IOSession> ioSessionDecorator)SetsIOSessionDecoratorinstance.H2MultiplexingRequesterBootstrapsetIOSessionListener(org.apache.hc.core5.reactor.IOSessionListener sessionListener)SetsIOSessionListenerinstance.H2MultiplexingRequesterBootstrapsetMaxCommandsPerConnection(int max)Sets a hard limit on the number of pending commands execution commands that can be queued per connection.H2MultiplexingRequesterBootstrapsetPingAckTimeout(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.H2MultiplexingRequesterBootstrapsetStreamListener(FrameFactory frameFactory)SetsFrameFactoryinstance.H2MultiplexingRequesterBootstrapsetStreamListener(H2StreamListener streamListener)SetsH2StreamListenerinstance.H2MultiplexingRequesterBootstrapsetStrictALPNHandshake(boolean strictALPNHandshake)H2MultiplexingRequesterBootstrapsetTlsStrategy(org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy)SetsTlsStrategyinstance.H2MultiplexingRequesterBootstrapsetUriPatternType(org.apache.hc.core5.http.protocol.UriPatternType uriPatternType)SetsUriPatternTypefor handler registration.
-
-
-
Method Detail
-
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)
SetsHttpProcessorinstance.- 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)
SetsTlsStrategyinstance.- 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)
SetsIOSessionDecoratorinstance.- Returns:
- this instance.
-
setExceptionCallback
public final H2MultiplexingRequesterBootstrap setExceptionCallback(org.apache.hc.core5.function.Callback<java.lang.Exception> exceptionCallback)
SetsExceptionCallbackinstance.- Returns:
- this instance.
-
setIOSessionListener
public final H2MultiplexingRequesterBootstrap setIOSessionListener(org.apache.hc.core5.reactor.IOSessionListener sessionListener)
SetsIOSessionListenerinstance.- Returns:
- this instance.
-
setIOReactorMetricsListener
public final H2MultiplexingRequesterBootstrap setIOReactorMetricsListener(org.apache.hc.core5.reactor.IOReactorMetricsListener threadPoolListener)
SetsIOReactorMetricsListenerinstance.- 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 withRejectedExecutionException. A value<= 0disables 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;<= 0to 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)
SetsH2StreamListenerinstance.- Returns:
- this instance.
-
setStreamListener
public final H2MultiplexingRequesterBootstrap setStreamListener(FrameFactory frameFactory)
SetsFrameFactoryinstance.- Returns:
- this instance.
- Since:
- 5.4
-
setUriPatternType
public final H2MultiplexingRequesterBootstrap setUriPatternType(org.apache.hc.core5.http.protocol.UriPatternType uriPatternType)
SetsUriPatternTypefor 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 givenAsyncPushConsumerSupplieras 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 givenAsyncPushConsumerSupplieras a handler for URIs matching the given host and the pattern.- Parameters:
hostname- the host nameuriPattern- the pattern to register the handler for.supplier- the handler supplier.- Returns:
- this instance.
- Since:
- 5.3
-
registerVirtual
@Deprecated public final H2MultiplexingRequesterBootstrap registerVirtual(java.lang.String hostname, java.lang.String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier)
Deprecated.- Returns:
- this instance.
-
create
public H2MultiplexingRequester create()
-
-