类 RepeatOperationsInterceptor

  • 所有已实现的接口:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

    public class RepeatOperationsInterceptor
    extends java.lang.Object
    implements org.aopalliance.intercept.MethodInterceptor
    A MethodInterceptor that can be used to automatically repeat calls to a method on a service. The injected RepeatOperations is used to control the completion of the loop. Independent of the completion policy in the RepeatOperations the loop will repeat until the target method returns null or false. Be careful when injecting a bespoke RepeatOperations that the loop will actually terminate, because the default policy for a vanilla RepeatTemplate will never complete if the return type of the target method is void (the value returned is always not-null, representing the Void.TYPE).
    作者:
    Dave Syer
    • 方法详细资料

      • invoke

        public java.lang.Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)
                                throws java.lang.Throwable
        Invoke the proceeding method call repeatedly, according to the properties of the injected RepeatOperations.
        指定者:
        invoke 在接口中 org.aopalliance.intercept.MethodInterceptor
        抛出:
        java.lang.Throwable
        另请参阅:
        MethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)