public class MessagePasser<M extends Message> extends SingleSender<M> implements MessageReceiver<M>
receiver
Constructor and Description |
---|
MessagePasser()
After calling this constructor, a call to
SingleSender.setReceiver(MessageReceiver)
is necessary. |
MessagePasser(MessageReceiver<? super M> r) |
Modifier and Type | Method and Description |
---|---|
void |
receive(M m)
Will pass the received message to the current
SingleSender.receiver . |
getReceiver, send, setReceiver
public MessagePasser()
SingleSender.setReceiver(MessageReceiver)
is necessary. Cf the documentation of SingleSender
.public MessagePasser(MessageReceiver<? super M> r)
public void receive(M m)
SingleSender.receiver
. ==null
receive
in interface MessageReceiver<M extends Message>
see also the complete user documentation .