org.apache.commons.httpclient

Class DefaultHttpMethodRetryHandler

Implemented Interfaces:
HttpMethodRetryHandler

public class DefaultHttpMethodRetryHandler
extends java.lang.Object
implements HttpMethodRetryHandler

The default HttpMethodRetryHandler used by HttpMethods.
Authors:
Michael Becke
Oleg Kalnichevski

Constructor Summary

DefaultHttpMethodRetryHandler()
Default constructor
DefaultHttpMethodRetryHandler(int retryCount, boolean requestSentRetryEnabled)
Default constructor

Method Summary

int
getRetryCount()
boolean
isRequestSentRetryEnabled()
boolean
retryMethod(HttpMethod method, IOException exception, int executionCount)
Used retryCount and requestSentRetryEnabled to determine if the given method should be retried.

Constructor Details

DefaultHttpMethodRetryHandler

public DefaultHttpMethodRetryHandler()
Default constructor

DefaultHttpMethodRetryHandler

public DefaultHttpMethodRetryHandler(int retryCount,
                                     boolean requestSentRetryEnabled)
Default constructor

Method Details

getRetryCount

public int getRetryCount()
Returns:
the maximum number of times a method will be retried

isRequestSentRetryEnabled

public boolean isRequestSentRetryEnabled()
Returns:
true if this handler will retry methods that have successfully sent their request, false otherwise

retryMethod

public boolean retryMethod(HttpMethod method,
                           IOException exception,
                           int executionCount)
Used retryCount and requestSentRetryEnabled to determine if the given method should be retried.
Specified by:
retryMethod in interface HttpMethodRetryHandler

Copyright (c) 1999-2005 - Apache Software Foundation