|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ning.http.client.AsyncHttpClientConfig
public class AsyncHttpClientConfig
Configuration class to use with a AsyncHttpClient
. System property can be also used to configure this
object default behavior by doing:
Nested Class Summary | |
---|---|
static class |
AsyncHttpClientConfig.Builder
Builder for an AsyncHttpClient |
Field Summary | |
---|---|
protected boolean |
allowPoolingConnection
|
protected boolean |
allowSslConnectionPool
|
protected java.util.concurrent.ExecutorService |
applicationThreadPool
|
protected static java.lang.String |
ASYNC_CLIENT
|
protected boolean |
compressionEnabled
|
protected ConnectionsPool<?,?> |
connectionsPool
|
protected int |
connectionTimeOutInMs
|
protected javax.net.ssl.HostnameVerifier |
hostnameVerifier
|
protected int |
idleConnectionInPoolTimeoutInMs
|
protected java.util.List<IOExceptionFilter> |
ioExceptionFilters
|
protected int |
ioThreadMultiplier
|
protected int |
maxConnectionPerHost
|
protected int |
maxDefaultRedirects
|
protected int |
maxRequestRetry
|
protected int |
maxTotalConnections
|
protected AsyncHttpProviderConfig<?,?> |
providerConfig
|
protected ProxyServer |
proxyServer
|
protected Realm |
realm
|
protected java.util.concurrent.ScheduledExecutorService |
reaper
|
protected boolean |
redirectEnabled
|
protected boolean |
removeQueryParamOnRedirect
|
protected int |
requestCompressionLevel
|
protected java.util.List<RequestFilter> |
requestFilters
|
protected int |
requestTimeoutInMs
|
protected java.util.List<ResponseFilter> |
responseFilters
|
protected javax.net.ssl.SSLContext |
sslContext
|
protected SSLEngineFactory |
sslEngineFactory
|
protected java.lang.String |
userAgent
|
protected boolean |
useRawUrl
|
Constructor Summary | |
---|---|
protected |
AsyncHttpClientConfig()
|
Method Summary | |
---|---|
java.util.concurrent.ExecutorService |
executorService()
Return the ExecutorService an AsyncHttpClient use for handling
asynchronous response. |
boolean |
getAllowPoolingConnection()
Is the ConnectionsPool support enabled. |
AsyncHttpProviderConfig<?,?> |
getAsyncHttpProviderConfig()
Return the AsyncHttpProviderConfig |
ConnectionsPool<?,?> |
getConnectionsPool()
Return an instance of ConnectionsPool |
int |
getConnectionTimeoutInMs()
Return the maximum time in millisecond an AsyncHttpClient can wait when connecting to a remote host |
javax.net.ssl.HostnameVerifier |
getHostnameVerifier()
Return the HostnameVerifier |
int |
getIdleConnectionInPoolTimeoutInMs()
Return the maximum time in millisecond an AsyncHttpClient will keep connection
in pool. |
int |
getIdleConnectionTimeoutInMs()
Deprecated. Please use getIdleConnectionInPoolTimeoutInMs() |
java.util.List<IOExceptionFilter> |
getIOExceptionFilters()
Return the list of IOException |
int |
getIoThreadMultiplier()
|
boolean |
getKeepAlive()
Deprecated. - Use getAllowPoolingConnection() |
int |
getMaxConnectionPerHost()
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 |
getMaxTotalConnections()
Return the maximum number of connections an AsyncHttpClient can handle. |
ProxyServer |
getProxyServer()
An instance of ProxyServer used by an AsyncHttpClient |
Realm |
getRealm()
Return the current Realm } |
int |
getRequestCompressionLevel()
Return the compression level, or -1 if no compression is used. |
java.util.List<RequestFilter> |
getRequestFilters()
Return the list of RequestFilter |
int |
getRequestTimeoutInMs()
Return the maximum time in millisecond an AsyncHttpClient wait for a response |
java.util.List<ResponseFilter> |
getResponseFilters()
Return the list of ResponseFilter |
javax.net.ssl.SSLContext |
getSSLContext()
Return an instance of SSLContext used for SSL connection. |
SSLEngineFactory |
getSSLEngineFactory()
Return an instance of SSLEngineFactory used for SSL connection. |
java.lang.String |
getUserAgent()
Return the USER_AGENT header value |
boolean |
isClosed()
Return true if one of the ExecutorService has been shutdown. |
boolean |
isCompressionEnabled()
Is HTTP compression enabled. |
boolean |
isRedirectEnabled()
Is HTTP redirect enabled |
boolean |
isRemoveQueryParamOnRedirect()
Return true if the query parameters will be stripped from the request when a redirect is requested. |
boolean |
isSslConnectionPoolEnabled()
Return true is SSL connection polling is enabled. |
boolean |
isUseRawUrl()
|
java.util.concurrent.ScheduledExecutorService |
reaper()
A ScheduledExecutorService used to expire idle connections. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String ASYNC_CLIENT
protected int maxTotalConnections
protected int maxConnectionPerHost
protected int connectionTimeOutInMs
protected int idleConnectionInPoolTimeoutInMs
protected int requestTimeoutInMs
protected boolean redirectEnabled
protected int maxDefaultRedirects
protected boolean compressionEnabled
protected java.lang.String userAgent
protected boolean allowPoolingConnection
protected java.util.concurrent.ScheduledExecutorService reaper
protected java.util.concurrent.ExecutorService applicationThreadPool
protected ProxyServer proxyServer
protected javax.net.ssl.SSLContext sslContext
protected SSLEngineFactory sslEngineFactory
protected AsyncHttpProviderConfig<?,?> providerConfig
protected ConnectionsPool<?,?> connectionsPool
protected Realm realm
protected java.util.List<RequestFilter> requestFilters
protected java.util.List<ResponseFilter> responseFilters
protected java.util.List<IOExceptionFilter> ioExceptionFilters
protected int requestCompressionLevel
protected int maxRequestRetry
protected boolean allowSslConnectionPool
protected boolean useRawUrl
protected boolean removeQueryParamOnRedirect
protected javax.net.ssl.HostnameVerifier hostnameVerifier
protected int ioThreadMultiplier
Constructor Detail |
---|
protected AsyncHttpClientConfig()
Method Detail |
---|
public java.util.concurrent.ScheduledExecutorService reaper()
ScheduledExecutorService
used to expire idle connections.
ScheduledExecutorService
public int getMaxTotalConnections()
AsyncHttpClient
can handle.
AsyncHttpClient
can handle.public int getMaxConnectionPerHost()
AsyncHttpClient
can handle.
AsyncHttpClient
can handle.public int getConnectionTimeoutInMs()
AsyncHttpClient
can wait when connecting to a remote host
AsyncHttpClient
can wait when connecting to a remote hostpublic int getIdleConnectionTimeoutInMs()
getIdleConnectionInPoolTimeoutInMs()
AsyncHttpClient
can stay idle.
AsyncHttpClient
can stay idle.public int getIdleConnectionInPoolTimeoutInMs()
AsyncHttpClient
will keep connection
in pool.
AsyncHttpClient
will keep connection
in pool.public int getRequestTimeoutInMs()
AsyncHttpClient
wait for a response
AsyncHttpClient
wait for a responsepublic boolean isRedirectEnabled()
public int getMaxRedirects()
public boolean getAllowPoolingConnection()
ConnectionsPool
support enabled.
public boolean getKeepAlive()
getAllowPoolingConnection()
ConnectionsPool
support enabled.
public java.lang.String getUserAgent()
public boolean isCompressionEnabled()
public java.util.concurrent.ExecutorService executorService()
ExecutorService
an AsyncHttpClient
use for handling
asynchronous response.
ExecutorService
an AsyncHttpClient
use for handling
asynchronous response.public ProxyServer getProxyServer()
ProxyServer
used by an AsyncHttpClient
ProxyServer
public javax.net.ssl.SSLContext getSSLContext()
SSLContext
used for SSL connection.
SSLContext
used for SSL connection.public ConnectionsPool<?,?> getConnectionsPool()
ConnectionsPool
ConnectionsPool
public SSLEngineFactory getSSLEngineFactory()
SSLEngineFactory
used for SSL connection.
SSLEngineFactory
used for SSL connection.public AsyncHttpProviderConfig<?,?> getAsyncHttpProviderConfig()
AsyncHttpProviderConfig
AsyncHttpProviderConfig
public Realm getRealm()
Realm
}
Realm
}public java.util.List<RequestFilter> getRequestFilters()
RequestFilter
ResponseFilter
public java.util.List<ResponseFilter> getResponseFilters()
ResponseFilter
ResponseFilter
public java.util.List<IOExceptionFilter> getIOExceptionFilters()
IOException
IOException
public int getRequestCompressionLevel()
public int getMaxRequestRetry()
IOException
is throw by the remote server
IOException
is throw by the remote serverpublic boolean isSslConnectionPoolEnabled()
public boolean isUseRawUrl()
public boolean isRemoveQueryParamOnRedirect()
public boolean isClosed()
ExecutorService
has been shutdown.
ExecutorService
has been shutdown.public javax.net.ssl.HostnameVerifier getHostnameVerifier()
HostnameVerifier
HostnameVerifier
public int getIoThreadMultiplier()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |