Class RetryInterceptor

java.lang.Object
io.github.resilience4j.micronaut.BaseInterceptor
io.github.resilience4j.micronaut.retry.RetryInterceptor
All Implemented Interfaces:
io.micronaut.aop.Interceptor<Object,Object>, io.micronaut.aop.MethodInterceptor<Object,Object>, io.micronaut.core.order.Ordered

@InterceptorBean(Retry.class) @Requires(beans=io.github.resilience4j.retry.RetryRegistry.class) public class RetryInterceptor extends BaseInterceptor implements io.micronaut.aop.MethodInterceptor<Object,Object>
  • Field Summary

    Fields inherited from interface io.micronaut.aop.Interceptor

    ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGET

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    RetryInterceptor(io.micronaut.context.ExecutionHandleLocator executionHandleLocator, io.github.resilience4j.retry.RetryRegistry retryRegistry, ExecutorService executorService, PublisherExtension extension, io.micronaut.core.convert.ConversionService conversionService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<? extends io.micronaut.inject.MethodExecutionHandle<?,Object>>
    findFallbackMethod(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
    Finds a fallback method for the given context.
    int
     
    intercept(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
     

    Methods inherited from class io.github.resilience4j.micronaut.BaseInterceptor

    fallback, fallbackForFuture

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.aop.MethodInterceptor

    intercept
  • Constructor Details

    • RetryInterceptor

      public RetryInterceptor(io.micronaut.context.ExecutionHandleLocator executionHandleLocator, io.github.resilience4j.retry.RetryRegistry retryRegistry, @Named("scheduled") ExecutorService executorService, PublisherExtension extension, io.micronaut.core.convert.ConversionService conversionService)
  • Method Details

    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface io.micronaut.core.order.Ordered
    • findFallbackMethod

      public Optional<? extends io.micronaut.inject.MethodExecutionHandle<?,Object>> findFallbackMethod(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
      Finds a fallback method for the given context.
      Specified by:
      findFallbackMethod in class BaseInterceptor
      Parameters:
      context - The context
      Returns:
      The fallback method if it is present
    • intercept

      public Object intercept(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
      Specified by:
      intercept in interface io.micronaut.aop.MethodInterceptor<Object,Object>