クラス WireTap
java.lang.ObjectSE
org.springframework.integration.channel.interceptor.WireTap
- 実装されたすべてのインターフェース:
Aware
、BeanFactoryAware
、Lifecycle
、VetoCapableInterceptor
、ManageableLifecycle
、ChannelInterceptor
@ManagedResource
public class WireTap
extends ObjectSE
implements ChannelInterceptor, ManageableLifecycle, VetoCapableInterceptor, BeanFactoryAware
元のメッセージをメインチャネルに送信しながら、インターセプトしたメッセージのコピーをセカンダリターゲットに公開する
ChannelInterceptor
。- 作成者:
- Mark Fisher, Gary Russell, Artem Bilan
コンストラクターの概要
コンストラクターコンストラクター説明MessageChannel 名に基づいて、MessageSelector
を使用せずに新しいワイヤータップを作成します。WireTap
(StringSE channelName, MessageSelector selector) 付属のMessageSelector
を使用して新しいワイヤータップを作成します。WireTap
(MessageChannel channel) MessageSelector
のない新しいワイヤータップを作成します。WireTap
(MessageChannel channel, MessageSelector selector) 付属のMessageSelector
を使用して新しいワイヤータップを作成します。メソッドのサマリー
修飾子と型メソッド説明boolean
盗聴が現在実行されているかどうかを確認します。Message
<?> preSend
(Message<?> message, MessageChannel channel) メッセージをインターセプトし、MessageSelector
によって受け入れられた場合は、セカンダリターゲットに送信します。void
setBeanFactory
(BeanFactory beanFactory) void
setTimeout
(long timeout) インターセプトするターゲットに送信するためのタイムアウト値を指定します。boolean
shouldIntercept
(StringSE beanName, InterceptableChannel channel) void
start()
ワイヤータップが停止している場合は、ワイヤータップを再開します。void
stop()
ワイヤータップを停止します。クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.messaging.support.ChannelInterceptor から継承されたメソッド
afterReceiveCompletion, afterSendCompletion, postReceive, postSend, preReceive
コンストラクターの詳細
WireTap
MessageSelector
のない新しいワイヤータップを作成します。- パラメーター:
channel
- インターセプトされたメッセージの送信先となる MessageChannel
WireTap
付属のMessageSelector
を使用して新しいワイヤータップを作成します。- パラメーター:
channel
- インターセプトされたメッセージが送信されるチャネルselector
- メッセージをインターセプトチャネルに送信するためにメッセージを受け入れる必要があるセレクター
WireTap
MessageChannel 名に基づいて、MessageSelector
を使用せずに新しいワイヤータップを作成します。- パラメーター:
channelName
- インターセプトされたメッセージの送信先となるターゲット MessageChannel の名前- 導入:
- 4.3
WireTap
付属のMessageSelector
を使用して新しいワイヤータップを作成します。- パラメーター:
channelName
- インターセプトされたメッセージの送信先となるターゲット MessageChannel の名前。selector
- メッセージをインターセプトチャネルに送信するためにメッセージを受け入れる必要があるセレクター- 導入:
- 4.3
メソッドの詳細
setTimeout
public void setTimeout(long timeout) インターセプトするターゲットに送信するためのタイムアウト値を指定します。- パラメーター:
timeout
- ミリ秒単位のタイムアウト
setBeanFactory
- 次で指定:
- インターフェース
BeanFactoryAware
のsetBeanFactory
- 例外:
BeansException
isRunning
盗聴が現在実行されているかどうかを確認します。- 次で指定:
- インターフェース
Lifecycle
のisRunning
- 次で指定:
- インターフェース
ManageableLifecycle
のisRunning
start
ワイヤータップが停止している場合は、ワイヤータップを再開します。デフォルトで実行されています。- 次で指定:
- インターフェース
Lifecycle
のstart
- 次で指定:
- インターフェース
ManageableLifecycle
のstart
stop
ワイヤータップを停止します。再起動するには、start()
を呼び出します。- 次で指定:
- インターフェース
Lifecycle
のstop
- 次で指定:
- インターフェース
ManageableLifecycle
のstop
preSend
メッセージをインターセプトし、MessageSelector
によって受け入れられた場合は、セカンダリターゲットに送信します。この盗聴者のMessageSelector
がnull
の場合、すべてのメッセージを受け入れます。- 次で指定:
- インターフェース
ChannelInterceptor
のpreSend
shouldIntercept
- 次で指定:
- インターフェース
VetoCapableInterceptor
のshouldIntercept
- パラメーター:
beanName
- チャンネル名。channel
- インターセプトされようとしているチャネル。- 戻り値:
- インターセプトがインターセプトを拒否したい場合は false。