Class KiwiRetryerPredicates


  • public class KiwiRetryerPredicates
    extends Object
    Some potentially useful predicates that can be used out of the box with KiwiRetryer or directly with RetryerBuilder, or anything else that accepts a Predicate.

    Note that the Jakarta RS-API needs to be available at runtime to use the Response predicates.

    • Field Detail

      • UNKNOWN_HOST

        public static final Predicate<Exception> UNKNOWN_HOST
        Check if a given Exception is or has a root cause of UnknownHostException.
        Implementation Note:
        UnknownHostException does not have a cause, which is why we check only the instance and root cause
      • CONNECTION_ERROR

        public static final Predicate<Exception> CONNECTION_ERROR
        Check if a given Exception is or has a root cause of ConnectException.
        Implementation Note:
        ConnectException does not have a cause, which is why we check only the instance and root cause
      • SOCKET_TIMEOUT

        public static final Predicate<Exception> SOCKET_TIMEOUT
        Check if a given Exception is or has a root cause of SocketTimeoutException.
        Implementation Note:
        SocketTimeoutException does not have a cause, which is why we check only the instance and root cause
      • NO_ROUTE_TO_HOST

        public static final Predicate<Exception> NO_ROUTE_TO_HOST
        Check if a given Exception is or has a root cause of NoRouteToHostException.
        Implementation Note:
        NoRouteToHostException does not have a cause, which is why we check only the instance and root cause
      • IS_HTTP_400s

        public static final Predicate<javax.ws.rs.core.Response> IS_HTTP_400s
        Check if a given JAX-RS Response is a client error (4xx).
      • IS_HTTP_500s

        public static final Predicate<javax.ws.rs.core.Response> IS_HTTP_500s
        Check if a given JAX-RS Response is a server error (5xx).
    • Constructor Detail

      • KiwiRetryerPredicates

        public KiwiRetryerPredicates()