Class CompositeCommunicationAspect

    • Field Detail

      • justMonitor

        public Parameter justMonitor
        This parameter indicates whether the tokens received via the ImmediateReceivers are immediately forwarded to the wrapped receivers or whether they are delayed by this communication aspect and only forwarded through a CommunicationResponsePort. This parameter is a boolean that defaults to false.
      • _parameters

        protected java.util.HashMap<IOPort,​java.util.List<Attribute>> _parameters
        List of parameters per port.
    • Constructor Detail

      • CompositeCommunicationAspect

        public CompositeCommunicationAspect​(Workspace workspace)
                                     throws IllegalActionException,
                                            NameDuplicationException
        Construct a CompositeCommunicationAspect in the specified workspace with no container and an empty string as a name. You can then change the name with setName(). If the workspace argument is null, then use the default workspace. You should set the local director or executive director before attempting to send data to the actor or to execute it. Add the actor to the workspace directory. Increment the version number of the workspace.
        Parameters:
        workspace - The workspace that will list the actor.
        Throws:
        IllegalActionException - If the container is incompatible with this actor.
        NameDuplicationException - If the name coincides with an actor already in the container.
      • CompositeCommunicationAspect

        public CompositeCommunicationAspect​(CompositeEntity container,
                                            java.lang.String name)
                                     throws IllegalActionException,
                                            NameDuplicationException
        Construct a CompositeCommunicationAspect with a name and a container. The container argument must not be null, or a NullPointerException will be thrown. This actor will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. Increment the version of the workspace. This actor will have no local director initially, and its executive director will be simply the director of the container.
        Parameters:
        container - The container.
        name - The name of this actor.
        Throws:
        IllegalActionException - If the container is incompatible with this actor.
        NameDuplicationException - If the name coincides with an actor already in the container.
    • Method Detail

      • createDecoratorAttributes

        public DecoratorAttributes createDecoratorAttributes​(NamedObj target)
        Return the decorated attributes for the target NamedObj. If the specified target is not an Actor, return null.
        Specified by:
        createDecoratorAttributes in interface Decorator
        Parameters:
        target - The NamedObj that will be decorated.
        Returns:
        The decorated attributes for the target NamedObj, or null if the specified target is not an Actor.
      • decoratedObjects

        public java.util.List<NamedObj> decoratedObjects()
        Return a list of the entities deeply contained by the container of this resource scheduler.
        Specified by:
        decoratedObjects in interface Decorator
        Returns:
        A list of the objects decorated by this decorator.
      • isGlobalDecorator

        public boolean isGlobalDecorator()
        Return true to indicate that this decorator should decorate objects across opaque hierarchy boundaries.
        Specified by:
        isGlobalDecorator in interface Decorator
        Returns:
        True if decorator is global.
      • setInputPortName

        public void setInputPortName​(Port port,
                                     java.lang.String inputPortName)
        Set the name of the CommunicationRequestPort that will be receiving tokens from this actor port.
        Parameters:
        port - The actorport.
        inputPortName - The name of the CommunicationRequestPort.
      • sendToken

        public void sendToken​(Receiver source,
                              Receiver receiver,
                              Token token)
                       throws IllegalActionException
        Initiate a send of the specified token to the specified receiver. This method will schedule a refiring of this actor if there is not one already scheduled.
        Specified by:
        sendToken in interface CommunicationAspect
        Parameters:
        source - Sender of the token.
        receiver - The receiver to send to.
        token - The token to send.
        Throws:
        IllegalActionException - If the refiring request fails.