Class AnnotationAwareRetryOperationsInterceptor

java.lang.Object
org.springframework.retry.annotation.AnnotationAwareRetryOperationsInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.aop.DynamicIntroductionAdvice, org.springframework.aop.IntroductionInterceptor, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware

public class AnnotationAwareRetryOperationsInterceptor extends Object implements org.springframework.aop.IntroductionInterceptor, org.springframework.beans.factory.BeanFactoryAware
Interceptor that parses the retry metadata on the method it is invoking and delegates to an appropriate RetryOperationsInterceptor.
Since:
1.1
Author:
Dave Syer, Artem Bilan, Gary Russell, Roman Akentev, Aftab Shaikh
  • Constructor Details

    • AnnotationAwareRetryOperationsInterceptor

      public AnnotationAwareRetryOperationsInterceptor()
  • Method Details

    • setSleeper

      public void setSleeper(Sleeper sleeper)
      Parameters:
      sleeper - the sleeper to set
    • setRetryContextCache

      public void setRetryContextCache(RetryContextCache retryContextCache)
      Public setter for the RetryContextCache.
      Parameters:
      retryContextCache - the RetryContextCache to set.
    • setKeyGenerator

      public void setKeyGenerator(MethodArgumentsKeyGenerator methodArgumentsKeyGenerator)
      Parameters:
      methodArgumentsKeyGenerator - the MethodArgumentsKeyGenerator
    • setNewItemIdentifier

      public void setNewItemIdentifier(NewMethodArgumentsIdentifier newMethodArgumentsIdentifier)
      Parameters:
      newMethodArgumentsIdentifier - the NewMethodArgumentsIdentifier
    • setListeners

      public void setListeners(Collection<RetryListener> globalListeners)
      Default retry listeners to apply to all operations.
      Parameters:
      globalListeners - the default listeners
    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException
    • implementsInterface

      public boolean implementsInterface(Class<?> intf)
      Specified by:
      implementsInterface in interface org.springframework.aop.DynamicIntroductionAdvice
    • invoke

      public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
      Specified by:
      invoke in interface org.aopalliance.intercept.MethodInterceptor
      Throws:
      Throwable