Class AsyncRequesterBootstrap
- java.lang.Object
-
- org.apache.hc.core5.http.impl.bootstrap.AsyncRequesterBootstrap
-
public class AsyncRequesterBootstrap extends java.lang.ObjectHttpAsyncRequesterbootstrap.- Since:
- 5.0
-
-
Method Summary
-
-
-
Method Detail
-
bootstrap
public static AsyncRequesterBootstrap bootstrap()
-
setIOReactorConfig
public final AsyncRequesterBootstrap setIOReactorConfig(IOReactorConfig ioReactorConfig)
Sets I/O reactor configuration.- Returns:
- this instance.
-
setHttp1Config
public final AsyncRequesterBootstrap setHttp1Config(Http1Config http1Config)
Sets HTTP/1.1 protocol parameters- Returns:
- this instance.
-
setCharCodingConfig
public final AsyncRequesterBootstrap setCharCodingConfig(CharCodingConfig charCodingConfig)
Sets message char coding.- Returns:
- this instance.
-
setHttpProcessor
public final AsyncRequesterBootstrap setHttpProcessor(HttpProcessor httpProcessor)
SetsHttpProcessorinstance.- Returns:
- this instance.
-
setConnectionReuseStrategy
public final AsyncRequesterBootstrap setConnectionReuseStrategy(ConnectionReuseStrategy connStrategy)
SetsConnectionReuseStrategyinstance.- Returns:
- this instance.
-
setDefaultMaxPerRoute
public final AsyncRequesterBootstrap setDefaultMaxPerRoute(int defaultMaxPerRoute)
-
setMaxTotal
public final AsyncRequesterBootstrap setMaxTotal(int maxTotal)
-
setTimeToLive
public final AsyncRequesterBootstrap setTimeToLive(Timeout timeToLive)
-
setPoolReusePolicy
public final AsyncRequesterBootstrap setPoolReusePolicy(PoolReusePolicy poolReusePolicy)
SetsPoolReusePolicyinstance.- Returns:
- this instance.
-
setPoolConcurrencyPolicy
@Experimental public final AsyncRequesterBootstrap setPoolConcurrencyPolicy(PoolConcurrencyPolicy poolConcurrencyPolicy)
SetsPoolConcurrencyPolicyinstance.- Returns:
- this instance.
-
setMaxPendingCommandsPerConnection
public final AsyncRequesterBootstrap setMaxPendingCommandsPerConnection(int maxPendingCommandsPerConnection)
Sets the maximum number of pending request execution commands allowed per connection.This is a fail-fast back-pressure mechanism based on the per-connection I/O session command queue depth. It does not cap the number of concurrent in-flight HTTP exchanges on the connection.
A value
<= 0disables the limit. When the limit is enabled and exceeded, request execution fails withRejectedExecutionException.- Parameters:
maxPendingCommandsPerConnection- maximum number of pending commands per connection, or<= 0to disable.- Returns:
- this instance.
-
setTlsStrategy
public final AsyncRequesterBootstrap setTlsStrategy(TlsStrategy tlsStrategy)
SetsTlsStrategyinstance.- Returns:
- this instance.
-
setTlsHandshakeTimeout
public final AsyncRequesterBootstrap setTlsHandshakeTimeout(Timeout handshakeTimeout)
-
setIOSessionDecorator
public final AsyncRequesterBootstrap setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)
- Returns:
- this instance.
-
setExceptionCallback
public final AsyncRequesterBootstrap setExceptionCallback(Callback<java.lang.Exception> exceptionCallback)
SetsExceptionCallbackinstance.- Returns:
- this instance.
-
setIOSessionListener
public final AsyncRequesterBootstrap setIOSessionListener(IOSessionListener sessionListener)
SetsIOSessionListenerinstance.- Returns:
- this instance.
-
setIOReactorMetricsListener
public final AsyncRequesterBootstrap setIOReactorMetricsListener(IOReactorMetricsListener threadPoolListener)
SetsIOReactorMetricsListenerinstance.- Returns:
- this instance.
- Since:
- 5.4
-
setStreamListener
public final AsyncRequesterBootstrap setStreamListener(Http1StreamListener streamListener)
SetsHttp1StreamListenerinstance.- Returns:
- this instance.
-
setConnPoolListener
public final AsyncRequesterBootstrap setConnPoolListener(ConnPoolListener<HttpHost> connPoolListener)
SetsConnPoolListenerinstance.- Returns:
- this instance.
-
create
public HttpAsyncRequester create()
-
-