Class AbstractDirector

    • Field Detail

      • m_LoggingPrefix

        protected String m_LoggingPrefix
        the prefix for logging messages.
      • m_Stopped

        protected boolean m_Stopped
        whether execution was stopped.
      • m_Stopping

        protected boolean m_Stopping
        whether execution is in the process of being stopped.
      • m_Paused

        protected boolean m_Paused
        whether the director has been paused.
      • m_Flushing

        protected boolean m_Flushing
        whether to flush the execution.
    • Constructor Detail

      • AbstractDirector

        public AbstractDirector()
        Initializes the item.
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.

        Default implementation does nothing
      • updatePrefix

        public void updatePrefix()
        Updates the prefix of the print objects.
      • setLoggingLevel

        public void setLoggingLevel​(LoggingLevel value)
        Sets the logging level.
        value - the level
      • handleException

        protected String handleException​(String msg,
                                         Throwable t)
        Outputs the stacktrace along with the message on stderr and returns a combination of both of them as string.
        msg - the message for the exception
        t - the exception
        the full error message (message + stacktrace)
      • setControlActor

        public void setControlActor​(AbstractControlActor value)
        Sets the control actor to execute.
        value - the control actor
      • getControlActor

        public AbstractControlActor getControlActor()
        Returns the control actor to execute.
        the control actor
      • hasControlActor

        public boolean hasControlActor()
        Returns whether a control actor is present.
        true if available
      • getVariables

        protected Variables getVariables()
        Return the Variables instance used by the control actor.
        the instance in use
      • execute

        public abstract String execute()
        Executes the group of actors.
        null if everything went smooth
      • pauseExecution

        public void pauseExecution()
        Pauses the execution.
      • pause

        protected void pause()
        The pause loop.
      • isPaused

        public boolean isPaused()
        Returns whether the object is currently paused.
        true if object is paused
      • flushExecution

        public void flushExecution()
        Stops the processing of tokens without stopping the flow.
      • isFlushing

        public boolean isFlushing()
        Returns whether the execution is being flushed.
        true if execution is being flushed
      • stopExecution

        public void stopExecution()
        Stops the execution.
        Specified by:
        stopExecution in interface Stoppable
      • isStopped

        public boolean isStopped()
        Returns whether the execution was stopped.
        Specified by:
        isStopped in interface StoppableWithFeedback
        true if execution was stopped
      • isStopping

        public boolean isStopping()
        Returns whether the execution is being stopped.
        true if the stop of the execution has been initiated
      • isFinished

        public boolean isFinished()
        Checks whether the director has finished. Default implementation always returns true.
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface CleanUpHandler
      • toString

        public String toString()
        Returns a string representation of the director.
        toString in class Object
        a string representation