Uses of Interface
com.github.mizosoft.methanol.RetryInterceptor.Context
Packages that use RetryInterceptor.Context
-
Uses of RetryInterceptor.Context in com.github.mizosoft.methanol
Methods in com.github.mizosoft.methanol that return RetryInterceptor.ContextModifier and TypeMethodDescriptionstatic <T> RetryInterceptor.Context<T> RetryInterceptor.Context.of(HttpRequest request, @Nullable HttpResponse<T> response, @Nullable Throwable exception, int retryCount) Creates a new retry context based on the given state.static <T> RetryInterceptor.Context<T> RetryInterceptor.Context.of(HttpRequest request, @Nullable HttpResponse<T> response, @Nullable Throwable exception, int retryCount, @Nullable Instant deadline) Creates a new retry context based on the given state.Methods in com.github.mizosoft.methanol with parameters of type RetryInterceptor.ContextModifier and TypeMethodDescriptionRetryInterceptor.BackoffStrategy.backoff(RetryInterceptor.Context<?> context) Returns theDurationto wait for before retrying the request for the given retry number.default voidRetryInterceptor.Listener.onComplete(RetryInterceptor.Context<?> context) Called when the interceptor is about to return the given state as-is because no retry condition matches.default voidRetryInterceptor.Listener.onExhaustion(RetryInterceptor.Context<?> context) Called when the interceptor exhausts allowed retry attempts.default voidRetryInterceptor.Listener.onRetry(RetryInterceptor.Context<?> context, HttpRequest nextRequest, Duration delay) Called when the interceptor is about to retry a request.Method parameters in com.github.mizosoft.methanol with type arguments of type RetryInterceptor.ContextModifier and TypeMethodDescriptionRetryInterceptor.Builder.on(Predicate<RetryInterceptor.Context<?>> predicate) Specifies that the interceptor is to retry the request if the retryRetryInterceptor.Contextsatisfies the given predicate.RetryInterceptor.Builder.on(Predicate<RetryInterceptor.Context<?>> predicate, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if the retryRetryInterceptor.Contextsatisfies the given predicate.RetryInterceptor.Builder.on(Predicate<RetryInterceptor.Context<?>> predicate, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if the retryRetryInterceptor.Contextsatisfies the given predicate.RetryInterceptor.Builder.onException(Predicate<Throwable> exceptionPredicate, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if an exception that satisfies the given predicate is thrown.RetryInterceptor.Builder.onException(Set<Class<? extends Throwable>> exceptionTypes, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if an exception with any of the given types is thrown.RetryInterceptor.Builder.onResponse(Predicate<HttpResponse<?>> responsePredicate, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if a response that satisfies the given predicate is received.RetryInterceptor.Builder.onStatus(Predicate<Integer> statusPredicate, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if a response whose code satisfies the given predicate is received.RetryInterceptor.Builder.onStatus(Set<Integer> codes, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if a response with any of the given status codes is received.