public interface CommunicationAspect
Director
, delegating (or not) to those receivers as it sees fit.
If an IOPort
references a communication aspect, then calls to any
receiver in that port will be handled instead by a receiver created by
the communication aspect.
For example, a communication aspect could intervene in communications to take into account shared resources. For example, it could delay delivery of any tokens to the original receiver (that created by the director) until the resources become available for the transport to occur.
Red (cxh) |
Red (cxh) |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
decoratorHighlightColorName
The parameter name of the decorator highlight color.
|
Modifier and Type | Method and Description |
---|---|
Receiver |
createIntermediateReceiver(Receiver receiver)
Create a receiver to mediate a communication via the specified receiver.
|
void |
registerListener(CommunicationAspectListener monitor)
Add a communication aspect monitor to the list of listeners.
|
void |
reset()
Reset the CommunicationAspect.
|
void |
sendToken(Receiver source,
Receiver receiver,
Token token)
Take the specified token and mediate communication to the specified
receiver.
|
static final java.lang.String decoratorHighlightColorName
Receiver createIntermediateReceiver(Receiver receiver) throws IllegalActionException
receiver
- Receiver whose communication is to be mediated.IllegalActionException
- If the receiver cannot be created.void registerListener(CommunicationAspectListener monitor)
monitor
- The communication aspect monitor.void reset()
void sendToken(Receiver source, Receiver receiver, Token token) throws IllegalActionException
source
- Receiver that sent the token.receiver
- The receiver for which this communication aspect is mediating
communication.token
- The token for the communication to mediate.IllegalActionException
- If the token cannot be sent.