Package nzilbb.util

Interface MonitorableTask

    • Method Detail

      • getPercentComplete

        Integer getPercentComplete()
        Determines how far through the task is is.
        Returns:
        An integer between 0 and 100 (inclusive), or null if progress can not be calculated.
      • cancel

        void cancel()
        Cancels the task.
      • getRunning

        boolean getRunning()
        Reveals whether the task is still running or not.
        Returns:
        true if the task is currently running, false otherwise.
      • getTaskId

        default String getTaskId()
        Returns a unique identifier for the task.

        The default implementation returns the ID of the current thread.

        Returns:
        A unique identifier.
      • getStatus

        default String getStatus()
        Reveals the current status of the task.

        The default implementation always returns an empty string.

        Returns:
        A description of the current status of the task for displaying to the user, or an empty string.