Class SysMLSequentialDirector.SysMLSequentialReceiver

  • All Implemented Interfaces:
    Receiver
    Enclosing class:
    SysMLSequentialDirector

    public class SysMLSequentialDirector.SysMLSequentialReceiver
    extends Mailbox
    Variant of a Mailbox that overrides the put() method to divert the input to the director's queue and then provides a method to really put a token into a receiver. If the containing port has a boolean-valued attribute named "flow", then the behavior is quite different. First, a put() updates the value of the receiver immediately in addition to putting a "change event" on the event queue. Second, the receiver value is persistent. A get() does not clear the receiver.
    • Constructor Detail

      • SysMLSequentialReceiver

        public SysMLSequentialReceiver()
    • Method Detail

      • get

        public Token get()
                  throws NoTokenException
        Get the contained Token. If there is none, throw an exception. The token is removed.
        Specified by:
        get in interface Receiver
        Overrides:
        get in class Mailbox
        Returns:
        The token contained by this mailbox.
        Throws:
        NoTokenException - If this mailbox is empty.
      • put

        public void put​(Token token)
        Put a token into the queue for containing actor.
        Specified by:
        put in interface Receiver
        Overrides:
        put in class Mailbox
        Parameters:
        token - The token to be put into the queue.
      • reallyPut

        public void reallyPut​(Token token)
                       throws NoRoomException
        Put a token into the mailbox.
        Parameters:
        token - The token to be put into the mailbox.
        Throws:
        NoRoomException - If this mailbox is not empty.