Interface RetryRequestMiddleware

All Superinterfaces:
Middleware
All Known Implementing Classes:
RetryMiddleware

@Deprecated public interface RetryRequestMiddleware extends Middleware
Deprecated.
use PolicyMiddleware instead

Retry failed requests

Middleware for retrying of a requests upon configured response status codes and/or exceptions

Retrying on HTTP status codes


    ApiRootBuilder.of()
      ...
      .withRetryMiddleware(3, Arrays.asList(HttpStatusCode.SERVICE_UNAVAILABLE_503, HttpStatusCode.INTERNAL_SERVER_ERROR_500))
  

Retrying specific exceptions


    ApiRootBuilder.of()
      ...
      .addMiddleware(RetryRequestMiddleware.of(3, emptyList(), singletonList(JsonException.class)))