Package com.dropbox.core.http
Class StandardHttpRequestor.Config.Builder
- java.lang.Object
- 
- com.dropbox.core.http.StandardHttpRequestor.Config.Builder
 
- 
- Enclosing class:
- StandardHttpRequestor.Config
 
 public static final class StandardHttpRequestor.Config.Builder extends java.lang.ObjectBuilder forStandardHttpRequestor.Config.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StandardHttpRequestor.Configbuild()Returns aStandardHttpRequestor.Configwith the values set by this builder.StandardHttpRequestor.Config.BuilderwithConnectTimeout(long timeout, java.util.concurrent.TimeUnit unit)Set timeout for opening a connection to the servers.StandardHttpRequestor.Config.BuilderwithNoConnectTimeout()Disables timeouts for opening a connection to the servers.StandardHttpRequestor.Config.BuilderwithNoReadTimeout()Disables timeout for receiving a response from the servers.StandardHttpRequestor.Config.BuilderwithProxy(java.net.Proxy proxy)Set proxy configuration for network connections.StandardHttpRequestor.Config.BuilderwithReadTimeout(long timeout, java.util.concurrent.TimeUnit unit)Sets timeout for receiving a response from the servers.
 
- 
- 
- 
Method Detail- 
withProxypublic StandardHttpRequestor.Config.Builder withProxy(java.net.Proxy proxy) Set proxy configuration for network connections.- Parameters:
- proxy- Proxy configuration
- Returns:
- this builder
- Throws:
- java.lang.NullPointerException- if- proxyis- null
 
 - 
withNoConnectTimeoutpublic StandardHttpRequestor.Config.Builder withNoConnectTimeout() Disables timeouts for opening a connection to the servers.- Returns:
- this builder
 
 - 
withConnectTimeoutpublic StandardHttpRequestor.Config.Builder withConnectTimeout(long timeout, java.util.concurrent.TimeUnit unit) Set timeout for opening a connection to the servers. A timeout of 0 will disable any connnect timeouts.- Parameters:
- timeout- time to wait for a network connection to open
- unit- unit of time
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- if- timeoutis negative
- java.lang.NullPointerException- if- unitis- null
 
 - 
withNoReadTimeoutpublic StandardHttpRequestor.Config.Builder withNoReadTimeout() Disables timeout for receiving a response from the servers.- Returns:
- this builder
 
 - 
withReadTimeoutpublic StandardHttpRequestor.Config.Builder withReadTimeout(long timeout, java.util.concurrent.TimeUnit unit) Sets timeout for receiving a response from the servers. This timeout is not for receiving the entire server response. A server that responds with bytes slowly will not trigger the timeout, unless the specified amount of time has passed between received bytes. A timeout of 0 will disable any read timeouts.- Parameters:
- timeout- time to wait for a response from the server
- unit- unit of time
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- if- timeoutis negative
- java.lang.NullPointerException- if- unitis- null
 
 - 
buildpublic StandardHttpRequestor.Config build() Returns aStandardHttpRequestor.Configwith the values set by this builder.- Returns:
- StandardHttpRequestor.Configwith this builder's values
 
 
- 
 
-