Package io.github.resilience4j.micronaut
Class BaseInterceptor
java.lang.Object
io.github.resilience4j.micronaut.BaseInterceptor
- Direct Known Subclasses:
BulkheadInterceptor,CircuitBreakerInterceptor,RateLimiterInterceptor,RetryInterceptor,TimeLimiterInterceptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResolves a fallback for the given execution context and exception.fallbackForFuture(CompletionStage<?> result, io.micronaut.aop.MethodInvocationContext<Object, Object> context) findFallbackMethod(io.micronaut.aop.MethodInvocationContext<Object, Object> context)
-
Constructor Details
-
BaseInterceptor
public BaseInterceptor()
-
-
Method Details
-
findFallbackMethod
-
fallback
public Object fallback(io.micronaut.aop.MethodInvocationContext<Object, Object> context, Throwable exception) Resolves a fallback for the given execution context and exception.- Parameters:
context- The contextexception- The exception- Returns:
- Returns the fallback value or throws the original exception
-
fallbackForFuture
public CompletionStage<?> fallbackForFuture(CompletionStage<?> result, io.micronaut.aop.MethodInvocationContext<Object, Object> context)
-