Cytoscape 3.0.0-beta1 API

org.cytoscape.work
Interface TaskFactory

All Known Subinterfaces:
ExportSelectedTableTaskFactory, ExportVizmapTaskFactory, LoadNetworkFileTaskFactory, LoadNetworkURLTaskFactory, LoadTableFileTaskFactory, LoadTableURLTaskFactory, LoadVizmapFileTaskFactory, MapGlobalToLocalTableTaskFactory, NewSessionTaskFactory, OpenSessionTaskFactory, SaveSessionAsTaskFactory
All Known Implementing Classes:
AbstractTaskFactory

public interface TaskFactory

Returns an instance of a TaskIterator. Intended to be used as an OSGi service, singleton, every type of Task has one.
Let's say you'd like to do some kind of processing, let's call it "X". Then you would create a class called XTask, where the processing would be taking place in XTask's run() method. Assuming X needs to have two types of data, let's call them Y and Z, in order to control its behavior. This would imply that XTask's constructor should take an X and a Y as parameters. And XTaskFactory should have setY() and setZ() methods. XTaskFactory's createTaskIterator() method would then construct an XTask with the Y and Z that it has available and create a TaskIterator with this single Task to iterate over.


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.

Method Summary
 TaskIterator createTaskIterator()
          Returns an iterator returning a sequence of Tasks.
 boolean isReady()
           
 

Method Detail

createTaskIterator

TaskIterator createTaskIterator()
Returns an iterator returning a sequence of Tasks.

Returns:
an iterator returning a sequence of Tasks. Note: Most factory's returned iterator only yields a single Task.

isReady

boolean isReady()

Cytoscape 3.0.0-beta1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.