|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ning.http.client.AsyncHttpClientConfig.Builder
public static class AsyncHttpClientConfig.Builder
Builder for an AsyncHttpClient
| Constructor Summary | |
|---|---|
AsyncHttpClientConfig.Builder()
|
|
| Method Summary | |
|---|---|
AsyncHttpClientConfig |
build()
Build an AsyncHttpClientConfig |
AsyncHttpClientConfig.Builder |
setCompressionEnabled(boolean compressionEnabled)
Enable HTTP compression. |
AsyncHttpClientConfig.Builder |
setConnectionTimeoutInMs(int defaultConnectionTimeOutInMs)
Set the maximum time in millisecond an AsyncHttpClient can wait when connecting to a remote host |
AsyncHttpClientConfig.Builder |
setExecutorService(ExecutorService applicationThreadPool)
Set the ExecutorService an AsyncHttpClient use for handling
asynchronous response. |
AsyncHttpClientConfig.Builder |
setFollowRedirects(boolean redirectEnabled)
Set to true to enable HTTP redirect |
AsyncHttpClientConfig.Builder |
setIdleConnectionTimeoutInMs(int defaultIdleConnectionTimeoutInMs)
Set the maximum time in millisecond an AsyncHttpClient can stay idle. |
AsyncHttpClientConfig.Builder |
setKeepAlive(boolean keepAlive)
Set HTTP keep-alive value. |
AsyncHttpClientConfig.Builder |
setMaximumConnectionsPerHost(int defaultMaxConnectionPerHost)
Set the maximum number of connections per hosts an AsyncHttpClient can handle. |
AsyncHttpClientConfig.Builder |
setMaximumConnectionsTotal(int defaultMaxTotalConnections)
Set the maximum number of connections an AsyncHttpClient can handle. |
AsyncHttpClientConfig.Builder |
setMaximumNumberOfRedirects(int maxDefaultRedirects)
Set the maximum number of HTTP redirect |
AsyncHttpClientConfig.Builder |
setProxyServer(ProxyServer proxyServer)
Set an instance of ProxyServer used by an AsyncHttpClient |
AsyncHttpClientConfig.Builder |
setRequestTimeoutInMs(int defaultRequestTimeoutInMs)
Set the maximum time in millisecond an AsyncHttpClient wait for a response |
AsyncHttpClientConfig.Builder |
setScheduledExecutorService(ScheduledExecutorService reaper)
Set the ScheduledExecutorService used to expire idle connections. |
AsyncHttpClientConfig.Builder |
setSSLEngine(SSLEngine sslEngine)
Set the SSLEngine for secure connection. |
AsyncHttpClientConfig.Builder |
setUserAgent(String userAgent)
Set the USER_AGENT header value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsyncHttpClientConfig.Builder()
| Method Detail |
|---|
public AsyncHttpClientConfig.Builder setMaximumConnectionsTotal(int defaultMaxTotalConnections)
AsyncHttpClient can handle.
defaultMaxTotalConnections - the maximum number of connections an AsyncHttpClient can handle.
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setMaximumConnectionsPerHost(int defaultMaxConnectionPerHost)
AsyncHttpClient can handle.
defaultMaxConnectionPerHost - the maximum number of connections per host an AsyncHttpClient can handle.
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setConnectionTimeoutInMs(int defaultConnectionTimeOutInMs)
AsyncHttpClient can wait when connecting to a remote host
defaultConnectionTimeOutInMs - the maximum time in millisecond an AsyncHttpClient can wait when connecting to a remote host
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setIdleConnectionTimeoutInMs(int defaultIdleConnectionTimeoutInMs)
AsyncHttpClient can stay idle.
defaultIdleConnectionTimeoutInMs - the maximum time in millisecond an AsyncHttpClient can stay idle.
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setRequestTimeoutInMs(int defaultRequestTimeoutInMs)
AsyncHttpClient wait for a response
defaultRequestTimeoutInMs - the maximum time in millisecond an AsyncHttpClient wait for a response
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setFollowRedirects(boolean redirectEnabled)
redirectEnabled - true if enabled.
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setMaximumNumberOfRedirects(int maxDefaultRedirects)
maxDefaultRedirects - the maximum number of HTTP redirect
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setCompressionEnabled(boolean compressionEnabled)
compressionEnabled - true if compression is enabled
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setUserAgent(String userAgent)
userAgent - the USER_AGENT header value
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setKeepAlive(boolean keepAlive)
keepAlive - true if keep-alive is enabled
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setScheduledExecutorService(ScheduledExecutorService reaper)
ScheduledExecutorService used to expire idle connections.
reaper - theScheduledExecutorService used to expire idle connections.
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setExecutorService(ExecutorService applicationThreadPool)
ExecutorService an AsyncHttpClient use for handling
asynchronous response.
applicationThreadPool - the ExecutorService an AsyncHttpClient use for handling
asynchronous response.
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setProxyServer(ProxyServer proxyServer)
ProxyServer used by an AsyncHttpClient
proxyServer - instance of ProxyServer
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig.Builder setSSLEngine(SSLEngine sslEngine)
SSLEngine for secure connection.
sslEngine - the SSLEngine for secure connection
AsyncHttpClientConfig.Builderpublic AsyncHttpClientConfig build()
AsyncHttpClientConfig
AsyncHttpClientConfig
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||