Class GetServerErrorRetryStrategy

  • All Implemented Interfaces:
    RetryStrategy

    public class GetServerErrorRetryStrategy
    extends java.lang.Object
    implements RetryStrategy
    Allows retry for GET method and some HTTP 5XX states mentioned in RETRYABLE_STATES.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Collection<java.lang.String> RETRYABLE_METHODS  
      static java.util.Collection<java.lang.Integer> RETRYABLE_STATES  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean retryAllowed​(java.lang.String method, int statusCode, java.net.URI uri)
      Method says if retry is allowed for given parameter combination.
      • Methods inherited from class java.lang.Object

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

      • RETRYABLE_STATES

        public static final java.util.Collection<java.lang.Integer> RETRYABLE_STATES
      • RETRYABLE_METHODS

        public static final java.util.Collection<java.lang.String> RETRYABLE_METHODS
    • Constructor Detail

      • GetServerErrorRetryStrategy

        public GetServerErrorRetryStrategy()
    • Method Detail

      • retryAllowed

        public boolean retryAllowed​(java.lang.String method,
                                    int statusCode,
                                    java.net.URI uri)
        Description copied from interface: RetryStrategy
        Method says if retry is allowed for given parameter combination.
        Specified by:
        retryAllowed in interface RetryStrategy
        Parameters:
        method - HTTP method
        statusCode - HTTP response code
        uri - requested URL
        Returns:
        true it retry is allowed