You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2005/04/27 22:22:06 UTC
svn commit: r165040 -
/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/executor/HttpRequestRetryHandler.java
Author: olegk
Date: Wed Apr 27 13:22:06 2005
New Revision: 165040
URL: http://svn.apache.org/viewcvs?rev=165040&view=rev
Log:
SVN copied from Jakarta Commons HttpClient
Added:
jakarta/httpclient/trunk/http-common/src/java/org/apache/http/executor/HttpRequestRetryHandler.java
- copied, changed from r165037, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodRetryHandler.java
Copied: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/executor/HttpRequestRetryHandler.java (from r165037, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodRetryHandler.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/executor/HttpRequestRetryHandler.java?p2=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/executor/HttpRequestRetryHandler.java&p1=jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodRetryHandler.java&r1=165037&r2=165040&rev=165040&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodRetryHandler.java (original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/executor/HttpRequestRetryHandler.java Wed Apr 27 13:22:06 2005
@@ -1,5 +1,5 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/HttpMethodRetryHandler.java,v 1.2 2004/09/14 20:11:31 olegk Exp $
+ * $HeadURL$
* $Revision$
* $Date$
*
@@ -27,12 +27,14 @@
*
*/
-package org.apache.commons.httpclient;
+package org.apache.http.executor;
import java.io.IOException;
+import org.apache.http.HttpRequest;
+
/**
- * A handler for determining if an HttpMethod should be retried after a
+ * A handler for determining if an HttpRequest should be retried after a
* recoverable exception during execution.
*
* <p>
@@ -40,19 +42,16 @@
* data as methods of this interfrace may be executed from multiple threads
* </p>
*
- * @see HttpMethod#execute(HttpState, HttpConnection)
- * @see HttpRecoverableException
- *
* @author Michael Becke
- * @author <a href="mailto:oleg -at- ural.ru">Oleg Kalnichevski</a>
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*/
-public interface HttpMethodRetryHandler {
+public interface HttpRequestRetryHandler {
/**
- * Determines if a method should be retried after an HttpRecoverableException
+ * Determines if a method should be retried after an IOException
* occurs during execution.
*
- * @param method the method being executed
+ * @param request the request being executed
* @param exception the exception that occurred
* @param executionCount the number of times this method has been
* unsuccessfully executed
@@ -60,6 +59,6 @@
* @return <code>true</code> if the method should be retried, <code>false</code>
* otherwise
*/
- boolean retryMethod(HttpMethod method, IOException exception, int executionCount);
+ boolean retryRequest(HttpRequest request, IOException exception, int executionCount);
}