com.netflix.http4
Class NFHttpMethodRetryHandler
java.lang.Object
org.apache.http.impl.client.DefaultHttpRequestRetryHandler
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 |
NFHttpMethodRetryHandler
public NFHttpMethodRetryHandler(java.lang.String httpClientName,
int retryCount,
boolean requestSentRetryEnabled,
int sleepTimeFactorMs)
- Creates a new NFHttpMethodRetryHandler.
- Parameters:
httpClientName
- - the name of the nfhttpclientretryCount
- the number of times a method will be retriedrequestSentRetryEnabled
- if true, methods that have successfully sent their request will be retriedsleepTimeFactorMs
- 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
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