Package org.cytoscape.jobs
Class AbstractCyJob
- java.lang.Object
-
- org.cytoscape.jobs.AbstractCyJob
-
- All Implemented Interfaces:
CyJob
public class AbstractCyJob extends Object implements CyJob
This can be used as a base class for custom implementations ofCyJob
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 (Abstract Class): This class is abstract and meant to be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
-
-
Field Summary
Fields Modifier and Type Field Description protected CyJobDataService
dataService
protected CyJobExecutionService
execService
protected String
jobId
protected CyJobMonitor
jobMonitor
protected String
jobName
protected String
path
protected int
pollInterval
-
Constructor Summary
Constructors Constructor Description AbstractCyJob(String name, String basePath, CyJobExecutionService executionService, CyJobDataService dataService, CyJobMonitor jobMonitor)
-
Method Summary
All Methods Instance Methods Concrete 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 monitor)
Set the service that handles status changes for this job.void
setPollInterval(int pollInterval)
Set the time in seconds between calls to checkJobStatus.
-
-
-
Field Detail
-
jobMonitor
protected CyJobMonitor jobMonitor
-
pollInterval
protected int pollInterval
-
dataService
protected final CyJobDataService dataService
-
execService
protected final CyJobExecutionService execService
-
jobName
protected final String jobName
-
path
protected String path
-
jobId
protected String jobId
-
-
Constructor Detail
-
AbstractCyJob
public AbstractCyJob(String name, String basePath, CyJobExecutionService executionService, CyJobDataService dataService, CyJobMonitor jobMonitor)
-
-
Method Detail
-
getJobDataService
public CyJobDataService getJobDataService()
Description copied from interface:CyJob
Return theCyJobDataService
that was used to create this job.- Specified by:
getJobDataService
in interfaceCyJob
-
getJobExecutionService
public CyJobExecutionService getJobExecutionService()
Description copied from interface:CyJob
Return theCyJobExecutionService
that created this job. Most of the methods for interacting with the backend service are through theCyJobExecutionService
- Specified by:
getJobExecutionService
in interfaceCyJob
-
getJobName
public String getJobName()
Description copied from interface:CyJob
Return the name for this job- Specified by:
getJobName
in interfaceCyJob
- Returns:
- the job name
-
getPath
public String getPath()
Description copied from interface:CyJob
Return the base path for communicating with the remote service for this job
-
getJobMonitor
public CyJobMonitor getJobMonitor()
Description copied from interface:CyJob
Return the service that handles status changes for this job.- Specified by:
getJobMonitor
in interfaceCyJob
- Returns:
- the status change monitor for this job
-
setJobMonitor
public void setJobMonitor(CyJobMonitor monitor)
Description copied from interface:CyJob
Set the service that handles status changes for this job.- Specified by:
setJobMonitor
in interfaceCyJob
- Parameters:
monitor
- the status change handler for this job
-
getPollInterval
public int getPollInterval()
Description copied from interface:CyJob
Return the time in seconds between calls to checkJobStatus.- Specified by:
getPollInterval
in interfaceCyJob
- Returns:
- the poll interval for this job
-
setPollInterval
public void setPollInterval(int pollInterval)
Description copied from interface:CyJob
Set the time in seconds between calls to checkJobStatus.- Specified by:
setPollInterval
in interfaceCyJob
- Parameters:
pollInterval
- the poll interval for this job
-
-