Interface RetryHandler

All Known Implementing Classes:
SimpleRetryHandler

public interface RetryHandler
Define how retry should occur on a request.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    isExceptionRetry(int retryCount, HttpException exception)
    Return true if the request should be retried.
    boolean
    isRetry(int retryCount, HttpResponse<?> response)
    Return true if the request should be retried.
  • Method Details

    • isRetry

      boolean isRetry(int retryCount, HttpResponse<?> response)
      Return true if the request should be retried.
      Parameters:
      retryCount - The number of retry attempts already executed
      response - The HTTP response
      Returns:
      True if the request should be retried or false if not
    • isExceptionRetry

      default boolean isExceptionRetry(int retryCount, HttpException exception)
      Return true if the request should be retried.
      Parameters:
      retryCount - The number of retry attempts already executed
      exception - The Wrapped Error thrown by the underlying Http Client
      Returns:
      True if the request should be retried or false if not