Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.http.impl
Class DefaultHttpRequestRetryHandler  view DefaultHttpRequestRetryHandler download DefaultHttpRequestRetryHandler.java

java.lang.Object
  extended byorg.apache.http.impl.DefaultHttpRequestRetryHandler
All Implemented Interfaces:
org.apache.http.protocol.HttpRequestRetryHandler

public class DefaultHttpRequestRetryHandler
extends java.lang.Object
implements org.apache.http.protocol.HttpRequestRetryHandler

The default org.apache.http.protocol.HttpRequestRetryHandler used by request executors.


Field Summary
private  boolean requestSentRetryEnabled
          Whether or not methods that have successfully sent their request will be retried
private  int retryCount
          the number of times a method will be retried
 
Constructor Summary
DefaultHttpRequestRetryHandler()
          Default constructor
DefaultHttpRequestRetryHandler(int retryCount, boolean requestSentRetryEnabled)
          Default constructor
 
Method Summary
 int getRetryCount()
           
 boolean isRequestSentRetryEnabled()
           
 boolean retryRequest(java.io.IOException exception, int executionCount, org.apache.http.protocol.HttpContext context)
          Used retryCount and requestSentRetryEnabled to determine if the given method should be retried.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

retryCount

private int retryCount
the number of times a method will be retried


requestSentRetryEnabled

private boolean requestSentRetryEnabled
Whether or not methods that have successfully sent their request will be retried

Constructor Detail

DefaultHttpRequestRetryHandler

public DefaultHttpRequestRetryHandler(int retryCount,
                                      boolean requestSentRetryEnabled)
Default constructor


DefaultHttpRequestRetryHandler

public DefaultHttpRequestRetryHandler()
Default constructor

Method Detail

retryRequest

public boolean retryRequest(java.io.IOException exception,
                            int executionCount,
                            org.apache.http.protocol.HttpContext context)
Used retryCount and requestSentRetryEnabled to determine if the given method should be retried.

Specified by:
retryRequest in interface org.apache.http.protocol.HttpRequestRetryHandler

isRequestSentRetryEnabled

public boolean isRequestSentRetryEnabled()

getRetryCount

public int getRetryCount()