public abstract class AtomicCommunicationAspect extends TypedAtomicActor implements CommunicationAspect, Decorator
Red (derler) |
Yellow (derler) |
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<IOPort,java.util.List<Attribute>> |
_parameters
List of parameters per port.
|
protected int |
_tokenCount
Amount of tokens currently being processed by the switch.
|
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
decoratorHighlightColorName
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
AtomicCommunicationAspect(CompositeEntity container,
java.lang.String name)
Construct an AtomicQuantityManager with a name and a container.
|
AtomicCommunicationAspect(Workspace workspace)
Construct an AtomicQuantityManager in the specified workspace with an empty
string as a name.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_sendToReceiver(Receiver receiver,
Token token)
Send token to receiver.
|
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace.
|
DecoratorAttributes |
createDecoratorAttributes(NamedObj target)
Return the decorated attributes for the target NamedObj.
|
Receiver |
createIntermediateReceiver(Receiver receiver)
Create an intermediate receiver that wraps a given receiver.
|
java.util.List<NamedObj> |
decoratedObjects()
Return a list of the entities deeply contained by the container
of this resource scheduler.
|
void |
initialize()
Initialize the actor.
|
boolean |
isGlobalDecorator()
Return true to indicate that this decorator should
decorate objects across opaque hierarchy boundaries.
|
void |
registerListener(CommunicationAspectListener monitor)
Add a communication aspect monitor to the list of listeners.
|
void |
sendCommunicationEvent(Actor source,
int messageId,
int messageCnt,
CommunicationAspectListener.EventType eventType)
Notify the monitor that an event happened.
|
void |
setContainer(CompositeEntity container)
Override the base class to first set the container, then establish
a connection with any decorated objects it finds in scope in the new
container.
|
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
reset, sendToken
description, getContainer, getDisplayName, getFullName, getName, getName, setName
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
fire, isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, preinitialize, removeInitializable, wrapup
getDerivedLevel, getDerivedList, propagateValue
protected java.util.HashMap<IOPort,java.util.List<Attribute>> _parameters
protected int _tokenCount
public AtomicCommunicationAspect(Workspace workspace)
workspace
- The workspace that will list the entity.public AtomicCommunicationAspect(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor.IllegalActionException
- If the container is incompatible
with this actor.NameDuplicationException
- If the name coincides with
an actor already in the container.public DecoratorAttributes createDecoratorAttributes(NamedObj target)
createDecoratorAttributes
in interface Decorator
target
- The NamedObj that will be decorated.public java.util.List<NamedObj> decoratedObjects()
decoratedObjects
in interface Decorator
public boolean isGlobalDecorator()
isGlobalDecorator
in interface Decorator
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class TypedAtomicActor
workspace
- The workspace for the new object.java.lang.CloneNotSupportedException
- If any of the attributes
cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public Receiver createIntermediateReceiver(Receiver receiver) throws IllegalActionException
createIntermediateReceiver
in interface CommunicationAspect
receiver
- The receiver that is being wrapped.IllegalActionException
- Not thrown in this class but may be thrown in derived classes.public void registerListener(CommunicationAspectListener monitor)
registerListener
in interface CommunicationAspect
monitor
- The communication aspect monitor.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicActor<TypedIOPort>
IllegalActionException
- Thrown by super class.public void sendCommunicationEvent(Actor source, int messageId, int messageCnt, CommunicationAspectListener.EventType eventType)
source
- The source actor that caused the event in the
communication aspect.messageId
- The ID of the message that caused the event in
the communication aspect.messageCnt
- The amount of messages currently being processed
by the communication aspect.eventType
- Type of event.public void setContainer(CompositeEntity container) throws IllegalActionException, NameDuplicationException
setContainer
in class AtomicActor<TypedIOPort>
container
- The container to attach this attribute to..IllegalActionException
- If this attribute is not of the
expected class for the container, or it has no name,
or the attribute and container are not in the same workspace, or
the proposed container would result in recursive containment.NameDuplicationException
- If the container already has
an attribute with the name of this attribute.ComponentEntity.getContainer()
protected void _sendToReceiver(Receiver receiver, Token token) throws NoRoomException, IllegalActionException
receiver
- The receiver.token
- The token.NoRoomException
- If the receiver has no room for the token.IllegalActionException
- If the receiver cannot receive the token.