Package org.cytoscape.jobs
Interface CyJob
-
- All Known Implementing Classes:
AbstractCyJob
public interface CyJob
ACyJob
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 theCyJobManager
. Typically,CyJobs
are implemented by the appropriateCyJobExecutionService
, which may have different state that needs to be stored in the object or serialized/deserialized from sessions. Typically, once an App has created aCyJob
(usingCyJobExecutionService#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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CyJobDataService
getJobDataService()
Return theCyJobDataService
that was used to create this job.CyJobExecutionService
getJobExecutionService()
Return theCyJobExecutionService
that created this job.String
getJobId()
Return the ID for this job.CyJobMonitor
getJobMonitor()
Return the service that handles status changes for this job.String
getJobName()
Return the name for this jobString
getPath()
Return the base path for communicating with the remote service for this jobint
getPollInterval()
Return the time in seconds between calls to checkJobStatus.void
setJobMonitor(CyJobMonitor jobMonitor)
Set the service that handles status changes for this job.void
setPollInterval(int pollInterval)
Set the time in seconds between calls to checkJobStatus.
-
-
-
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
-
getJobExecutionService
CyJobExecutionService getJobExecutionService()
Return theCyJobExecutionService
that created this job. Most of the methods for interacting with the backend service are through theCyJobExecutionService
- Parameters:
the
- CyJobExecutionService that created this job
-
getJobDataService
CyJobDataService getJobDataService()
Return theCyJobDataService
that was used to create this job.- Parameters:
the
- CyJobDataService that handles data for this job
-
-