public class DefaultHttpMethodRetryHandler extends Object implements HttpMethodRetryHandler
HttpMethodRetryHandler
used by HttpMethod
s.Constructor and Description |
---|
DefaultHttpMethodRetryHandler()
Creates a new DefaultHttpMethodRetryHandler that retries up to 3 times
but does not retry methods that have successfully sent their requests.
|
DefaultHttpMethodRetryHandler(int retryCount,
boolean requestSentRetryEnabled)
Creates a new DefaultHttpMethodRetryHandler.
|
Modifier and Type | Method and Description |
---|---|
int |
getRetryCount() |
boolean |
isRequestSentRetryEnabled() |
boolean |
retryMethod(HttpMethod method,
IOException exception,
int executionCount)
Used
retryCount and requestSentRetryEnabled to determine
if the given method should be retried. |
public DefaultHttpMethodRetryHandler(int retryCount, boolean requestSentRetryEnabled)
retryCount
- the number of times a method will be retriedrequestSentRetryEnabled
- if true, methods that have successfully sent their request will be retriedpublic DefaultHttpMethodRetryHandler()
public boolean retryMethod(HttpMethod method, IOException exception, int executionCount)
retryCount
and requestSentRetryEnabled
to determine
if the given method should be retried.retryMethod
in interface HttpMethodRetryHandler
method
- the method being executedexception
- the exception that occurredexecutionCount
- the number of times this method has been
unsuccessfully executedtrue
if the method should be retried, false
otherwiseHttpMethodRetryHandler.retryMethod(HttpMethod, IOException, int)
public boolean isRequestSentRetryEnabled()
true
if this handler will retry methods that have
successfully sent their request, false
otherwisepublic int getRetryCount()
Copyright © 2020 Internet2. All rights reserved.