Package org.apache.http.client
Interface ServiceUnavailableRetryStrategy
- 
- All Known Implementing Classes:
 DefaultServiceUnavailableRetryStrategy
public interface ServiceUnavailableRetryStrategyStrategy interface that allows API users to plug in their own logic to control whether or not a retry should automatically be done, how many times it should be retried and so on.- Since:
 - 4.2
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetRetryInterval()booleanretryRequest(HttpResponse response, int executionCount, HttpContext context)Determines if a method should be retried given the response from the target server. 
 - 
 
- 
- 
Method Detail
- 
retryRequest
boolean retryRequest(HttpResponse response, int executionCount, HttpContext context)
Determines if a method should be retried given the response from the target server.- Parameters:
 response- the response from the target serverexecutionCount- the number of times this method has been unsuccessfully executedcontext- the context for the request execution- Returns:
 trueif the method should be retried,falseotherwise
 
- 
getRetryInterval
long getRetryInterval()
- Returns:
 - The interval between the subsequent auto-retries.
 
 
 - 
 
 -