Top Description Methods
org.apache.http.client

public Interface ServiceUnavailableRetryStrategy

Known Direct Implementers
org.apache.http.impl.client.DefaultServiceUnavailableRetryStrategy
Imports
org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext

Strategy 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

Modifier and TypeMethod and Description
public long

Returns:

The interval between the subsequent auto-retries.
getRetryInterval
()

public boolean

Returns:

true if the method should be retried, false otherwise
retryRequest
(HttpResponse
the response from the target server
response
,
int
the number of times this method has been unsuccessfully executed
executionCount
,
HttpContext
the context for the request execution
context
)

Determines if a method should be retried given the response from the target server.

Method Detail

getRetryIntervalback to summary
public long getRetryInterval()
Returns:long

The interval between the subsequent auto-retries.

retryRequestback to summary
public boolean retryRequest(HttpResponse response, int executionCount, HttpContext context)

Determines if a method should be retried given the response from the target server.

Parameters
response:HttpResponse

the response from the target server

executionCount:int

the number of times this method has been unsuccessfully executed

context:HttpContext

the context for the request execution

Returns:boolean

true if the method should be retried, false otherwise