public class RequestConfig
extends java.lang.Object
implements java.lang.Cloneable
| Modifier and Type | Class and Description |
|---|---|
static class |
RequestConfig.Builder |
| Modifier and Type | Field and Description |
|---|---|
static RequestConfig |
DEFAULT |
| Modifier and Type | Method and Description |
|---|---|
protected RequestConfig |
clone() |
static RequestConfig.Builder |
copy(RequestConfig config) |
static RequestConfig.Builder |
custom() |
int |
getConnectionRequestTimeout()
Returns the timeout in milliseconds used when requesting a connection
from the connection manager.
|
int |
getConnectTimeout()
Determines the timeout in milliseconds until a connection is established.
|
java.lang.String |
getCookieSpec()
Determines the name of the cookie specification to be used for HTTP state
management.
|
java.net.InetAddress |
getLocalAddress()
Returns local address to be used for request execution.
|
int |
getMaxRedirects()
Returns the maximum number of redirects to be followed.
|
HttpHost |
getProxy()
Returns HTTP proxy to be used for request execution.
|
java.util.Collection<java.lang.String> |
getProxyPreferredAuthSchemes()
Determines the order of preference for supported authentication schemes
when authenticating with the proxy host.
|
int |
getSocketTimeout()
Defines the socket timeout (
SO_TIMEOUT) in milliseconds,
which is the timeout for waiting for data or, put differently,
a maximum period inactivity between two consecutive data packets). |
java.util.Collection<java.lang.String> |
getTargetPreferredAuthSchemes()
Determines the order of preference for supported authentication schemes
when authenticating with the target host.
|
boolean |
isAuthenticationEnabled()
Determines whether authentication should be handled automatically.
|
boolean |
isCircularRedirectsAllowed()
Determines whether circular redirects (redirects to the same location) should
be allowed.
|
boolean |
isExpectContinueEnabled()
Determines whether the 'Expect: 100-Continue' handshake is enabled
for entity enclosing methods.
|
boolean |
isRedirectsEnabled()
Determines whether redirects should be handled automatically.
|
boolean |
isRelativeRedirectsAllowed()
Determines whether relative redirects should be rejected.
|
boolean |
isStaleConnectionCheckEnabled()
Determines whether stale connection check is to be used.
|
java.lang.String |
toString() |
public static final RequestConfig DEFAULT
public boolean isExpectContinueEnabled()
falsepublic HttpHost getProxy()
nullpublic java.net.InetAddress getLocalAddress()
nullpublic boolean isStaleConnectionCheckEnabled()
truepublic java.lang.String getCookieSpec()
nullpublic boolean isRedirectsEnabled()
truepublic boolean isRelativeRedirectsAllowed()
truepublic boolean isCircularRedirectsAllowed()
falsepublic int getMaxRedirects()
50public boolean isAuthenticationEnabled()
truepublic java.util.Collection<java.lang.String> getTargetPreferredAuthSchemes()
nullpublic java.util.Collection<java.lang.String> getProxyPreferredAuthSchemes()
nullpublic int getConnectionRequestTimeout()
-1public int getConnectTimeout()
-1public int getSocketTimeout()
SO_TIMEOUT) in milliseconds,
which is the timeout for waiting for data or, put differently,
a maximum period inactivity between two consecutive data packets).
A timeout value of zero is interpreted as an infinite timeout.
A negative value is interpreted as undefined (system default).
Default: -1protected RequestConfig clone() throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic static RequestConfig.Builder custom()
public static RequestConfig.Builder copy(RequestConfig config)