org.apache.commons.httpclient
Class DefaultMethodRetryHandler
java.lang.Object
|
+--org.apache.commons.httpclient.DefaultMethodRetryHandler
- All Implemented Interfaces:
- MethodRetryHandler
- public class DefaultMethodRetryHandler
- extends java.lang.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
- 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 - a flag indicating if the request has been fully sent or not
- Returns:
true if the method should be retried, false
otherwise- 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 (c) 1999-2002 - Apache Software Foundation