Interface TaskMonitor

    • Method Detail

      • startTask

        TaskMonitor.Task startTask​(ProjectFile projectFile)
        Create a task monitoring object
        Parameters:
        projectFile - related project file
        Returns:
        the newly created task
      • startTask

        TaskMonitor.Task startTask​(String name,
                                   Project project)
        Create a task monitoring object
        Parameters:
        name - name of the task
        project - related project
        Returns:
        the newly created task
      • updateTaskMessage

        void updateTaskMessage​(UUID id,
                               String message)
        Update the display status of the task
        Parameters:
        id - id of the task
        message - new status message
      • takeSnapshot

        TaskMonitor.Snapshot takeSnapshot​(String projectId)
        Return the complete state of tasks related to a project
        Parameters:
        projectId - related project
        Returns:
      • cancelTaskComputation

        boolean cancelTaskComputation​(UUID id)
        Try cancel/stop the computation process monitored by this task. The stopTask(UUID) must still be called afterward to clean the task monitor object
        Parameters:
        id - the id of the task
        Returns:
        a boolean indicating if the cancellation process has succeeded
      • addListener

        void addListener​(TaskListener listener)
        Add a listener to task events
        Parameters:
        listener -
      • removeListener

        void removeListener​(TaskListener listener)
        Remove a listener of task events
        Parameters:
        listener -