Package org.cytoscape.work
Interface TaskManager<T,C>
-
- All Known Subinterfaces:
DialogTaskManager
,PanelTaskManager
,SynchronousTaskManager<T>
- All Known Implementing Classes:
AbstractTaskManager
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>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
execute(TaskIterator iterator)
void
execute(TaskIterator iterator, TaskObserver observer)
T
getConfiguration(TaskFactory factory, Object tunableContext)
Returns a configuration object generated from theTunable
s read from theTaskFactory
.default TunableMutator<?,?>
getTunableMutator()
This method returns theTunableMutator
that is being used by this TaskManager.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.
-
-
-
Method Detail
-
getConfiguration
T getConfiguration(TaskFactory factory, Object tunableContext)
Returns a configuration object generated from theTunable
s read from theTaskFactory
.- Parameters:
factory
- TheTaskFactory
that will be scanned forTunable
s.tunableContext
- An object providing context for theTunable
s.- Returns:
- a configuration object generated from the
Tunable
s read from theTaskFactory
.
-
setExecutionContext
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.- Parameters:
context
- The object to serve as the execution context for the TaskManager.
-
execute
void execute(TaskIterator iterator)
This method is called to execute theTask
s in aTaskIterator
provided by aTaskFactory
. This method returns once theTask
s derived from theTaskIterator
returned by theTaskFactory
'screateTaskIterator()
method have started (but not necessarily completed) execution. It does not wait for theTask
s to finish.- Parameters:
iterator
- TheTaskIterator
whose tasks will be executed.
-
execute
void execute(TaskIterator iterator, TaskObserver observer)
This method is called to execute theTask
s in aTaskIterator
provided by aTaskFactory
. This method returns once theTask
s derived from theTaskIterator
returned by theTaskFactory
'screateTaskIterator()
method have started (but not necessarily completed) execution. It does not wait for theTask
s to finish, however, theTaskObserver
s taskFinished method is called with the results of any of the tasks in theTaskIterator
that areObservableTask
s.- Parameters:
iterator
- TheTaskIterator
whose tasks will be executed.observer
- TheTaskObserver
that will be called with the results of theObservableTask
s.
-
getTunableMutator
default TunableMutator<?,?> getTunableMutator()
This method returns theTunableMutator
that is being used by this TaskManager.- Returns:
- the
TunableMutator
being used by the TaskManager, or null if none is being used.
-
-