public class DefaultAsyncHttpClientConfig extends java.lang.Object implements AsyncHttpClientConfig
AsyncHttpClient
. System property can be also used to configure this object default behavior by doing: for documentation
Modifier and Type | Class and Description |
---|---|
static class |
DefaultAsyncHttpClientConfig.Builder
Builder for an
AsyncHttpClient |
AsyncHttpClientConfig.ResponseBodyPartFactory
Modifier and Type | Method and Description |
---|---|
int |
getAcquireFreeChannelTimeout()
Return the maximum duration in milliseconds an
AsyncHttpClient can wait to acquire a free channel |
java.lang.String |
getAhcVersion() |
io.netty.buffer.ByteBufAllocator |
getAllocator() |
java.util.Map<io.netty.channel.ChannelOption<java.lang.Object>,java.lang.Object> |
getChannelOptions() |
ChannelPool |
getChannelPool() |
int |
getChunkedFileChunkSize() |
int |
getConnectionPoolCleanerPeriod() |
ConnectionSemaphoreFactory |
getConnectionSemaphoreFactory() |
int |
getConnectionTtl() |
int |
getConnectTimeout()
Return the maximum time in millisecond an
AsyncHttpClient can wait when connecting to a remote host |
CookieStore |
getCookieStore()
Return cookie store that is used to store and retrieve cookies
|
java.lang.String[] |
getEnabledCipherSuites() |
java.lang.String[] |
getEnabledProtocols() |
io.netty.channel.EventLoopGroup |
getEventLoopGroup() |
int |
getHandshakeTimeout() |
java.util.function.Consumer<io.netty.channel.Channel> |
getHttpAdditionalChannelInitializer() |
int |
getHttpClientCodecInitialBufferSize() |
int |
getHttpClientCodecMaxChunkSize() |
int |
getHttpClientCodecMaxHeaderSize() |
int |
getHttpClientCodecMaxInitialLineLength() |
java.util.List<IOExceptionFilter> |
getIoExceptionFilters()
Return the list of
IOException |
int |
getIoThreadsCount() |
KeepAliveStrategy |
getKeepAliveStrategy() |
int |
getMaxConnections()
Return the maximum number of connections an
AsyncHttpClient can handle. |
int |
getMaxConnectionsPerHost()
Return the maximum number of connections per hosts an
AsyncHttpClient can handle. |
int |
getMaxRedirects()
Get the maximum number of HTTP redirect
|
int |
getMaxRequestRetry()
Return the number of time the library will retry when an
IOException is throw by the remote server |
io.netty.util.Timer |
getNettyTimer() |
int |
getPooledConnectionIdleTimeout()
Return the maximum time in millisecond an
AsyncHttpClient will keep connection in pool. |
ProxyServerSelector |
getProxyServerSelector()
An instance of
ProxyServer used by an AsyncHttpClient |
int |
getReadTimeout()
Return the maximum time in millisecond an
AsyncHttpClient can stay idle. |
Realm |
getRealm()
Return the current
Realm |
java.util.List<RequestFilter> |
getRequestFilters()
Return the list of
RequestFilter |
int |
getRequestTimeout()
Return the maximum time in millisecond an
AsyncHttpClient waits until the response is completed. |
AsyncHttpClientConfig.ResponseBodyPartFactory |
getResponseBodyPartFactory() |
java.util.List<ResponseFilter> |
getResponseFilters()
Return the list of
ResponseFilter |
int |
getShutdownQuietPeriod() |
int |
getShutdownTimeout() |
int |
getSoLinger() |
int |
getSoRcvBuf() |
int |
getSoSndBuf() |
io.netty.handler.ssl.SslContext |
getSslContext()
Return an instance of
SslContext used for SSL connection. |
SslEngineFactory |
getSslEngineFactory() |
int |
getSslSessionCacheSize() |
int |
getSslSessionTimeout() |
java.util.concurrent.ThreadFactory |
getThreadFactory()
Return the
ThreadFactory an AsyncHttpClient use for handling asynchronous response. |
java.lang.String |
getThreadPoolName()
Return the name of
AsyncHttpClient , which is used for thread naming and debugging. |
java.lang.String |
getUserAgent()
Return the USER_AGENT header value
|
int |
getWebSocketMaxBufferSize() |
int |
getWebSocketMaxFrameSize() |
java.util.function.Consumer<io.netty.channel.Channel> |
getWsAdditionalChannelInitializer() |
boolean |
isAggregateWebSocketFrameFragments() |
boolean |
isCompressionEnforced()
Is HTTP compression enforced.
|
boolean |
isDisableHttpsEndpointIdentificationAlgorithm() |
boolean |
isDisableUrlEncodingForBoundRequests() |
boolean |
isDisableZeroCopy() |
boolean |
isEnableWebSocketCompression() |
boolean |
isFilterInsecureCipherSuites() |
boolean |
isFollowRedirect()
Is HTTP redirect enabled
|
boolean |
isKeepAlive()
Is the
ChannelPool support enabled. |
boolean |
isKeepEncodingHeader() |
boolean |
isSoReuseAddress() |
boolean |
isStrict302Handling()
In the case of a POST/Redirect/Get scenario where the server uses a 302 for the redirect, should AHC respond to the redirect with a GET or whatever the original method was.
|
boolean |
isTcpNoDelay() |
boolean |
isUseInsecureTrustManager() |
boolean |
isUseLaxCookieEncoder() |
boolean |
isUseNativeTransport() |
boolean |
isUseOpenSsl() |
boolean |
isValidateResponseHeaders() |
public java.lang.String getAhcVersion()
getAhcVersion
in interface AsyncHttpClientConfig
public boolean isFollowRedirect()
AsyncHttpClientConfig
isFollowRedirect
in interface AsyncHttpClientConfig
public int getMaxRedirects()
AsyncHttpClientConfig
getMaxRedirects
in interface AsyncHttpClientConfig
public boolean isStrict302Handling()
AsyncHttpClientConfig
isStrict302Handling
in interface AsyncHttpClientConfig
true
if strict 302 handling is to be used, otherwise false
.public boolean isCompressionEnforced()
AsyncHttpClientConfig
isCompressionEnforced
in interface AsyncHttpClientConfig
public java.lang.String getUserAgent()
AsyncHttpClientConfig
getUserAgent
in interface AsyncHttpClientConfig
public Realm getRealm()
AsyncHttpClientConfig
Realm
getRealm
in interface AsyncHttpClientConfig
Realm
public int getMaxRequestRetry()
AsyncHttpClientConfig
IOException
is throw by the remote servergetMaxRequestRetry
in interface AsyncHttpClientConfig
IOException
is throw by the remote serverpublic boolean isDisableUrlEncodingForBoundRequests()
isDisableUrlEncodingForBoundRequests
in interface AsyncHttpClientConfig
public boolean isUseLaxCookieEncoder()
isUseLaxCookieEncoder
in interface AsyncHttpClientConfig
public boolean isDisableZeroCopy()
isDisableZeroCopy
in interface AsyncHttpClientConfig
public boolean isKeepEncodingHeader()
isKeepEncodingHeader
in interface AsyncHttpClientConfig
public ProxyServerSelector getProxyServerSelector()
AsyncHttpClientConfig
ProxyServer
used by an AsyncHttpClient
getProxyServerSelector
in interface AsyncHttpClientConfig
ProxyServer
public boolean isAggregateWebSocketFrameFragments()
isAggregateWebSocketFrameFragments
in interface AsyncHttpClientConfig
public boolean isEnableWebSocketCompression()
isEnableWebSocketCompression
in interface AsyncHttpClientConfig
public int getWebSocketMaxBufferSize()
getWebSocketMaxBufferSize
in interface AsyncHttpClientConfig
public int getWebSocketMaxFrameSize()
getWebSocketMaxFrameSize
in interface AsyncHttpClientConfig
public int getConnectTimeout()
AsyncHttpClientConfig
AsyncHttpClient
can wait when connecting to a remote hostgetConnectTimeout
in interface AsyncHttpClientConfig
AsyncHttpClient
can wait when connecting to a remote hostpublic int getRequestTimeout()
AsyncHttpClientConfig
AsyncHttpClient
waits until the response is completed.getRequestTimeout
in interface AsyncHttpClientConfig
AsyncHttpClient
waits until the response is completed.public int getReadTimeout()
AsyncHttpClientConfig
AsyncHttpClient
can stay idle.getReadTimeout
in interface AsyncHttpClientConfig
AsyncHttpClient
can stay idle.public int getShutdownQuietPeriod()
getShutdownQuietPeriod
in interface AsyncHttpClientConfig
public int getShutdownTimeout()
getShutdownTimeout
in interface AsyncHttpClientConfig
public boolean isKeepAlive()
AsyncHttpClientConfig
ChannelPool
support enabled.isKeepAlive
in interface AsyncHttpClientConfig
public int getPooledConnectionIdleTimeout()
AsyncHttpClientConfig
AsyncHttpClient
will keep connection in pool.getPooledConnectionIdleTimeout
in interface AsyncHttpClientConfig
AsyncHttpClient
will keep connection in pool.public int getConnectionPoolCleanerPeriod()
getConnectionPoolCleanerPeriod
in interface AsyncHttpClientConfig
public int getConnectionTtl()
getConnectionTtl
in interface AsyncHttpClientConfig
AsyncHttpClient
will keep connection in the pool, or -1 to keep connection while possible.public int getMaxConnections()
AsyncHttpClientConfig
AsyncHttpClient
can handle.getMaxConnections
in interface AsyncHttpClientConfig
AsyncHttpClient
can handle.public int getMaxConnectionsPerHost()
AsyncHttpClientConfig
AsyncHttpClient
can handle.getMaxConnectionsPerHost
in interface AsyncHttpClientConfig
AsyncHttpClient
can handle.public int getAcquireFreeChannelTimeout()
AsyncHttpClientConfig
AsyncHttpClient
can wait to acquire a free channelgetAcquireFreeChannelTimeout
in interface AsyncHttpClientConfig
AsyncHttpClient
can wait to acquire a free channelpublic ChannelPool getChannelPool()
getChannelPool
in interface AsyncHttpClientConfig
public ConnectionSemaphoreFactory getConnectionSemaphoreFactory()
getConnectionSemaphoreFactory
in interface AsyncHttpClientConfig
public KeepAliveStrategy getKeepAliveStrategy()
getKeepAliveStrategy
in interface AsyncHttpClientConfig
public boolean isValidateResponseHeaders()
isValidateResponseHeaders
in interface AsyncHttpClientConfig
public boolean isUseOpenSsl()
isUseOpenSsl
in interface AsyncHttpClientConfig
public boolean isUseInsecureTrustManager()
isUseInsecureTrustManager
in interface AsyncHttpClientConfig
public boolean isDisableHttpsEndpointIdentificationAlgorithm()
isDisableHttpsEndpointIdentificationAlgorithm
in interface AsyncHttpClientConfig
public int getHandshakeTimeout()
getHandshakeTimeout
in interface AsyncHttpClientConfig
public java.lang.String[] getEnabledProtocols()
getEnabledProtocols
in interface AsyncHttpClientConfig
public java.lang.String[] getEnabledCipherSuites()
getEnabledCipherSuites
in interface AsyncHttpClientConfig
public boolean isFilterInsecureCipherSuites()
isFilterInsecureCipherSuites
in interface AsyncHttpClientConfig
public int getSslSessionCacheSize()
getSslSessionCacheSize
in interface AsyncHttpClientConfig
public int getSslSessionTimeout()
getSslSessionTimeout
in interface AsyncHttpClientConfig
public io.netty.handler.ssl.SslContext getSslContext()
AsyncHttpClientConfig
SslContext
used for SSL connection.getSslContext
in interface AsyncHttpClientConfig
SslContext
used for SSL connection.public SslEngineFactory getSslEngineFactory()
getSslEngineFactory
in interface AsyncHttpClientConfig
public java.util.List<RequestFilter> getRequestFilters()
AsyncHttpClientConfig
RequestFilter
getRequestFilters
in interface AsyncHttpClientConfig
RequestFilter
public java.util.List<ResponseFilter> getResponseFilters()
AsyncHttpClientConfig
ResponseFilter
getResponseFilters
in interface AsyncHttpClientConfig
ResponseFilter
public java.util.List<IOExceptionFilter> getIoExceptionFilters()
AsyncHttpClientConfig
IOException
getIoExceptionFilters
in interface AsyncHttpClientConfig
IOException
public CookieStore getCookieStore()
AsyncHttpClientConfig
getCookieStore
in interface AsyncHttpClientConfig
CookieStore
objectpublic boolean isTcpNoDelay()
isTcpNoDelay
in interface AsyncHttpClientConfig
public boolean isSoReuseAddress()
isSoReuseAddress
in interface AsyncHttpClientConfig
public int getSoLinger()
getSoLinger
in interface AsyncHttpClientConfig
public int getSoSndBuf()
getSoSndBuf
in interface AsyncHttpClientConfig
public int getSoRcvBuf()
getSoRcvBuf
in interface AsyncHttpClientConfig
public java.lang.String getThreadPoolName()
AsyncHttpClientConfig
AsyncHttpClient
, which is used for thread naming and debugging.getThreadPoolName
in interface AsyncHttpClientConfig
public int getHttpClientCodecMaxInitialLineLength()
getHttpClientCodecMaxInitialLineLength
in interface AsyncHttpClientConfig
public int getHttpClientCodecMaxHeaderSize()
getHttpClientCodecMaxHeaderSize
in interface AsyncHttpClientConfig
public int getHttpClientCodecMaxChunkSize()
getHttpClientCodecMaxChunkSize
in interface AsyncHttpClientConfig
public int getHttpClientCodecInitialBufferSize()
getHttpClientCodecInitialBufferSize
in interface AsyncHttpClientConfig
public int getChunkedFileChunkSize()
getChunkedFileChunkSize
in interface AsyncHttpClientConfig
public java.util.Map<io.netty.channel.ChannelOption<java.lang.Object>,java.lang.Object> getChannelOptions()
getChannelOptions
in interface AsyncHttpClientConfig
public io.netty.channel.EventLoopGroup getEventLoopGroup()
getEventLoopGroup
in interface AsyncHttpClientConfig
public boolean isUseNativeTransport()
isUseNativeTransport
in interface AsyncHttpClientConfig
public io.netty.buffer.ByteBufAllocator getAllocator()
getAllocator
in interface AsyncHttpClientConfig
public io.netty.util.Timer getNettyTimer()
getNettyTimer
in interface AsyncHttpClientConfig
public java.util.concurrent.ThreadFactory getThreadFactory()
AsyncHttpClientConfig
ThreadFactory
an AsyncHttpClient
use for handling asynchronous response.getThreadFactory
in interface AsyncHttpClientConfig
ThreadFactory
an AsyncHttpClient
use for handling asynchronous response. If no ThreadFactory
has been explicitly
provided, this method will return null
public java.util.function.Consumer<io.netty.channel.Channel> getHttpAdditionalChannelInitializer()
getHttpAdditionalChannelInitializer
in interface AsyncHttpClientConfig
public java.util.function.Consumer<io.netty.channel.Channel> getWsAdditionalChannelInitializer()
getWsAdditionalChannelInitializer
in interface AsyncHttpClientConfig
public AsyncHttpClientConfig.ResponseBodyPartFactory getResponseBodyPartFactory()
getResponseBodyPartFactory
in interface AsyncHttpClientConfig
public int getIoThreadsCount()
getIoThreadsCount
in interface AsyncHttpClientConfig
Copyright © 2019. All Rights Reserved.