public class RetryHttpRequestInitializer
extends java.lang.Object
implements com.google.api.client.http.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,
com.google.api.client.http.HttpResponseInterceptor responseInterceptor) |
Modifier and Type | Method and Description |
---|---|
void |
initialize(com.google.api.client.http.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 com.google.api.client.http.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(com.google.api.client.http.HttpRequest request) throws java.io.IOException
initialize
in interface com.google.api.client.http.HttpRequestInitializer
java.io.IOException
public void setCustomErrors(CustomHttpErrors customErrors)
public void setWriteTimeout(int writeTimeout)