Package org.apache.commons.httpclient
Class DefaultMethodRetryHandler
java.lang.Object
org.apache.commons.httpclient.DefaultMethodRetryHandler
- All Implemented Interfaces:
MethodRetryHandler
Deprecated.
The default MethodRetryHandler used by HttpMethodBase.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintDeprecated.booleanDeprecated.booleanretryMethod(HttpMethod method, HttpConnection connection, HttpRecoverableException recoverableException, int executionCount, boolean requestSent) Deprecated.UsedretryCountandrequestSentRetryEnabledto determine if the given method should be retried.voidsetRequestSentRetryEnabled(boolean requestSentRetryEnabled) Deprecated.voidsetRetryCount(int retryCount) Deprecated.
-
Constructor Details
-
DefaultMethodRetryHandler
public DefaultMethodRetryHandler()Deprecated.
-
-
Method Details
-
retryMethod
public boolean retryMethod(HttpMethod method, HttpConnection connection, HttpRecoverableException recoverableException, int executionCount, boolean requestSent) Deprecated.UsedretryCountandrequestSentRetryEnabledto determine if the given method should be retried.- Specified by:
retryMethodin interfaceMethodRetryHandler- Parameters:
method- the method being executedconnection- the connection the method is usingrecoverableException- the exception that occurredexecutionCount- the number of times this method has been unsuccessfully executedrequestSent- this argument is unused and will be removed in the future.HttpMethod.isRequestSent()should be used instead- Returns:
trueif the method should be retried,falseotherwise- See Also:
-
isRequestSentRetryEnabled
public boolean isRequestSentRetryEnabled()Deprecated.- Returns:
trueif this handler will retry methods that have successfully sent their request,falseotherwise
-
getRetryCount
public int getRetryCount()Deprecated.- Returns:
- the maximum number of times a method will be retried
-
setRequestSentRetryEnabled
public void setRequestSentRetryEnabled(boolean requestSentRetryEnabled) Deprecated.- Parameters:
requestSentRetryEnabled- a flag indicating if methods that have successfully sent their request should be retried
-
setRetryCount
public void setRetryCount(int retryCount) Deprecated.- Parameters:
retryCount- the maximum number of times a method can be retried
-
DefaultHttpMethodRetryHandler