Package org.cytoscape.work
Interface TaskObserver
- Type Parameters:
R
- The type of the result this observer is expected to receive.
public interface TaskObserver
An observer that gets notified when an
ObservableTask
finishes
executing. If the task finishes, taskFinished()
is
called with whatever result the task produces, if any. When a task iterator finishes,
the task manager will invoke allFinished
with the appropriate FinishStatus
object depending on the scenario in which the task iterator finished.Cytoscape Backwards Compatibility (SPI Interface): We expect that this interface will be implemented. Therefore to maintain backwards compatibility this interface will only be modified 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>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
allFinished(FinishStatus finishStatus)
Called by aTaskManager
to tell us that the task iterator has completed.void
taskFinished(ObservableTask task)
Called by anObservableTask
when it is finished executing.
-
Method Details
-
taskFinished
Called by anObservableTask
when it is finished executing.- Parameters:
task
- The task being observed
-
allFinished
Called by aTaskManager
to tell us that the task iterator has completed.- Parameters:
finishStatus
- Indicates how the task iterator completed.
-