ServiceUnavailableRetryStrategy (Apache HttpClient 4.5.13 API)
Date: 2020-10-03

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.client
Interface ServiceUnavailableRetryStrategy

All Known Implementing Classes:
  DefaultServiceUnavailableRetryStrategy

    public interface ServiceUnavailableRetryStrategy

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
`long` | `getRetryInterval()`
`boolean` | `retryRequest(org.apache.http.HttpResponse response, int executionCount, org.apache.http.protocol.HttpContext context)` Determines if a method should be retried given the response from the target server.

Method Detail

### retryRequest

    boolean retryRequest(org.apache.http.HttpResponse response,
                         int executionCount,
                         org.apache.http.protocol.HttpContext context)

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

  Parameters:
    `response` - the response from the target server
    `executionCount` - the number of times this method has been unsuccessfully executed
    `context` - the context for the request execution
  Returns:
    `true` if the method should be retried, `false` otherwise

### getRetryInterval

    long getRetryInterval()

  Returns:
    The interval between the subsequent auto-retries.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999–2020 The Apache Software Foundation. All rights reserved.