Package ptolemy.domains.sysml.kernel
Class SysMLSequentialDirector.SysMLSequentialReceiver
- java.lang.Object
-
- ptolemy.actor.AbstractReceiver
-
- ptolemy.actor.Mailbox
-
- ptolemy.domains.sysml.kernel.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 Summary
Constructors Constructor Description SysMLSequentialReceiver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Token
get()
Get the contained Token.void
put(Token token)
Put a token into the queue for containing actor.void
reallyPut(Token token)
Put a token into the mailbox.-
Methods inherited from class ptolemy.actor.Mailbox
clear, elementList, hasRoom, hasRoom, hasToken, hasToken
-
Methods inherited from class ptolemy.actor.AbstractReceiver
getArray, getContainer, getCurrentTime, getModelTime, isKnown, putArray, putArrayToAll, putToAll, reset, setContainer, toString
-
-
-
-
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 interfaceReceiver
- Overrides:
get
in classMailbox
- 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.
-
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.
-
-