|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter org.springframework.integration.channel.interceptor.WireTap
public class WireTap
A ChannelInterceptor
that publishes a copy of the intercepted message
to a secondary target while still sending the original message to the main channel.
Constructor Summary | |
---|---|
WireTap(MessageChannel channel)
Create a new wire tap with no MessageSelector . |
|
WireTap(MessageChannel channel,
MessageSelector selector)
Create a new wire tap with the provided MessageSelector . |
Method Summary | |
---|---|
boolean |
isRunning()
Check whether the wire tap is currently running. |
Message<?> |
preSend(Message<?> message,
MessageChannel channel)
Intercept the Message and, if accepted by the MessageSelector ,
send it to the secondary target. |
void |
setTimeout(long timeout)
Specify the timeout value for sending to the intercepting target. |
void |
start()
Restart the wire tap if it has been stopped. |
void |
stop()
Stop the wire tap. |
Methods inherited from class org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter |
---|
postReceive, postSend, preReceive |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WireTap(MessageChannel channel)
MessageSelector
.
channel
- the MessageChannel to which intercepted messages will be sentpublic WireTap(MessageChannel channel, MessageSelector selector)
MessageSelector
.
channel
- the channel to which intercepted messages will be sentselector
- the selector that must accept a message for it to be
sent to the intercepting channelMethod Detail |
---|
public void setTimeout(long timeout)
timeout
- the timeout in millisecondspublic boolean isRunning()
isRunning
in interface Lifecycle
public void start()
start
in interface Lifecycle
public void stop()
start()
.
stop
in interface Lifecycle
public Message<?> preSend(Message<?> message, MessageChannel channel)
MessageSelector
,
send it to the secondary target. If this wire tap's MessageSelector
is
null
, it will accept all messages.
preSend
in interface ChannelInterceptor
preSend
in class ChannelInterceptorAdapter
|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |