org.apache.commons.httpclient
Class DefaultMethodRetryHandler
java.lang.Object
|
+--org.apache.commons.httpclient.DefaultMethodRetryHandler
- All Implemented Interfaces:
- MethodRetryHandler
- public class DefaultMethodRetryHandler
- extends Object
- implements MethodRetryHandler
The default MethodRetryHandler used by HttpMethodBase.
- Author:
- Michael Becke
- See Also:
HttpMethodBase.setMethodRetryHandler(MethodRetryHandler)
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultMethodRetryHandler
public DefaultMethodRetryHandler()
retryMethod
public boolean retryMethod(HttpMethod method,
HttpConnection connection,
HttpRecoverableException recoverableException,
int executionCount,
boolean requestSent)
- Used
retryCount
and requestSentRetryEnabled
to determine
if the given method should be retried.
- Specified by:
retryMethod
in interface MethodRetryHandler
- See Also:
MethodRetryHandler.retryMethod(HttpMethod, HttpConnection, HttpRecoverableException, int, boolean)
isRequestSentRetryEnabled
public boolean isRequestSentRetryEnabled()
- Returns:
true
if this handler will retry methods that have
successfully sent their request, false
otherwise
getRetryCount
public int getRetryCount()
- Returns:
- the maximum number of times a method will be retried
setRequestSentRetryEnabled
public void setRequestSentRetryEnabled(boolean requestSentRetryEnabled)
- Parameters:
requestSentRetryEnabled
- a flag indicating if methods that have
successfully sent their request should be retried
setRetryCount
public void setRetryCount(int retryCount)
- Parameters:
retryCount
- the maximum number of times a method can be retried
Copyright © 2001-2004 Apache Software Foundation. All Rights Reserved.