g-Eclipse
Release 1.0.0

eu.geclipse.core.model
Interface IGridJobService

All Superinterfaces:
IGridElement, IGridResource, IGridService
All Known Implementing Classes:
ParametricJobService

public interface IGridJobService
extends IGridService

A job service is an IGridService that provides job submission and status querying functionality. It is the interface to the grid computing resources.


Method Summary
 boolean canSubmit(IGridJobDescription desc)
          Tests if a given job description can be handled (i.e., submitted) by this job service.
 void deleteJob(IGridJobID id, IVirtualOrganization vo, IProgressMonitor monitor)
          Deletes the given job from the server and releases resources on it.
 java.util.Map<java.lang.String,java.net.URI> getInputFiles(IGridJobID jobId, IGridJobDescription jobDescription, IVirtualOrganization vo)
          Get pairs (filename, URI) of input files for job.
 IGridJobStatus getJobStatus(IGridJobID id, IVirtualOrganization vo, boolean fullStatus, IProgressMonitor monitor)
          Queries the service about the job's status.
 java.util.Map<java.lang.String,java.net.URI> getOutputFiles(IGridJobID jobId, IGridJobDescription jobDescription, IVirtualOrganization vo)
          Get pairs (filename, URI) of output files for job.
 IGridJobID submitJob(IGridJobDescription description, IProgressMonitor monitor)
          Submits the given job description to the grid.
 IGridJobID submitJob(IGridJobDescription description, IVirtualOrganization vo, IProgressMonitor monitor)
          Submits the given job description to the grid.
 
Methods inherited from interface eu.geclipse.core.model.IGridResource
getHostName, getURI
 
Methods inherited from interface eu.geclipse.core.model.IGridElement
dispose, getFileStore, getName, getParent, getPath, getProject, getResource, isHidden, isLocal, isVirtual
 

Method Detail

canSubmit

boolean canSubmit(IGridJobDescription desc)
Tests if a given job description can be handled (i.e., submitted) by this job service.

Parameters:
desc - the job description to be tested.
Returns:
true if the given job description can be submitted to the grid using this service, false otherwise.

submitJob

IGridJobID submitJob(IGridJobDescription description,
                     IProgressMonitor monitor)
                     throws ProblemException
Submits the given job description to the grid.

Parameters:
description - the job description to be submitted.
monitor - Use to monitor progress. May be null.
Returns:
The id of the submitted job.
Throws:
ProblemException - if submitting the job failed.

submitJob

IGridJobID submitJob(IGridJobDescription description,
                     IVirtualOrganization vo,
                     IProgressMonitor monitor)
                     throws ProblemException
Submits the given job description to the grid.

Parameters:
description - the job description to be submitted.
vo - Virtual Organization, to which job is submitted
monitor - Use to monitor progress. May be null.
Returns:
The id of the submitted job.
Throws:
ProblemException - if submitting the job failed.

getJobStatus

IGridJobStatus getJobStatus(IGridJobID id,
                            IVirtualOrganization vo,
                            boolean fullStatus,
                            IProgressMonitor monitor)
                            throws ProblemException
Queries the service about the job's status.

Parameters:
id - The id of the job whose status has to be queried.
vo - Virtual Organization, to which job with passed id belongs to
fullStatus - true if all available status information should be downloaded, false if only basic information are needed (status type, status name and reason)
monitor - Use to monitor progress. May be null.
Returns:
IGridJobStatus the current status of the job.
Throws:
ProblemException - if the status query failed.

deleteJob

void deleteJob(IGridJobID id,
               IVirtualOrganization vo,
               IProgressMonitor monitor)
               throws ProblemException
Deletes the given job from the server and releases resources on it.

Parameters:
id - The id of job, which will be deleted
vo - Virtual Organization, to which job with passed id belongs to
monitor - Use to monitor progress. May be null.
Throws:
ProblemException - if deleting the job failed.

getInputFiles

java.util.Map<java.lang.String,java.net.URI> getInputFiles(IGridJobID jobId,
                                                           IGridJobDescription jobDescription,
                                                           IVirtualOrganization vo)
                                                           throws ProblemException
Get pairs (filename, URI) of input files for job.

Parameters:
jobId - id of job, for which input files will be returned
jobDescription - job description, which was used to submit job
vo - Virtual Organization, for which job belongs to
Returns:
URI Map containing input files used by job. Map contains pairs: filename (used to create link), and URI of input file.
It's possible to return null if input files cannot be returned
Throws:
ProblemException - thrown, when input files cannot be retrieved, because of any error

getOutputFiles

java.util.Map<java.lang.String,java.net.URI> getOutputFiles(IGridJobID jobId,
                                                            IGridJobDescription jobDescription,
                                                            IVirtualOrganization vo)
                                                            throws ProblemException
Get pairs (filename, URI) of output files for job.

Parameters:
jobId - id of job, for which input files will be returned
jobDescription - job description, which was used to submit job.
May be null - in this case only output files, which can be get without reading job description will be returned.
E.g. for gLite jobs only files stayed in the sandbox will be returned. Files transfered to the Storage Element can be read only from Job Description.
vo - Virtual Organization, for which job belongs to
Returns:
URI Map containing output files created by job. Map contains pairs: filename (used to create link), and URI of output file.
It's possible to return null if input files cannot be returned now (because e.g. job status doesn't allow it now).
Throws:
ProblemException

g-Eclipse
Release 1.0.0