public final class FinishStatus extends Object
TaskObserver
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>
Modifier and Type | Class and Description |
---|---|
static class |
FinishStatus.Type |
Modifier | Constructor and Description |
---|---|
protected |
FinishStatus(FinishStatus.Type type,
Task task,
Exception exception) |
Modifier and Type | Method and 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 a
FinishStatus 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 new
FinishStatus object that indicates cancellation. |
static FinishStatus |
newFailed(Task failedTask,
Exception exception)
Construct a new
FinishStatus object that indicates failure. |
protected FinishStatus(FinishStatus.Type type, Task task, Exception exception)
public static FinishStatus getSucceeded()
FinishStatus
instance that indicates success.public static FinishStatus newCancelled(Task cancelledTask)
FinishStatus
object that indicates cancellation.cancelledTask
- The task that was cancelled by the user.public static FinishStatus newFailed(Task failedTask, Exception exception)
FinishStatus
object that indicates failure.failedTask
- The task that failed.exception
- The exception that the task threw.public FinishStatus.Type getType()
public Task getTask()
public Exception getException()
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.