Class FlowWorker

    • Field Detail

      • m_Flow

        protected Actor m_Flow
        the flow to execute.
      • m_File

        protected File m_File
        the current flow file.
      • m_Output

        protected String m_Output
        generated output.
      • m_ShowNotification

        protected boolean m_ShowNotification
        whether to show a notification.
      • m_Debug

        protected boolean m_Debug
        whether to run in debug mode.
      • m_Running

        protected boolean m_Running
        whether the flow is still being executed.
      • m_Stopping

        protected boolean m_Stopping
        whether the flow is being stopped.
    • Constructor Detail

      • FlowWorker

        public FlowWorker​(FlowWorkerHandler owner,
                          Actor flow,
                          File file,
                          boolean showNotification,
                          boolean debug)
        Initializes the worker.
    • Method Detail

      • doInBackground

        protected Object doInBackground()
                                 throws Exception
        Executes the flow.
        always null
        Exception - if unable to compute a result
      • done

        protected void done()
        Executed on the Event Dispatch Thread after the doInBackground method is finished.
      • run

        public void run()
        Execute the flow.
        Specified by:
        run in interface Runnable
      • pauseExecution

        public void pauseExecution()
        Pauses the execution.
        Specified by:
        pauseExecution in interface Pausable
      • isPaused

        public boolean isPaused()
        Returns whether the object is currently paused.
        Specified by:
        isPaused in interface Pausable
        true if object is paused
      • resumeExecution

        public void resumeExecution()
        Resumes the execution.
        Specified by:
        resumeExecution in interface Pausable
      • stopExecution

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

        public boolean isRunning()
        Returns whether a flow is currently running.
        true if a flow is being executed
      • isStopping

        public boolean isStopping()
        Returns whether a flow is currently being stopped.
        true if a flow is currently being stopped
      • showNotification

        public void showNotification​(String msg,
                                     FlowPanelNotificationArea.NotificationType type)
        Displays the given message in a separate dialog.
        msg - the message to display
        type - the type of notification (info/warning/error)
      • getFlow

        public Actor getFlow()
        Returns the flow.
        the flow
      • updateTabIcon

        protected void updateTabIcon​(String icon)
        Updates the tab icon, if possible.
        icon - the icon name, can be null