クラス AbstractRetryInterceptor
java.lang.ObjectSE
org.springframework.resilience.retry.AbstractRetryInterceptor
- 実装されているすべてのインターフェース:
Advice, Interceptor, MethodInterceptor, Aware, ApplicationEventPublisherAware
- 既知の直属サブクラス
SimpleRetryInterceptor
public abstract class AbstractRetryInterceptor
extends ObjectSE
implements MethodInterceptor, ApplicationEventPublisherAware
特定の再試行仕様を
RetryTemplate または Reactor のいずれかに適合させる抽象再試行インターセプター実装。- 導入:
- 7.0
- 作成者:
- Juergen Hoeller
- 関連事項:
コンストラクターの概要
コンストラクター方法の概要
修飾子と型メソッド説明protected abstract @Nullable MethodRetrySpecgetRetrySpec(MethodSE method, ClassSE<?> targetClass) 指定されたターゲット上の指定されたメソッドの再試行仕様を決定します。invoke(MethodInvocation invocation) このメソッドを実装して、呼び出しの前後に追加の処理を実行します。voidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) このオブジェクトが実行される ApplicationEventPublisher を設定します。
コンストラクターの詳細
AbstractRetryInterceptor
public AbstractRetryInterceptor()
メソッドの詳細
setApplicationEventPublisher
インターフェースからコピーされた説明:ApplicationEventPublisherAwareこのオブジェクトが実行される ApplicationEventPublisher を設定します。通常の Bean プロパティの設定後、InitializingBean の afterPropertiesSet などの init コールバックやカスタム init メソッドの前に呼び出されます。ApplicationContextAware の setApplicationContext の前に呼び出されます。
- 次で指定:
- インターフェース
ApplicationEventPublisherAwareのsetApplicationEventPublisher - パラメーター:
applicationEventPublisher- このオブジェクトによって使用されるイベント発行元
invoke
インターフェースからコピーされた説明:MethodInterceptorこのメソッドを実装して、呼び出しの前後に追加の処理を実行します。正しい実装としては、必ずJoinpoint.proceed()を呼び出すようにします。- 次で指定:
- インターフェース
MethodInterceptorのinvoke - パラメーター:
invocation- メソッド呼び出しジョインポイント- 戻り値:
Joinpoint.proceed()の呼び出しの結果。インターセプターによってインターセプトされる可能性があります- 例外:
ThrowableSE- インターセプターまたはターゲットオブジェクトが例外をスローする場合
getRetrySpec
指定されたターゲット上の指定されたメソッドの再試行仕様を決定します。- パラメーター:
method- 現在実行中のメソッドtargetClass- 現在のターゲットオブジェクトのクラス- 戻り値:
- 再試行の指定を
MethodRetrySpecとして