org.eclipse.viatra.query.runtime.rete.network

## Interface Mailbox

- All Superinterfaces:
    Clearable
  All Known Implementing Classes:
    DefaultMailbox, MonotonicityAwareMailbox

      public interface Mailbox
      extends Clearable

  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:
    1.6

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deliverAll(MessageKind kind)` Delivers all messages of the given kind from this mailbox.
    `Receiver` | `getReceiver()` Returns the `Receiver` of this mailbox.
    `void` | `postMessage(Direction direction, Tuple update)` Posts a new message to this mailbox.

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.tuple.Clearable

      `clear`

- - ### Method Detail

    - #### postMessage

          void postMessage(Direction direction,
                           Tuple update)

      Posts a new message to this mailbox.
      Parameters:
        `direction` - the direction of the update
        `update` - the update element

    - #### deliverAll

          void deliverAll(MessageKind kind)

      Delivers all messages of the given kind from this mailbox. The kind can also be null. In this case, there no special separation is expected between the messages.
      Parameters:
        `kind` - the message kind

    - #### getReceiver

          Receiver getReceiver()

      Returns the `Receiver` of this mailbox.
      Returns:
        the receiver