public class DefaultAsyncHttpClientConfig extends 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 |
Modifier and Type | Method and Description |
---|---|
AdvancedConfig |
getAdvancedConfig()
Return the
AdvancedConfig |
String |
getAhcVersion() |
int |
getChunkedFileChunkSize() |
int |
getConnectionTtl()
Return the maximum time in millisecond an
AsyncHttpClient will
keep connection in the pool, or -1 to keep connection while possible. |
int |
getConnectTimeout()
Return the maximum time in millisecond an
AsyncHttpClient can
wait when connecting to a remote host |
String[] |
getEnabledCipherSuites() |
String[] |
getEnabledProtocols() |
long |
getHandshakeTimeout() |
int |
getHttpClientCodecMaxChunkSize() |
int |
getHttpClientCodecMaxHeaderSize() |
int |
getHttpClientCodecMaxInitialLineLength() |
List<IOExceptionFilter> |
getIOExceptionFilters()
Return the list of
IOException |
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 |
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 |
List<RequestFilter> |
getRequestFilters()
Return the list of
RequestFilter |
int |
getRequestTimeout()
Return the maximum time in millisecond an
AsyncHttpClient waits
until the response is completed. |
List<ResponseFilter> |
getResponseFilters()
Return the list of
ResponseFilter |
int |
getShutdownQuietPeriod() |
int |
getShutdownTimeout() |
SSLContext |
getSSLContext()
Return an instance of
SSLContext used for SSL connection. |
SSLEngineFactory |
getSslEngineFactory() |
Integer |
getSslSessionCacheSize() |
Integer |
getSslSessionTimeout() |
ThreadFactory |
getThreadFactory()
Return the
ThreadFactory an
AsyncHttpClient use for handling asynchronous response. |
String |
getThreadPoolName()
Return the name of
AsyncHttpClient , which is used for thread naming
and debugging. |
String |
getThreadPoolNameOrDefault()
Return the name of
AsyncHttpClient , or default string if name is null or empty. |
String |
getUserAgent()
Return the USER_AGENT header value
|
int |
getWebSocketMaxBufferSize() |
int |
getWebSocketMaxFrameSize() |
int |
getWebSocketTimeout()
Return the maximum time, in milliseconds, a
WebSocket may be idle before being timed
out. |
boolean |
isAcceptAnyCertificate() |
boolean |
isAllowPoolingConnections()
Is the
ChannelPool support enabled. |
boolean |
isCompressionEnforced()
Is HTTP compression enforced.
|
boolean |
isDisableUrlEncodingForBoundRequests() |
boolean |
isDisableZeroCopy() |
boolean |
isFollowRedirect()
Is HTTP redirect enabled
|
boolean |
isKeepEncodingHeader() |
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.
|
public String getAhcVersion()
getAhcVersion
in interface AsyncHttpClientConfig
public String getThreadPoolName()
AsyncHttpClientConfig
AsyncHttpClient
, which is used for thread naming
and debugging.getThreadPoolName
in interface AsyncHttpClientConfig
public String getThreadPoolNameOrDefault()
AsyncHttpClientConfig
AsyncHttpClient
, or default string if name is null or empty.getThreadPoolNameOrDefault
in interface AsyncHttpClientConfig
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 getConnectTimeout()
AsyncHttpClientConfig
AsyncHttpClient
can
wait when connecting to a remote hostgetConnectTimeout
in interface AsyncHttpClientConfig
AsyncHttpClient
can
wait when connecting to a remote hostpublic int getWebSocketTimeout()
AsyncHttpClientConfig
WebSocket
may be idle before being timed
out.getWebSocketTimeout
in interface AsyncHttpClientConfig
WebSocket
may be idle before being
timed out.public int getReadTimeout()
AsyncHttpClientConfig
AsyncHttpClient
can
stay idle.getReadTimeout
in interface AsyncHttpClientConfig
AsyncHttpClient
can
stay idle.public int getPooledConnectionIdleTimeout()
AsyncHttpClientConfig
AsyncHttpClient
will
keep connection in pool.getPooledConnectionIdleTimeout
in interface AsyncHttpClientConfig
AsyncHttpClient
will
keep connection in pool.public int getRequestTimeout()
AsyncHttpClientConfig
AsyncHttpClient
waits
until the response is completed.getRequestTimeout
in interface AsyncHttpClientConfig
AsyncHttpClient
waits
until the response is completed.public boolean isFollowRedirect()
AsyncHttpClientConfig
isFollowRedirect
in interface AsyncHttpClientConfig
public int getMaxRedirects()
AsyncHttpClientConfig
getMaxRedirects
in interface AsyncHttpClientConfig
public boolean isAllowPoolingConnections()
AsyncHttpClientConfig
ChannelPool
support enabled.isAllowPoolingConnections
in interface AsyncHttpClientConfig
public String getUserAgent()
AsyncHttpClientConfig
getUserAgent
in interface AsyncHttpClientConfig
public boolean isCompressionEnforced()
AsyncHttpClientConfig
isCompressionEnforced
in interface AsyncHttpClientConfig
public 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 ProxyServerSelector getProxyServerSelector()
AsyncHttpClientConfig
ProxyServer
used by an AsyncHttpClient
getProxyServerSelector
in interface AsyncHttpClientConfig
ProxyServer
public SSLContext getSSLContext()
AsyncHttpClientConfig
SSLContext
used for SSL connection.getSSLContext
in interface AsyncHttpClientConfig
SSLContext
used for SSL connection.public AdvancedConfig getAdvancedConfig()
AsyncHttpClientConfig
AdvancedConfig
getAdvancedConfig
in interface AsyncHttpClientConfig
AdvancedConfig
public Realm getRealm()
AsyncHttpClientConfig
Realm
getRealm
in interface AsyncHttpClientConfig
Realm
public List<RequestFilter> getRequestFilters()
AsyncHttpClientConfig
RequestFilter
getRequestFilters
in interface AsyncHttpClientConfig
ResponseFilter
public List<ResponseFilter> getResponseFilters()
AsyncHttpClientConfig
ResponseFilter
getResponseFilters
in interface AsyncHttpClientConfig
ResponseFilter
public List<IOExceptionFilter> getIOExceptionFilters()
AsyncHttpClientConfig
IOException
getIOExceptionFilters
in interface AsyncHttpClientConfig
IOException
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 isStrict302Handling()
AsyncHttpClientConfig
isStrict302Handling
in interface AsyncHttpClientConfig
true
if string 302 handling is to be used, otherwise
false
.public int getConnectionTtl()
AsyncHttpClientConfig
AsyncHttpClient
will
keep connection in the pool, or -1 to keep connection while possible.getConnectionTtl
in interface AsyncHttpClientConfig
AsyncHttpClient
will
keep connection in the pool, or -1 to keep connection while
possible.public boolean isAcceptAnyCertificate()
isAcceptAnyCertificate
in interface AsyncHttpClientConfig
public String[] getEnabledProtocols()
getEnabledProtocols
in interface AsyncHttpClientConfig
public String[] getEnabledCipherSuites()
getEnabledCipherSuites
in interface AsyncHttpClientConfig
public Integer getSslSessionCacheSize()
getSslSessionCacheSize
in interface AsyncHttpClientConfig
public Integer getSslSessionTimeout()
getSslSessionTimeout
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 boolean isDisableZeroCopy()
isDisableZeroCopy
in interface AsyncHttpClientConfig
public long getHandshakeTimeout()
getHandshakeTimeout
in interface AsyncHttpClientConfig
public SSLEngineFactory getSslEngineFactory()
getSslEngineFactory
in interface AsyncHttpClientConfig
public int getChunkedFileChunkSize()
getChunkedFileChunkSize
in interface AsyncHttpClientConfig
public int getWebSocketMaxBufferSize()
getWebSocketMaxBufferSize
in interface AsyncHttpClientConfig
public int getWebSocketMaxFrameSize()
getWebSocketMaxFrameSize
in interface AsyncHttpClientConfig
public boolean isKeepEncodingHeader()
isKeepEncodingHeader
in interface AsyncHttpClientConfig
public int getShutdownQuietPeriod()
getShutdownQuietPeriod
in interface AsyncHttpClientConfig
public int getShutdownTimeout()
getShutdownTimeout
in interface AsyncHttpClientConfig
Copyright © 2015. All Rights Reserved.