Package org.apache.juneau.rest.client
Class BasicHttpRequestRetryHandler
java.lang.Object
org.apache.http.impl.client.DefaultHttpRequestRetryHandler
org.apache.http.impl.client.StandardHttpRequestRetryHandler
org.apache.juneau.rest.client.BasicHttpRequestRetryHandler
- All Implemented Interfaces:
HttpRequestRetryHandler
An extension of
StandardHttpRequestRetryHandler
that adds support for a retry interval.
See Also:
-
Field Summary
Fields inherited from class org.apache.http.impl.client.DefaultHttpRequestRetryHandler
INSTANCE
-
Constructor Summary
ConstructorDescriptionBasicHttpRequestRetryHandler
(int retryCount, int retryInterval, boolean requestSentRetryEnabled) Create the request retry handler. -
Method Summary
Modifier and TypeMethodDescriptionboolean
retryRequest
(IOException exception, int executionCount, HttpContext context) Methods inherited from class org.apache.http.impl.client.StandardHttpRequestRetryHandler
handleAsIdempotent
Methods inherited from class org.apache.http.impl.client.DefaultHttpRequestRetryHandler
getRetryCount, isRequestSentRetryEnabled, requestIsAborted
-
Constructor Details
-
BasicHttpRequestRetryHandler
public BasicHttpRequestRetryHandler(int retryCount, int retryInterval, boolean requestSentRetryEnabled) Create the request retry handler. Uses the following list of non-retryable IOException classes:- InterruptedIOException
- UnknownHostException
- ConnectException
- SSLException
- Parameters:
retryCount
- How many times to retry.0
means no retries.retryInterval
- The time in milliseconds to sleep before trying again, or<=0
for no interval.requestSentRetryEnabled
- Specifytrue if it's OK to retry non-idempotent requests that have been sent.
-
-
Method Details
-
retryRequest
- Specified by:
retryRequest
in interfaceHttpRequestRetryHandler
- Overrides:
retryRequest
in classDefaultHttpRequestRetryHandler
-