Class StandardServiceUnavailableRetryStrategy

  • All Implemented Interfaces:
    org.apache.http.client.ServiceUnavailableRetryStrategy

    @Contract(threading=IMMUTABLE)
    public class StandardServiceUnavailableRetryStrategy
    extends java.lang.Object
    implements org.apache.http.client.ServiceUnavailableRetryStrategy
    An implementation of the ServiceUnavailableRetryStrategy interface. that retries 408 (Request Timeout), 429 (Too Many Requests), and 500 (Server side error) responses for a fixed number of times at a fixed interval.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getRetryInterval()  
      boolean retryRequest​(org.apache.http.HttpResponse response, int executionCount, org.apache.http.protocol.HttpContext context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StandardServiceUnavailableRetryStrategy

        public StandardServiceUnavailableRetryStrategy​(int maxRetries,
                                                       int retryInterval)
    • Method Detail

      • retryRequest

        public boolean retryRequest​(org.apache.http.HttpResponse response,
                                    int executionCount,
                                    org.apache.http.protocol.HttpContext context)
        Specified by:
        retryRequest in interface org.apache.http.client.ServiceUnavailableRetryStrategy
      • getRetryInterval

        public long getRetryInterval()
        Specified by:
        getRetryInterval in interface org.apache.http.client.ServiceUnavailableRetryStrategy