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
ConstructorsConstructorDescriptionBasicHttpRequestRetryHandler(int retryCount, int retryInterval, boolean requestSentRetryEnabled) Create the request retry handler. -
Method Summary
Modifier and TypeMethodDescriptionbooleanretryRequest(IOException exception, int executionCount, HttpContext context) Methods inherited from class org.apache.http.impl.client.StandardHttpRequestRetryHandler
handleAsIdempotentMethods 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.0means no retries.retryInterval- The time in milliseconds to sleep before trying again, or<=0for no interval.requestSentRetryEnabled- Specifytrue if it's OK to retry non-idempotent requests that have been sent.
-
-
Method Details
-
retryRequest
- Specified by:
retryRequestin interfaceHttpRequestRetryHandler- Overrides:
retryRequestin classDefaultHttpRequestRetryHandler
-