public interface Mailbox extends Clearable, IGroupable
Receiver. Messages can be sent to a Receiver by posting them into
the mailbox. Different mailbox implementations may differ in the way how they deliver the posted messages.| Modifier and Type | Method and Description |
|---|---|
void |
deliverAll(MessageSelector selector)
Delivers all messages according to the given selector from this mailbox.
|
CommunicationGroup |
getCurrentGroup()
Returns the
CommunicationGroup of the receiver of this mailbox. |
Receiver |
getReceiver()
Returns the
Receiver of this mailbox. |
boolean |
isEmpty()
Returns true if this mailbox is empty.
|
void |
postMessage(Direction direction,
Tuple update,
Timestamp timestamp)
Posts a new message to this mailbox.
|
void |
setCurrentGroup(CommunicationGroup group)
Sets the
CommunicationGroup that the receiver of this mailbox is associated with. |
void postMessage(Direction direction, Tuple update, Timestamp timestamp)
direction - the direction of the updateupdate - the update elementvoid deliverAll(MessageSelector selector)
selector - the message selectorCommunicationGroup getCurrentGroup()
CommunicationGroup of the receiver of this mailbox.getCurrentGroup in interface IGroupablevoid setCurrentGroup(CommunicationGroup group)
CommunicationGroup that the receiver of this mailbox is associated with.setCurrentGroup in interface IGroupablegroup - the communication groupboolean isEmpty()