public static final class StandardHttpRequestor.Config.Builder extends 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,
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(Proxy proxy)
Set proxy configuration for network connections.
|
StandardHttpRequestor.Config.Builder |
withReadTimeout(long timeout,
TimeUnit unit)
Sets timeout for receiving a response from the servers.
|
public StandardHttpRequestor.Config.Builder withProxy(Proxy proxy)
proxy
- Proxy configurationNullPointerException
- if proxy
is null
public StandardHttpRequestor.Config.Builder withNoConnectTimeout()
public StandardHttpRequestor.Config.Builder withConnectTimeout(long timeout, TimeUnit unit)
timeout
- time to wait for a network connection to openunit
- unit of timeIllegalArgumentException
- if timeout
is negativeNullPointerException
- if unit
is null
public StandardHttpRequestor.Config.Builder withNoReadTimeout()
public StandardHttpRequestor.Config.Builder withReadTimeout(long timeout, TimeUnit unit)
timeout
- time to wait for a response from the serverunit
- unit of timeIllegalArgumentException
- if timeout
is negativeNullPointerException
- if unit
is null
public StandardHttpRequestor.Config build()
StandardHttpRequestor.Config
with the values set by this builder.StandardHttpRequestor.Config
with this builder's values