public static final class StandardHttpRequestor.Config
extends java.lang.Object
StandardHttpRequestor
that determines
how network connections to the server are established.
Use this class to configure timeouts and proxy settings.
Some requests may require different connection settings than
others. Create multiple StandardHttpRequestor
objects
with different configurations to handle these requests. For
example, calls to DbxUserFilesRequests.listFolderLongpoll(String,long)
should
use a StandardHttpRequestor
with its read timeout (see
StandardHttpRequestor.Config.Builder.withReadTimeout(long, java.util.concurrent.TimeUnit)
) set longer than the longpoll
timeout.Modifier and Type | Class and Description |
---|---|
static class |
StandardHttpRequestor.Config.Builder
Builder for
StandardHttpRequestor.Config . |
Modifier and Type | Field and Description |
---|---|
static StandardHttpRequestor.Config |
DEFAULT_INSTANCE
StandardHttpRequestor.Config with all its attributes set to their default
values. |
Modifier and Type | Method and Description |
---|---|
static StandardHttpRequestor.Config.Builder |
builder()
Returns a new builder for creating a
StandardHttpRequestor.Config . |
StandardHttpRequestor.Config.Builder |
copy()
Returns a new builder for creating a copy of this
config.
|
long |
getConnectTimeoutMillis()
Returns the timeout, in milliseconds, for opening a
connection to the servers.
|
java.net.Proxy |
getProxy()
Returns the proxy configuration for network connections.
|
long |
getReadTimeoutMillis()
Returns the timeout, in milliseconds, for receiving a
response from the servers.
|
public static final StandardHttpRequestor.Config DEFAULT_INSTANCE
StandardHttpRequestor.Config
with all its attributes set to their default
values.public java.net.Proxy getProxy()
public long getConnectTimeoutMillis()
public long getReadTimeoutMillis()
public StandardHttpRequestor.Config.Builder copy()
public static StandardHttpRequestor.Config.Builder builder()
StandardHttpRequestor.Config
.