public class MessageTee<M extends Message> extends Object implements MessageReceiver<M>
receive(Message)
.Modifier and Type | Field and Description |
---|---|
protected List<MessageReceiver<? super M>> |
drains |
Constructor and Description |
---|
MessageTee() |
MessageTee(MessageReceiver<? super M>... drains)
Internally calls
add(MessageReceiver) , please cf.! |
MessageTee(MessageReceiver<? super M> drain1)
Nonvararg specialization avoids
unchecked warnings. |
MessageTee(MessageReceiver<? super M> drain1,
MessageReceiver<? super M> drain2)
Nonvararg specialization avoids
unchecked warnings
Internally calls add(MessageReceiver) , please cf.! |
MessageTee(MessageReceiver<? super M> drain1,
MessageReceiver<? super M> drain2,
MessageReceiver<? super M> drain3)
Nonvararg specialization avoids
unchecked warnings. |
Modifier and Type | Method and Description |
---|---|
void |
add(MessageReceiver<? super M>... newdrains)
Internally calls
add(MessageReceiver) , please cf.! |
void |
add(MessageReceiver<? super M> drain)
Adds the message receiver at the end of the list of all current drains.
|
void |
add(MessageReceiver<? super M> drain1,
MessageReceiver<? super M> drain2)
Nonvararg specialization avoids
unchecked warnings. |
void |
addAll(Iterable<MessageReceiver<? super M>> newdrains)
Internally calls
add(MessageReceiver) , please cf.! |
void |
clear() |
List<MessageReceiver<? super M>> |
getDrains() |
void |
receive(M message)
Propagates the message received sequentially to a multitude of
current drains.
If there is one or ore MessageThrower s in the pipeline behind
these drains, then additionally the message is thrown after all drains have
been sent to.(Any other Throwable is, of course, not intercepted!) |
protected final List<MessageReceiver<? super M extends Message>> drains
public MessageTee()
public MessageTee(MessageReceiver<? super M>... drains)
add(MessageReceiver)
, please cf.!public MessageTee(MessageReceiver<? super M> drain1)
unchecked
warnings.
Internally calls add(MessageReceiver)
, please cf.!public MessageTee(MessageReceiver<? super M> drain1, MessageReceiver<? super M> drain2)
unchecked
warnings
Internally calls add(MessageReceiver)
, please cf.!public MessageTee(MessageReceiver<? super M> drain1, MessageReceiver<? super M> drain2, MessageReceiver<? super M> drain3)
unchecked
warnings.
Internally calls add(MessageReceiver)
, please cf.!public List<MessageReceiver<? super M>> getDrains()
public void add(MessageReceiver<? super M> drain)
receive(Message)
. If it is already contained at some
position in the list, it ia first removed and then
re-inserted at the end of the list.public void add(MessageReceiver<? super M> drain1, MessageReceiver<? super M> drain2)
unchecked
warnings.
Internally calls add(MessageReceiver)
, please cf.!public void add(MessageReceiver<? super M>... newdrains)
add(MessageReceiver)
, please cf.!public void addAll(Iterable<MessageReceiver<? super M>> newdrains)
add(MessageReceiver)
, please cf.!public void clear()
public void receive(M message)
MessageThrower
s in the pipeline behind
these drains, then additionally the message is thrown after all drains have
been sent to.Throwable
is, of course, not intercepted!)receive
in interface MessageReceiver<M extends Message>
see also the complete user documentation .