public interface TaskManager<T,C>
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 | Method and Description |
---|---|
void |
execute(TaskIterator iterator)
|
void |
execute(TaskIterator iterator,
TaskObserver observer)
|
T |
getConfiguration(TaskFactory factory,
Object tunableContext)
Returns a configuration object generated from the
Tunable s
read from the TaskFactory . |
void |
setExecutionContext(C context)
Allows a user of a TaskManager to set the execution context for
the task, for example the parent Window of a dialog or the top-level
menu for menu generation.
|
T getConfiguration(TaskFactory factory, Object tunableContext)
Tunable
s
read from the TaskFactory
.factory
- The TaskFactory
that will be scanned for Tunable
s.tunableContext
- An object providing context for the Tunable
s.Tunable
s
read from the TaskFactory
.void setExecutionContext(C context)
context
- The object to serve as the execution context for the TaskManager.void execute(TaskIterator iterator)
Task
s in a TaskIterator
provided
by a TaskFactory
.
This method returns once the Task
s derived from the TaskIterator
returned by the TaskFactory
's createTaskIterator()
method have
started (but not necessarily completed) execution.
It does not wait for the Task
s to finish.iterator
- The TaskIterator
whose tasks will be executed.void execute(TaskIterator iterator, TaskObserver observer)
Task
s in a TaskIterator
provided
by a TaskFactory
.
This method returns once the Task
s derived from the TaskIterator
returned by the TaskFactory
's createTaskIterator()
method have
started (but not necessarily completed) execution.
It does not wait for the Task
s to finish, however, the TaskObserver
s
taskFinished method is called with the results of any of the tasks in the TaskIterator
that are ObservableTask
s.iterator
- The TaskIterator
whose tasks will be executed.observer
- The TaskObserver
that will be called with the results of the ObservableTask
s.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.