public static final class StandardHttpRequestor.Config.Builder
extends java.lang.Object
StandardHttpRequestor.Config
.Modifier and Type | Method and Description |
---|---|
StandardHttpRequestor.Config |
build()
Returns a
StandardHttpRequestor.Config with the values set by this builder. |
StandardHttpRequestor.Config.Builder |
withConnectTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Set timeout for opening a connection to the servers.
|
StandardHttpRequestor.Config.Builder |
withNoConnectTimeout()
Disables timeouts for opening a connection to the
servers.
|
StandardHttpRequestor.Config.Builder |
withNoReadTimeout()
Disables timeout for receiving a response from the servers.
|
StandardHttpRequestor.Config.Builder |
withProxy(java.net.Proxy proxy)
Set proxy configuration for network connections.
|
StandardHttpRequestor.Config.Builder |
withReadTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Sets timeout for receiving a response from the servers.
|
public StandardHttpRequestor.Config.Builder withProxy(java.net.Proxy proxy)
proxy
- Proxy configurationjava.lang.NullPointerException
- if proxy
is null
public StandardHttpRequestor.Config.Builder withNoConnectTimeout()
public StandardHttpRequestor.Config.Builder withConnectTimeout(long timeout, java.util.concurrent.TimeUnit unit)
timeout
- time to wait for a network connection to openunit
- unit of timejava.lang.IllegalArgumentException
- if timeout
is negativejava.lang.NullPointerException
- if unit
is null
public StandardHttpRequestor.Config.Builder withNoReadTimeout()
public StandardHttpRequestor.Config.Builder withReadTimeout(long timeout, java.util.concurrent.TimeUnit unit)
timeout
- time to wait for a response from the serverunit
- unit of timejava.lang.IllegalArgumentException
- if timeout
is negativejava.lang.NullPointerException
- if unit
is null
public StandardHttpRequestor.Config build()
StandardHttpRequestor.Config
with the values set by this builder.StandardHttpRequestor.Config
with this builder's values