public class DefaultHttpMethodRetryHandler extends Object implements HttpMethodRetryHandler
HttpMethodRetryHandler used by HttpMethods.| 构造器和说明 |
|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 HttpMethodRetryHandlermethod - 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 © 2017. All rights reserved.