public class RetryHttpRequestInitializer extends java.lang.Object implements HttpRequestInitializer
Also can take a HttpResponseInterceptor to be applied to the responses.
Constructor and Description |
---|
RetryHttpRequestInitializer() |
RetryHttpRequestInitializer(java.util.Collection<java.lang.Integer> additionalIgnoredResponseCodes) |
RetryHttpRequestInitializer(java.util.Collection<java.lang.Integer> additionalIgnoredResponseCodes,
HttpResponseInterceptor responseInterceptor) |
Modifier and Type | Method and Description |
---|---|
void |
initialize(HttpRequest request) |
void |
setCustomErrors(CustomHttpErrors customErrors) |
void |
setWriteTimeout(int writeTimeout) |
public RetryHttpRequestInitializer()
public RetryHttpRequestInitializer(java.util.Collection<java.lang.Integer> additionalIgnoredResponseCodes)
additionalIgnoredResponseCodes
- a list of HTTP status codes that should not be logged.public RetryHttpRequestInitializer(java.util.Collection<java.lang.Integer> additionalIgnoredResponseCodes, @Nullable HttpResponseInterceptor responseInterceptor)
additionalIgnoredResponseCodes
- a list of HTTP status codes that should not be logged.responseInterceptor
- HttpResponseInterceptor to be applied on all requests. May be null.public void initialize(HttpRequest request) throws java.io.IOException
initialize
in interface HttpRequestInitializer
java.io.IOException
public void setCustomErrors(CustomHttpErrors customErrors)
public void setWriteTimeout(int writeTimeout)