クラス RepeatOperationsInterceptor

java.lang.ObjectSE
org.springframework.batch.repeat.interceptor.RepeatOperationsInterceptor
実装されたすべてのインターフェース:
org.aopalliance.aop.Adviceorg.aopalliance.intercept.Interceptororg.aopalliance.intercept.MethodInterceptor

public class RepeatOperationsInterceptor extends ObjectSE implements org.aopalliance.intercept.MethodInterceptor
サービスのメソッドへの呼び出しを自動的に繰り返すために使用できる MethodInterceptor。注入された RepeatOperations は、ループの補完を制御するために使用されます。RepeatOperations の補完ポリシーとは無関係に、ターゲットメソッドが null または false を返すまでループが繰り返されます。特注の RepeatOperations を挿入するときは、ループが実際に終了することに注意してください。これは、ターゲットメソッドの戻り値の型が void の場合、通常の RepeatTemplate のデフォルトポリシーが完了しないためです (返される値は常に null ではなく、Void.TYPESE を表します)。
作成者:
Dave Syer, Mahmoud Ben Hassine
  • コンストラクターの詳細

    • RepeatOperationsInterceptor

      public RepeatOperationsInterceptor()
  • メソッドの詳細

    • setRepeatOperations

      public void setRepeatOperations(RepeatOperations batchTemplate)
      RepeatOperations の Setter。
      パラメーター:
      batchTemplate - 使用するテンプレート
      例外:
      IllegalArgumentExceptionSE - 引数が null の場合。
    • invoke

      public ObjectSE invoke(org.aopalliance.intercept.MethodInvocation invocation) throws ThrowableSE
      注入された RepeatOperations のプロパティに従って、進行中のメソッド呼び出しを繰り返し呼び出します。
      次で指定:
      インターフェース org.aopalliance.intercept.MethodInterceptorinvoke 
      例外:
      ThrowableSE
      関連事項:
      • MethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)