public static class SimpleHttpClient.SimpleHttpClientBuilder
extends java.lang.Object
Constructor and Description |
---|
SimpleHttpClientBuilder() |
Modifier and Type | Method and Description |
---|---|
SimpleHttpClient |
build() |
SimpleHttpClient.SimpleHttpClientBuilder |
connectionTimeout(int timeoutInMillis)
Sets the timeout used for the created client.
|
SimpleHttpClient.SimpleHttpClientBuilder |
delayBetweenTries(int delayBetweenTries)
Sets the amount of time, in milliseconds, the client will delay before reissuing a failed request
|
SimpleHttpClient.SimpleHttpClientBuilder |
triesPerRequest(int triesPerRequest)
Sets the number of times a request will be made if it fails.
|
@NotNull public SimpleHttpClient.SimpleHttpClientBuilder connectionTimeout(int timeoutInMillis)
timeoutInMillis
- The duration of the timeout, in milliseconds. A negative value means no timeout@NotNull public SimpleHttpClient.SimpleHttpClientBuilder triesPerRequest(int triesPerRequest)
triesPerRequest
- The number of tries to make, which must be great than 0@NotNull public SimpleHttpClient.SimpleHttpClientBuilder delayBetweenTries(int delayBetweenTries)
delayBetweenTries
- The amount of time, in milliseconds, the client will delay before reissuing a failed request. Must be greater than or equal to 0@NotNull public SimpleHttpClient build()