java.lang.Object | |
↳ | com.ning.http.client.AsyncHttpClientConfig.Builder |
Builder for an AsyncHttpClient
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a config builder with values taken from the given prototype configuration.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add an
IOExceptionFilter that will be invoked when an java.io.IOException
occurs during the download/upload operations. | |||||||||||
Add an
RequestFilter that will be invoked before executeRequest(Request) | |||||||||||
Add an
ResponseFilter that will be invoked as soon as the response is
received, and before onStatusReceived(HttpResponseStatus) . | |||||||||||
Build an
AsyncHttpClientConfig | |||||||||||
Return the compression level, or -1 if no compression is used.
| |||||||||||
Remove an
IOExceptionFilter tthat will be invoked when an java.io.IOException
occurs during the download/upload operations. | |||||||||||
Remove an
RequestFilter that will be invoked before executeRequest(Request) | |||||||||||
Remove an
ResponseFilter that will be invoked as soon as the response is
received, and before onStatusReceived(HttpResponseStatus) . | |||||||||||
Set true if connection can be pooled by a
ConnectionsPool . | |||||||||||
Return true is if connections pooling is enabled.
| |||||||||||
Set the
AsyncHttpProviderConfig | |||||||||||
Enable HTTP compression.
| |||||||||||
Set the maximum time in millisecond an
AsyncHttpClient can wait when connecting to a remote host | |||||||||||
Set the
ConnectionsPool | |||||||||||
Set the java.util.concurrent.ExecutorService an
AsyncHttpClient use for handling
asynchronous response. | |||||||||||
Set to true to enable HTTP redirect
| |||||||||||
Set the HostnameVerifier
| |||||||||||
Set the maximum time in millisecond an
AsyncHttpClient will keep connection
idle in pool. | |||||||||||
Set the maximum time in millisecond an
AsyncHttpClient can stay idle. | |||||||||||
This method is deprecated.
- Use
setAllowPoolingConnection(boolean)
| |||||||||||
Set the number of time a request will be retried when an java.io.IOException occurs because of a Network exception.
| |||||||||||
Set the maximum number of connections per hosts an
AsyncHttpClient can handle. | |||||||||||
Set the maximum number of connections an
AsyncHttpClient can handle. | |||||||||||
Set the maximum number of HTTP redirect
| |||||||||||
Set an instance of
ProxyServer used by an AsyncHttpClient | |||||||||||
Set the
Realm that will be used for all requests. | |||||||||||
Set to false if you don't want the query parameters removed when a redirect occurs.
| |||||||||||
Set the compression level, or -1 if no compression is used.
| |||||||||||
Set the maximum time in millisecond an
AsyncHttpClient wait for a response | |||||||||||
Set the SSLContext for secure connection.
| |||||||||||
Set the
SSLEngineFactory for secure connection. | |||||||||||
Set theScheduledExecutorService used to expire idle connections.
| |||||||||||
Configures this AHC instance to be strict in it's handling of 302 redirects
in a POST/Redirect/GET situation.
| |||||||||||
Sets whether AHC should use the default http.proxy* system properties
to obtain proxy information.
| |||||||||||
Allows use unescaped URLs in requests
useful for retrieving data from broken sites
| |||||||||||
Set the USER_AGENT header value
| |||||||||||
Set the maximum time in millisecond an
WebSocket can stay idle. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Create a config builder with values taken from the given prototype configuration.
prototype | the configuration to use as a prototype. |
---|
Add an IOExceptionFilter
that will be invoked when an java.io.IOException
occurs during the download/upload operations.
ioExceptionFilter | an ResponseFilter |
---|
Add an RequestFilter
that will be invoked before executeRequest(Request)
requestFilter | RequestFilter |
---|
Add an ResponseFilter
that will be invoked as soon as the response is
received, and before onStatusReceived(HttpResponseStatus)
.
responseFilter | an ResponseFilter |
---|
Return the compression level, or -1 if no compression is used.
Remove an IOExceptionFilter
tthat will be invoked when an java.io.IOException
occurs during the download/upload operations.
ioExceptionFilter | an ResponseFilter |
---|
Remove an RequestFilter
that will be invoked before executeRequest(Request)
requestFilter | RequestFilter |
---|
Remove an ResponseFilter
that will be invoked as soon as the response is
received, and before onStatusReceived(HttpResponseStatus)
.
responseFilter | an ResponseFilter |
---|
Set true if connection can be pooled by a ConnectionsPool
. Default is true.
allowPoolingConnection | true if connection can be pooled by a ConnectionsPool |
---|
Return true is if connections pooling is enabled.
allowSslConnectionPool | true if enabled |
---|
Enable HTTP compression.
compressionEnabled | true if compression is enabled |
---|
Set the maximum time in millisecond an 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 |
---|
Set the java.util.concurrent.ExecutorService an AsyncHttpClient
use for handling
asynchronous response.
applicationThreadPool | the java.util.concurrent.ExecutorService an AsyncHttpClient use for handling
asynchronous response. |
---|
Set to true to enable HTTP redirect
redirectEnabled | true if enabled. |
---|
Set the HostnameVerifier
hostnameVerifier | HostnameVerifier |
---|
Set the maximum time in millisecond an AsyncHttpClient
will keep connection
idle in pool.
defaultIdleConnectionInPoolTimeoutInMs | the maximum time in millisecond an AsyncHttpClient will keep connection
idle in pool. |
---|
Set the maximum time in millisecond an AsyncHttpClient
can stay idle.
defaultIdleConnectionTimeoutInMs | the maximum time in millisecond an AsyncHttpClient can stay idle. |
---|
This method is deprecated.
- Use setAllowPoolingConnection(boolean)
Set true if connection can be pooled by a ConnectionsPool
. Default is true.
allowPoolingConnection | true if connection can be pooled by a ConnectionsPool |
---|
Set the number of time a request will be retried when an java.io.IOException occurs because of a Network exception.
maxRequestRetry | the number of time a request will be retried |
---|
Set the maximum number of connections per hosts an AsyncHttpClient
can handle.
defaultMaxConnectionPerHost | the maximum number of connections per host an AsyncHttpClient can handle. |
---|
Set the maximum number of connections an AsyncHttpClient
can handle.
defaultMaxTotalConnections | the maximum number of connections an AsyncHttpClient can handle. |
---|
Set the maximum number of HTTP redirect
maxDefaultRedirects | the maximum number of HTTP redirect |
---|
Set an instance of ProxyServer
used by an AsyncHttpClient
proxyServer | instance of ProxyServer |
---|
Set to false if you don't want the query parameters removed when a redirect occurs.
Set the compression level, or -1 if no compression is used.
requestCompressionLevel | compression level, or -1 if no compression is use |
---|
Set the maximum time in millisecond an AsyncHttpClient
wait for a response
defaultRequestTimeoutInMs | the maximum time in millisecond an AsyncHttpClient wait for a response |
---|
Set the SSLContext for secure connection.
sslContext | the SSLContext for secure connection |
---|
Set the SSLEngineFactory
for secure connection.
sslEngineFactory | the SSLEngineFactory for secure connection |
---|
Set theScheduledExecutorService used to expire idle connections.
reaper | theScheduledExecutorService used to expire idle connections. |
---|
Configures this AHC instance to be strict in it's handling of 302 redirects in a POST/Redirect/GET situation.
strict302Handling | strict handling |
---|
Sets whether AHC should use the default http.proxy* system properties to obtain proxy information.
If useProxyProperties is set totrue
but setProxyServer(ProxyServer)
was used
to explicitly set a proxy server, the latter is preferred.
See http://download.oracle.com/javase/1.4.2/docs/guide/net/properties.html
Allows use unescaped URLs in requests useful for retrieving data from broken sites
Set the USER_AGENT header value
userAgent | the USER_AGENT header value |
---|