|
||||||||||
| 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 |
| Constructor Summary | |
|---|---|
protected |
AsyncHttpClientConfig()
|
| Method Summary | |
|---|---|
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 |
HostnameVerifier |
getHostnameVerifier()
Return the HostnameVerifier |
int |
getIdleConnectionInPoolTimeoutInMs()
Return the maximum time in millisecond an AsyncHttpClient will keep connection
in pool. |
int |
getIdleConnectionTimeoutInMs()
Return the maximum time in millisecond an AsyncHttpClient can stay idle. |
List<IOExceptionFilter> |
getIOExceptionFilters()
Return the list of IOException |
int |
getIoThreadMultiplier()
|
boolean |
getKeepAlive()
Deprecated. - Use getAllowPoolingConnection() |
int |
getMaxConnectionLifeTimeInMs()
Return the maximum time in millisecond an AsyncHttpClient will keep connection in the pool, or -1 to keep connection while possible. |
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. |
ProxyServerSelector |
getProxyServerSelector()
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. |
List<RequestFilter> |
getRequestFilters()
Return the list of RequestFilter |
int |
getRequestTimeoutInMs()
Return the maximum time in millisecond an AsyncHttpClient wait for a response |
List<ResponseFilter> |
getResponseFilters()
Return the list of ResponseFilter |
SSLContext |
getSSLContext()
Return an instance of SSLContext used for SSL connection. |
SSLEngineFactory |
getSSLEngineFactory()
Return an instance of SSLEngineFactory used for SSL connection. |
TimeConverter |
getTimeConverter()
|
String |
getUserAgent()
Return the USER_AGENT header value |
int |
getWebSocketIdleTimeoutInMs()
Return the maximum time, in milliseconds, a WebSocket may be idle before being timed out. |
boolean |
isClosed()
Deprecated. use #isValid |
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 |
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 |
isUseRawUrl()
|
boolean |
isUseRelativeURIsWithConnectProxies()
|
boolean |
isUseRelativeURIsWithSSLProxies()
Deprecated. Use isUseRelativeURIsWithConnectProxies instead. |
boolean |
isValid()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int maxTotalConnections
protected int maxConnectionPerHost
protected int connectionTimeOutInMs
protected int webSocketIdleTimeoutInMs
protected int idleConnectionInPoolTimeoutInMs
protected int idleConnectionTimeoutInMs
protected int requestTimeoutInMs
protected boolean redirectEnabled
protected int maxRedirects
protected boolean compressionEnabled
protected String userAgent
protected boolean allowPoolingConnection
protected ExecutorService applicationThreadPool
protected ProxyServerSelector proxyServerSelector
protected SSLContext sslContext
protected SSLEngineFactory sslEngineFactory
protected AsyncHttpProviderConfig<?,?> providerConfig
protected ConnectionsPool<?,?> connectionsPool
protected Realm realm
protected List<RequestFilter> requestFilters
protected List<ResponseFilter> responseFilters
protected List<IOExceptionFilter> ioExceptionFilters
protected int requestCompressionLevel
protected int maxRequestRetry
protected boolean allowSslConnectionPool
protected boolean useRawUrl
protected boolean removeQueryParamOnRedirect
protected HostnameVerifier hostnameVerifier
protected int ioThreadMultiplier
protected boolean strict302Handling
protected boolean useRelativeURIsWithConnectProxies
protected int maxConnectionLifeTimeInMs
protected TimeConverter timeConverter
| Constructor Detail |
|---|
protected AsyncHttpClientConfig()
| Method Detail |
|---|
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 getWebSocketIdleTimeoutInMs()
WebSocket may be idle before being timed out.
WebSocket may be idle before being timed out.public int getIdleConnectionTimeoutInMs()
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 String getUserAgent()
public boolean isCompressionEnabled()
public ExecutorService executorService()
ExecutorService an AsyncHttpClient use for handling
asynchronous response.
ExecutorService an AsyncHttpClient use for handling
asynchronous response.public ProxyServerSelector getProxyServerSelector()
ProxyServer used by an AsyncHttpClient
ProxyServerpublic SSLContext getSSLContext()
SSLContext used for SSL connection.
SSLContext used for SSL connection.public ConnectionsPool<?,?> getConnectionsPool()
ConnectionsPool
ConnectionsPoolpublic SSLEngineFactory getSSLEngineFactory()
SSLEngineFactory used for SSL connection.
SSLEngineFactory used for SSL connection.public AsyncHttpProviderConfig<?,?> getAsyncHttpProviderConfig()
AsyncHttpProviderConfig
AsyncHttpProviderConfigpublic Realm getRealm()
Realm}
Realm}public List<RequestFilter> getRequestFilters()
RequestFilter
ResponseFilterpublic List<ResponseFilter> getResponseFilters()
ResponseFilter
ResponseFilterpublic List<IOExceptionFilter> getIOExceptionFilters()
IOException
IOExceptionpublic 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 boolean isValid()
true if both the application and reaper thread pools
haven't yet been shutdown.public HostnameVerifier getHostnameVerifier()
HostnameVerifier
HostnameVerifierpublic int getIoThreadMultiplier()
public 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. Unless configured otherwise, for a 302, AHC, will use a GET for this case.
true if string 302 handling is to be used,
otherwise false.@Deprecated public boolean isUseRelativeURIsWithSSLProxies()
public boolean isUseRelativeURIsWithConnectProxies()
public int getMaxConnectionLifeTimeInMs()
AsyncHttpClient will keep connection in the pool, or -1 to keep connection while possible.
AsyncHttpClient will keep connection in the pool, or -1 to keep connection while possible.public TimeConverter getTimeConverter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||