Package org.cytoscape.work
Class FinishStatus
- java.lang.Object
-
- org.cytoscape.work.FinishStatus
-
public final class FinishStatus extends Object
Indicates the status of a task iterator when it has finished forTaskObserver
s.Module:
work-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>work-api</artifactId> </dependency>
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FinishStatus.Type
-
Constructor Summary
Constructors Modifier Constructor Description protected
FinishStatus(FinishStatus.Type type, Task task, Exception exception)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Exception
getException()
Returns the exception thrown by the task that failed, or null if the task iterator succeeded or was cancelled.static FinishStatus
getSucceeded()
Get aFinishStatus
instance that indicates success.Task
getTask()
Returns the task that was cancelled or that had failed, or returns null if the task iterator succeeded.FinishStatus.Type
getType()
Specifies how the task iterator completed.static FinishStatus
newCancelled(Task cancelledTask)
Construct a newFinishStatus
object that indicates cancellation.static FinishStatus
newFailed(Task failedTask, Exception exception)
Construct a newFinishStatus
object that indicates failure.
-
-
-
Constructor Detail
-
FinishStatus
protected FinishStatus(FinishStatus.Type type, Task task, Exception exception)
-
-
Method Detail
-
getSucceeded
public static FinishStatus getSucceeded()
Get aFinishStatus
instance that indicates success.
-
newCancelled
public static FinishStatus newCancelled(Task cancelledTask)
Construct a newFinishStatus
object that indicates cancellation.- Parameters:
cancelledTask
- The task that was cancelled by the user.
-
newFailed
public static FinishStatus newFailed(Task failedTask, Exception exception)
Construct a newFinishStatus
object that indicates failure.- Parameters:
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.
-
-