Package org.apache.commons.httpclient
Class DefaultMethodRetryHandler
- java.lang.Object
-
- org.apache.commons.httpclient.DefaultMethodRetryHandler
-
- All Implemented Interfaces:
MethodRetryHandler
@Deprecated public class DefaultMethodRetryHandler extends java.lang.Object implements MethodRetryHandler
Deprecated.The default MethodRetryHandler used by HttpMethodBase.
-
-
Constructor Summary
Constructors Constructor Description DefaultMethodRetryHandler()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetRetryCount()Deprecated.booleanisRequestSentRetryEnabled()Deprecated.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.
-
-
-
Method Detail
-
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:
MethodRetryHandler.retryMethod(HttpMethod, HttpConnection, HttpRecoverableException, int, boolean)
-
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
-
-