Class FinishStatus

  • public final class FinishStatus
    extends Object
    Indicates the status of a task iterator when it has finished for TaskObservers.

    Module: work-api

    To use this in your app, include the following dependency in your POM:


    Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
    • Method Detail

      • getSucceeded

        public static FinishStatus getSucceeded()
        Get a FinishStatus instance that indicates success.
      • newCancelled

        public static FinishStatus newCancelled​(Task cancelledTask)
        Construct a new FinishStatus object that indicates cancellation.
        cancelledTask - The task that was cancelled by the user.
      • newFailed

        public static FinishStatus newFailed​(Task failedTask,
                                             Exception exception)
        Construct a new FinishStatus object that indicates failure.
        failedTask - The task that failed.
        exception - The exception that the task threw.
      • getType

        public FinishStatus.Type getType()
        Specifies how the task iterator completed.
      • getTask

        public Task getTask()
        Returns the task that was cancelled or that had failed, or returns null if the task iterator succeeded.
      • getException

        public Exception getException()
        Returns the exception thrown by the task that failed, or null if the task iterator succeeded or was cancelled.