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 int
getRetryCount()
Deprecated.boolean
isRequestSentRetryEnabled()
Deprecated.boolean
retryMethod(HttpMethod method, HttpConnection connection, HttpRecoverableException recoverableException, int executionCount, boolean requestSent)
Deprecated.UsedretryCount
andrequestSentRetryEnabled
to determine if the given method should be retried.void
setRequestSentRetryEnabled(boolean requestSentRetryEnabled)
Deprecated.void
setRetryCount(int retryCount)
Deprecated.
-
-
-
Method Detail
-
retryMethod
public boolean retryMethod(HttpMethod method, HttpConnection connection, HttpRecoverableException recoverableException, int executionCount, boolean requestSent)
Deprecated.UsedretryCount
andrequestSentRetryEnabled
to determine if the given method should be retried.- Specified by:
retryMethod
in 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:
true
if the method should be retried,false
otherwise- See Also:
MethodRetryHandler.retryMethod(HttpMethod, HttpConnection, HttpRecoverableException, int, boolean)
-
isRequestSentRetryEnabled
public boolean isRequestSentRetryEnabled()
Deprecated.- Returns:
true
if this handler will retry methods that have successfully sent their request,false
otherwise
-
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
-
-