Interface CyJob

  • All Known Implementing Classes:
    AbstractCyJob

    public interface CyJob
    A CyJob represents all of the state information necessary to marshal and unmarshal data, submit jobs, query job status, and fetch results. As such it is the main state object for the CyJob mechanism. This is also the object that gets saved and restored from sessions by the CyJobManager. Typically, CyJobs are implemented by the appropriate CyJobExecutionService, which may have different state that needs to be stored in the object or serialized/deserialized from sessions. Typically, once an App has created a CyJob (using CyJobExecutionService#getCyJob(String, String)) it shouldn't require any other references to jobs objects since it should contain all necessary state.

    Module: jobs-api

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

    <dependency>
        <groupId>org.cytoscape</groupId>
        <artifactId>jobs-api</artifactId>
    </dependency>

    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

      • getJobName

        String getJobName()
        Return the name for this job
        Returns:
        the job name
      • getJobId

        String getJobId()
        Return the ID for this job. The job ID is most often used to uniquely identify this job to a remote execution environment.
        Returns:
        the job id
      • getPath

        String getPath()
        Return the base path for communicating with the remote service for this job
        Returns:
        the path
      • getJobMonitor

        CyJobMonitor getJobMonitor()
        Return the service that handles status changes for this job.
        Returns:
        the status change monitor for this job
      • setJobMonitor

        void setJobMonitor​(CyJobMonitor jobMonitor)
        Set the service that handles status changes for this job.
        Parameters:
        jobMonitor - the status change handler for this job
      • getPollInterval

        int getPollInterval()
        Return the time in seconds between calls to checkJobStatus.
        Returns:
        the poll interval for this job
      • setPollInterval

        void setPollInterval​(int pollInterval)
        Set the time in seconds between calls to checkJobStatus.
        Parameters:
        pollInterval - the poll interval for this job
      • getJobDataService

        CyJobDataService getJobDataService()
        Return the CyJobDataService that was used to create this job.
        Parameters:
        the - CyJobDataService that handles data for this job