Class H2MultiplexingRequesterBootstrap
java.lang.Object
org.apache.hc.core5.http2.impl.nio.bootstrap.H2MultiplexingRequesterBootstrap
H2MultiplexingRequester bootstrap.- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptioncreate()register(String hostname, 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.register(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.registerVirtual(String hostname, String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier) Deprecated.setCharCodingConfig(org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig) Sets message char coding.setExceptionCallback(org.apache.hc.core5.function.Callback<Exception> exceptionCallback) SetsExceptionCallbackinstance.setH2Config(H2Config h2Config) Sets HTTP/2 protocol parameterssetHttpProcessor(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor) SetsHttpProcessorinstance.setIOReactorConfig(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig) Sets I/O reactor configuration.setIOReactorMetricsListener(org.apache.hc.core5.reactor.IOReactorMetricsListener threadPoolListener) SetsIOReactorMetricsListenerinstance.setIOSessionDecorator(org.apache.hc.core5.function.Decorator<org.apache.hc.core5.reactor.IOSession> ioSessionDecorator) SetsIOSessionDecoratorinstance.setIOSessionListener(org.apache.hc.core5.reactor.IOSessionListener sessionListener) SetsIOSessionListenerinstance.setMaxCommandsPerConnection(int max) Sets a hard limit on the number of pending commands execution commands that can be queued per connection.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.setStreamListener(FrameFactory frameFactory) SetsFrameFactoryinstance.setStreamListener(H2StreamListener streamListener) SetsH2StreamListenerinstance.setStrictALPNHandshake(boolean strictALPNHandshake) setTlsStrategy(org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy) SetsTlsStrategyinstance.setUriPatternType(org.apache.hc.core5.http.protocol.UriPatternType uriPatternType) SetsUriPatternTypefor handler registration.
-
Method Details
-
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
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
-
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<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
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
SetsH2StreamListenerinstance.- Returns:
- this instance.
-
setStreamListener
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(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(String hostname, 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(String hostname, String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier) Deprecated.- Returns:
- this instance.
-
create
-
register(String, String, Supplier).