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 ofCyJobModule:
jobs-apiTo 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 CyJobDataServicedataServiceprotected CyJobExecutionServiceexecServiceprotected StringjobIdprotected CyJobMonitorjobMonitorprotected StringjobNameprotected Stringpathprotected intpollInterval
-
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 CyJobDataServicegetJobDataService()Return theCyJobDataServicethat was used to create this job.CyJobExecutionServicegetJobExecutionService()Return theCyJobExecutionServicethat created this job.StringgetJobId()Return the ID for this job.CyJobMonitorgetJobMonitor()Return the service that handles status changes for this job.StringgetJobName()Return the name for this jobStringgetPath()Return the base path for communicating with the remote service for this jobintgetPollInterval()Return the time in seconds between calls to checkJobStatus.voidsetJobMonitor(CyJobMonitor monitor)Set the service that handles status changes for this job.voidsetPollInterval(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:CyJobReturn theCyJobDataServicethat was used to create this job.- Specified by:
getJobDataServicein interfaceCyJob
-
getJobExecutionService
public CyJobExecutionService getJobExecutionService()
Description copied from interface:CyJobReturn theCyJobExecutionServicethat created this job. Most of the methods for interacting with the backend service are through theCyJobExecutionService- Specified by:
getJobExecutionServicein interfaceCyJob
-
getJobName
public String getJobName()
Description copied from interface:CyJobReturn the name for this job- Specified by:
getJobNamein interfaceCyJob- Returns:
- the job name
-
getPath
public String getPath()
Description copied from interface:CyJobReturn the base path for communicating with the remote service for this job
-
getJobMonitor
public CyJobMonitor getJobMonitor()
Description copied from interface:CyJobReturn the service that handles status changes for this job.- Specified by:
getJobMonitorin interfaceCyJob- Returns:
- the status change monitor for this job
-
setJobMonitor
public void setJobMonitor(CyJobMonitor monitor)
Description copied from interface:CyJobSet the service that handles status changes for this job.- Specified by:
setJobMonitorin interfaceCyJob- Parameters:
monitor- the status change handler for this job
-
getPollInterval
public int getPollInterval()
Description copied from interface:CyJobReturn the time in seconds between calls to checkJobStatus.- Specified by:
getPollIntervalin interfaceCyJob- Returns:
- the poll interval for this job
-
setPollInterval
public void setPollInterval(int pollInterval)
Description copied from interface:CyJobSet the time in seconds between calls to checkJobStatus.- Specified by:
setPollIntervalin interfaceCyJob- Parameters:
pollInterval- the poll interval for this job
-
-