クラス 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) サブクラスは、ポーリングの結果に基づいてアクションを実行できます。たとえばboolean
beforeReceive
(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
-DelegatingSessionFactory
keyDirectories
-RotationPolicy.KeyDirectory
のリスト。
RotatingServerAdvice
public RotatingServerAdvice(DelegatingSessionFactory<?> factory, ListSE<RotationPolicy.KeyDirectory> keyDirectories, boolean fair) 公平な引数に応じて、次のサーバー / ディレクトリにローテーションするインスタンスを作成します。- パラメーター:
factory
-DelegatingSessionFactory
keyDirectories
-RotationPolicy.KeyDirectory
のリスト。fair
- ポーリングごとにローテーションする場合は true、メッセージを受信しない場合にローテーションする場合は false。
RotatingServerAdvice
指定されたRotationPolicy
に従って回転するインスタンスを構築します。- パラメーター:
rotationPolicy
- ポリシー。
メソッドの詳細
beforeReceive
インターフェースからコピーされた説明:MessageSourceMutator
サブクラスは、このポーリングを続行するかどうかを決定できます。- 次で指定:
- インターフェース
MessageSourceMutator
のbeforeReceive
- パラメーター:
source
- メッセージソース。- 戻り値:
- 続行するには true(デフォルト)。
afterReceive
インターフェースからコピーされた説明:MessageSourceMutator
サブクラスは、ポーリングの結果に基づいてアクションを実行できます。たとえばtrigger
を調整します。メッセージは新しいメッセージに置き換えることもできます。- 次で指定:
- インターフェース
MessageSourceMutator
のafterReceive
- パラメーター:
result
- 受信したメッセージ。source
- メッセージソース。- 戻り値:
- 結果の処理を続行するメッセージ。ポーリングが返したものをすべて破棄する場合は null