public interface CyJobExecutionService
CyJobExecutionService is a stateless service that can be used to provide
remote job services, including the execution, cancellation, status checking, and retrieval
of results. Implementations of this service should also choose the appropriate
CyJobDataService to handle marshalling and unmarshalling of data. It is usually
the case that the impelementors of the CyJobExecutionService will also provide
implementations of CyJob| Modifier and Type | Method and Description |
|---|---|
CyJobStatus |
cancelJob(CyJob job)
Cancel a running job.
|
CyJobStatus |
checkJobStatus(CyJob job)
Check on the status of a running job.
|
CyJob |
createCyJob(String name)
Create an empty (unsubmitted)
CyJob |
CyJobStatus |
executeJob(CyJob job,
String basePath,
Map<String,Object> configuration,
CyJobData inputData)
Submit a
CyJob for remote execution. |
CyJobStatus |
fetchResults(CyJob job,
CyJobData data)
After a
CyJob status returns CyJobStatus.Status.FINISHED, this method is
used to fetch the results from the job execution. |
CyJobDataService |
getDataService()
Return the
CyJobDataService that is used by service to marshall and unmarshall
data for the remote service. |
String |
getServiceName()
The name of the service.
|
CyJob |
restoreJobFromSession(CySession session,
File sessionFile)
This is method is called by the
CyJobManager to restore
the job and reestablish the job with the
remote service. |
void |
saveJobInSession(CyJob job,
File sessionFile)
This is method is called by the
CyJobManager to save sufficient information
as part of the session to be able to restore and reestablish the job with the
remote service. |
String getServiceName()
CyJobDataService getDataService()
CyJobDataService that is used by service to marshall and unmarshall
data for the remote service.CyJob createCyJob(String name)
CyJobname - the name of the jobCyJobCyJobStatus executeJob(CyJob job, String basePath, Map<String,Object> configuration, CyJobData inputData)
CyJob for remote execution. If provided, basePath will
override the path defined by the CyJob. The configuration Map
provides any arguments necessary to successfully submit the job with the appropriate
inputData.job - the job to be submittedbasePath - if provided, this will override the path defined by the CyJob.configuration - a Map with all of the configuration parameters necessary to
submit the jobinputData - the data to be sent to the remote service.CyJobStatus that results from the submission. If everything is successful,
this should return CyJobStatus.Status.SUBMITTED. If an error occured, the return status
should be CyJobStatus.Status.ERROR and CyJobStatus.getMessage() method will return the
error message.CyJobStatus checkJobStatus(CyJob job)
job - the submitted job to be checkedCyJobStatus of the running job.CyJobStatus cancelJob(CyJob job)
job - the submitted job to be cancelledCyJobStatus of the job after being cancelled.
If everything is successful,
this should return CyJobStatus.Status#CANCELLED. If an error occured, the return status
should be CyJobStatus.Status.ERROR and CyJobStatus.getMessage()
method will return the
error message.CyJobStatus fetchResults(CyJob job, CyJobData data)
CyJob status returns CyJobStatus.Status.FINISHED, this method is
used to fetch the results from the job execution.job - the completed jobdata - an empty CyJobData object that will be filled with the
results of the job execution.CyJobStatus.Status.ERROR and CyJobStatus.getMessage() will return the
error message.void saveJobInSession(CyJob job, File sessionFile)
CyJobManager to save sufficient information
as part of the session to be able to restore and reestablish the job with the
remote service. It should not be called directly by client apps.job - the job to be saved in the sesion filesessionFile - CyJob restoreJobFromSession(CySession session, File sessionFile)
CyJobManager to restore
the job and reestablish the job with the
remote service. It should not be called directly by client apps.session - the session that is being restoredsessionFile - the File that was written by the
saveJobInSession(CyJob, File) method described above.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.