com.netflix.http4
Class NFHttpMethodRetryHandler

java.lang.Object
  extended by org.apache.http.impl.client.DefaultHttpRequestRetryHandler
      extended by com.netflix.http4.NFHttpMethodRetryHandler
All Implemented Interfaces:
org.apache.http.client.HttpRequestRetryHandler

public class NFHttpMethodRetryHandler
extends org.apache.http.impl.client.DefaultHttpRequestRetryHandler


Constructor Summary
NFHttpMethodRetryHandler(java.lang.String httpClientName, int retryCount, boolean requestSentRetryEnabled, int sleepTimeFactorMs)
          Creates a new NFHttpMethodRetryHandler.
 
Method Summary
 boolean retryRequest(java.io.IOException exception, int executionCount, org.apache.http.protocol.HttpContext context)
           
 
Methods inherited from class org.apache.http.impl.client.DefaultHttpRequestRetryHandler
getRetryCount, isRequestSentRetryEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NFHttpMethodRetryHandler

public NFHttpMethodRetryHandler(java.lang.String httpClientName,
                                int retryCount,
                                boolean requestSentRetryEnabled,
                                int sleepTimeFactorMs)
Creates a new NFHttpMethodRetryHandler.

Parameters:
httpClientName - - the name of the nfhttpclient
retryCount - the number of times a method will be retried
requestSentRetryEnabled - if true, methods that have successfully sent their request will be retried
sleepTimeFactorMs - number of milliseconds to sleep before the next try. This factor is used along with execution count to determine the sleep time (ie) executionCount * sleepTimeFactorMs
Method Detail

retryRequest

public boolean retryRequest(java.io.IOException exception,
                            int executionCount,
                            org.apache.http.protocol.HttpContext context)
Specified by:
retryRequest in interface org.apache.http.client.HttpRequestRetryHandler
Overrides:
retryRequest in class org.apache.http.impl.client.DefaultHttpRequestRetryHandler