Interface TaskManager<T,​C>

  • All Known Subinterfaces:
    DialogTaskManager, PanelTaskManager, SynchronousTaskManager<T>
    All Known Implementing Classes:
    AbstractTaskManager

    public interface TaskManager<T,​C>
    Executes the Tasks found in the TaskIterator provided by a TaskFactory.

    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 Detail

      • getConfiguration

        T getConfiguration​(TaskFactory factory,
                           Object tunableContext)
        Returns a configuration object generated from the Tunables read from the TaskFactory.
        Parameters:
        factory - The TaskFactory that will be scanned for Tunables.
        tunableContext - An object providing context for the Tunables.
        Returns:
        a configuration object generated from the Tunables read from the TaskFactory.
      • 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 the Tasks in a TaskIterator provided by a TaskFactory. This method returns once the Tasks derived from the TaskIterator returned by the TaskFactory's createTaskIterator() method have started (but not necessarily completed) execution. It does not wait for the Tasks to finish.
        Parameters:
        iterator - The TaskIterator whose tasks will be executed.