Cytoscape 3.1.1 API

org.cytoscape.work
Class FinishStatus

java.lang.Object
  extended by org.cytoscape.work.FinishStatus

public final class FinishStatus
extends Object

Indicates the status of a task iterator when it has finished for TaskObservers.


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.

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>

Nested Class Summary
static class FinishStatus.Type
           
 
Constructor Summary
protected FinishStatus(FinishStatus.Type type, Task task, Exception exception)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinishStatus

protected FinishStatus(FinishStatus.Type type,
                       Task task,
                       Exception exception)
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.

Parameters:
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.

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.


Cytoscape 3.1.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.