Interface CyJobMonitor

  • public interface CyJobMonitor
    Apps are expected to implement this interface to receive notifications about job completions. To be informed about the status of a particular job, CyJobMonitors should be registered as services so that jobs can be reassociated with their handlers on session restore. Note that classes should implement the loadData method. This method will be called by the CyJobManager when a job transitions to status of FINISHED and the user has indicated that they are ready to load the data. This will be done as part of a Task to avoid potential synchronization issues.

    Module: jobs-api

    To use this in your app, include the following dependency in your POM:


    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 Detail

      • jobStatusChanged

        default void jobStatusChanged​(CyJob job,
                                      CyJobStatus status)
        This method is called whenever the status of a job changes.
        job - the CyJob who's status has changed
        status - the new job CyJobStatus
      • loadData

        void loadData​(CyJob job,
                      TaskMonitor taskMonitor)
        This method is called when when the job status transitions to FINISHED and the user has indicated that they are ready to load the data from the task. Typically, this will result in the fetchResults method being called, but if the data package is large, implementers might want to call fetchResults in a separate thread spawned from jobStatusChanged, then when the user indicates they are ready to process the data, the call to loadData can merge the resulting data into Cytoscape.
        job - the finished CyJob to fetch the data for
        taskMonitor - the TaskMonitor from the calling Task.