Class NetworkActorBase

    • Constructor Detail

      • NetworkActorBase

        public NetworkActorBase​(CompositeEntity container,
                                java.lang.String name)
                         throws IllegalActionException,
                                NameDuplicationException
        Construct an actor with the specified name and container. The container argument must not be null, or a NullPointerException will be thrown. If the name argument is null, then the name is set to the empty string. This constructor write-synchronizes on the workspace.
        Parameters:
        container - The container.
        name - The name of the 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

      • setTimer

        protected NetworkActorBase.Timer setTimer​(int kind,
                                                  Time expirationTime)
                                           throws IllegalActionException
        Construct a timer object with the specified kind and expirationTime and add the timer to the timers set.
        Returns:
        return the created timer to the caller method (make it easy for it to cancel the timer).
        Throws:
        IllegalActionException - If thrown by getDirector().fireAt().
      • whoTimeout

        protected int whoTimeout()
                          throws IllegalActionException
        Get the timer with expiration time that matches the current time. Remove the timer from the timers set and return the kind parameter of the timer to the caller method. If there are multiple timers with expiration time matching the current time, return the first one from the iterator list.
        Returns:
        return the kind parameter of the timeout timer.
        Throws:
        IllegalActionException - If thrown by getDirector().getCurrentTime().