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
Modifier and TypeMethodDescriptionvoidexecute(TaskIterator iterator) voidexecute(TaskIterator iterator, TaskObserver observer) getConfiguration(TaskFactory factory, Object tunableContext) Returns a configuration object generated from theTunables read from theTaskFactory.default TunableMutator<?,?> This method returns theTunableMutatorthat is being used by this TaskManager.voidsetExecutionContext(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 Details
-
getConfiguration
Returns a configuration object generated from theTunables read from theTaskFactory.- Parameters:
factory- TheTaskFactorythat will be scanned forTunables.tunableContext- An object providing context for theTunables.- Returns:
- a configuration object generated from the
Tunables read from theTaskFactory.
-
setExecutionContext
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
This method is called to execute theTasks in aTaskIteratorprovided by aTaskFactory. This method returns once theTasks derived from theTaskIteratorreturned by theTaskFactory'screateTaskIterator()method have started (but not necessarily completed) execution. It does not wait for theTasks to finish.- Parameters:
iterator- TheTaskIteratorwhose tasks will be executed.
-
execute
This method is called to execute theTasks in aTaskIteratorprovided by aTaskFactory. This method returns once theTasks derived from theTaskIteratorreturned by theTaskFactory'screateTaskIterator()method have started (but not necessarily completed) execution. It does not wait for theTasks to finish, however, theTaskObservers taskFinished method is called with the results of any of the tasks in theTaskIteratorthat areObservableTasks.- Parameters:
iterator- TheTaskIteratorwhose tasks will be executed.observer- TheTaskObserverthat will be called with the results of theObservableTasks.
-
getTunableMutator
This method returns theTunableMutatorthat is being used by this TaskManager.- Returns:
- the
TunableMutatorbeing used by the TaskManager, or null if none is being used.
-