クラス RotatingServerAdvice
java.lang.ObjectSE
org.springframework.integration.file.remote.aop.RotatingServerAdvice
- 実装されているすべてのインターフェース:
Advice、Interceptor、MethodInterceptor、MessageSourceMutator、ReceiveMessageAdvice
複数のリモートサーバー / ディレクトリ間でローテーションするスマートポーラーアドバイス。
- 導入:
- 5.0.7
- 作成者:
- Gary Russell, Michael Forstner, Artem Bilan, David Turanski
コンストラクターの概要
コンストラクターコンストラクター説明RotatingServerAdvice(RotationPolicy rotationPolicy) 指定されたRotationPolicyに従って回転するインスタンスを構築します。RotatingServerAdvice(DelegatingSessionFactory<?> factory, ListSE<RotationPolicy.KeyDirectory> keyDirectories) メッセージが受信されない場合、次のサーバー / ディレクトリにローテーションするインスタンスを作成します。RotatingServerAdvice(DelegatingSessionFactory<?> factory, ListSE<RotationPolicy.KeyDirectory> keyDirectories, boolean fair) 公平な引数に応じて、次のサーバー / ディレクトリにローテーションするインスタンスを作成します。メソッドのサマリー
修飾子と型メソッド説明Message<?> afterReceive(Message<?> result, MessageSource<?> source) サブクラスは、ポーリングの結果に基づいてアクションを実行できます。たとえばbooleanbeforeReceive(MessageSource<?> source) サブクラスは、このポーリングを続行するかどうかを決定できます。クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース org.springframework.integration.aop.MessageSourceMutator から継承されたメソッド
afterReceive, beforeReceiveインターフェース org.springframework.integration.aop.ReceiveMessageAdvice から継承されたメソッド
invoke
コンストラクターの詳細
RotatingServerAdvice
public RotatingServerAdvice(DelegatingSessionFactory<?> factory, ListSE<RotationPolicy.KeyDirectory> keyDirectories) メッセージが受信されない場合、次のサーバー / ディレクトリにローテーションするインスタンスを作成します。- パラメーター:
factory-DelegatingSessionFactorykeyDirectories-RotationPolicy.KeyDirectoryのリスト。
RotatingServerAdvice
public RotatingServerAdvice(DelegatingSessionFactory<?> factory, ListSE<RotationPolicy.KeyDirectory> keyDirectories, boolean fair) 公平な引数に応じて、次のサーバー / ディレクトリにローテーションするインスタンスを作成します。- パラメーター:
factory-DelegatingSessionFactorykeyDirectories-RotationPolicy.KeyDirectoryのリスト。fair- ポーリングごとにローテーションする場合は true、メッセージを受信しない場合にローテーションする場合は false。
RotatingServerAdvice
指定されたRotationPolicyに従って回転するインスタンスを構築します。- パラメーター:
rotationPolicy- ポリシー。
メソッドの詳細
beforeReceive
インターフェースからコピーされた説明:MessageSourceMutatorサブクラスは、このポーリングを続行するかどうかを決定できます。- 次で指定:
- インターフェース
MessageSourceMutatorのbeforeReceive - パラメーター:
source- メッセージソース。- 戻り値:
- 続行するには true(デフォルト)。
afterReceive
インターフェースからコピーされた説明:MessageSourceMutatorサブクラスは、ポーリングの結果に基づいてアクションを実行できます。たとえばtriggerを調整します。メッセージは新しいメッセージに置き換えることもできます。- 次で指定:
- インターフェース
MessageSourceMutatorのafterReceive - パラメーター:
result- 受信したメッセージ。source- メッセージソース。- 戻り値:
- 結果の処理を続行するメッセージ。ポーリングが返したものをすべて破棄する場合は null