Interface Mailbox
- All Superinterfaces:
Clearable,IGroupable
- All Known Subinterfaces:
AdaptableMailbox,FallThroughCapableMailbox
- All Known Implementing Classes:
AbstractUpdateSplittingMailbox,BehaviorChangingMailbox,DefaultMailbox,PosetAwareMailbox,TimelyMailbox,TimelyMailboxProxy,UpdateSplittingMailbox
A mailbox is associated with every
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.- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeliverAll(MessageSelector selector) Delivers all messages according to the given selector from this mailbox.Returns theCommunicationGroupof the receiver of this mailbox.Returns theReceiverof this mailbox.booleanisEmpty()Returns true if this mailbox is empty.voidpostMessage(Direction direction, Tuple update, Timestamp timestamp) Posts a new message to this mailbox.voidSets theCommunicationGroupthat the receiver of this mailbox is associated with.
-
Method Details
-
postMessage
Posts a new message to this mailbox.- Parameters:
direction- the direction of the updateupdate- the update element- Since:
- 2.4
-
deliverAll
Delivers all messages according to the given selector from this mailbox. The selector can also be null. In this case, no special separation is expected between the messages.- Parameters:
selector- the message selector
-
getReceiver
Receiver getReceiver()Returns theReceiverof this mailbox.- Returns:
- the receiver
-
getCurrentGroup
CommunicationGroup getCurrentGroup()Returns theCommunicationGroupof the receiver of this mailbox.- Specified by:
getCurrentGroupin interfaceIGroupable- Returns:
- the communication group
-
setCurrentGroup
Sets theCommunicationGroupthat the receiver of this mailbox is associated with.- Specified by:
setCurrentGroupin interfaceIGroupable- Parameters:
group- the communication group
-
isEmpty
boolean isEmpty()Returns true if this mailbox is empty.- Returns:
-