public class MessageSync<M extends Message> extends SingleSender<M> implements MessageReceiver<M>
receive(Message)
method is declared "synchronized
", so
that a "monitor" is opened on each call. A second call from a different thread
will wait until the first call has completed.receiver
Constructor and Description |
---|
MessageSync() |
MessageSync(MessageReceiver<? super M> r) |
Modifier and Type | Method and Description |
---|---|
void |
receive(M m)
This method is declared "
synchronized ", so
that a "monitor" is opened on each call. |
getReceiver, send, setReceiver
public MessageSync()
public MessageSync(MessageReceiver<? super M> r)
public void receive(M m)
synchronized
", so
that a "monitor" is opened on each call. A second call from a different thread
will wait until the first call has completed.receive
in interface MessageReceiver<M extends Message>
see also the complete user documentation .