jlite
Interface GridSession

All Known Implementing Classes:
GridSessionImpl

public interface GridSession

A central interface of jLite API which represents a grid session with certain user/proxy credentials.
It provides methods for VOMS proxy creation, job submission, monitoring, output retrieval etc.
Grid session is configured by a GridSessionConfig object, instantiated via a GridSessionFactory and implemented by a GridSessionImpl.

Author:
Oleg Sukhoroslov

Method Summary
 void cancelJob(java.lang.String jobId)
          Requests cancellation of a job.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.
 void cancelJob(java.lang.String wmProxyURL, java.lang.String jobId)
          Requests cancellation of a job.
 org.globus.gsi.GlobusCredential createProxy(java.lang.String[] vomsArgs, int lifetime, int proxyType, boolean limited)
          Creates a VOMS user proxy certificate (advanced version).
 org.globus.gsi.GlobusCredential createProxy(java.lang.String vo, int lifetime)
          Creates a VOMS user proxy certificate.
If you want to request specific ACs or create a limited proxy, check the advanced version.
 void delegateProxy(java.lang.String delegationId)
          Delegates a proxy certificate linked to the session to WMProxy service.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.
 void delegateProxy(java.lang.String wmProxyURL, java.lang.String delegationId)
          Delegates a proxy certificate linked to the session to the specified WMProxy service.
 void destroyProxy()
          Destroys a proxy certificate linked to the session.
 void getJobOutput(java.lang.String jobId, java.lang.String outputDir, boolean purge)
          Retrieves the output of a job via GridFTP.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.
Throws GridAPIException if the job is not in DONE state.
 void getJobOutput(java.lang.String wmProxyURL, java.lang.String jobId, java.lang.String outputDir, boolean purge)
          Retrieves the output of a job via GridFTP.
Throws GridAPIException if the job is not in DONE state.
 java.lang.String getJobState(java.lang.String jobId)
          Retrieves current job state of a job.
Possible job states are: SUBMITTED, WAITING, READY, SCHEDULED, RUNNING, DONE, ABORTED, CANCELED, CLEARED (refer to gLite documentation).
 org.glite.wsdl.types.lb.JobStatus getJobStatus(java.lang.String jobId)
          Retrieves the status of a job.
 org.globus.gsi.GlobusCredential getProxy()
          Returns a proxy certificate linked to the session.
 java.util.List<java.lang.String> listJobOutput(java.lang.String jobId)
          Returns URIs of the job output files on the server.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.
Throws GridAPIException if the job is not in DONE state.
 java.util.List<java.lang.String> listJobOutput(java.lang.String wmProxyURL, java.lang.String jobId)
          Returns URIs of the job output files on the server.
Throws GridAPIException if the job is not in DONE state.
 java.util.List<MatchedCE> listMatchedCE(java.lang.String jdl)
          Matches available grid resources (computing elements, CE) to requirements specified in the job description.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.
Returns a list of matched CEs sorted in decreasing rank order.
 java.util.List<MatchedCE> listMatchedCE(java.lang.String wmProxyURL, java.lang.String jdl)
          Matches available grid resources (computing elements) to requirements specified in the job description.
Returns a list of matched CEs sorted in decreasing rank order.
 java.lang.String submitJob(java.lang.String jdl)
          Submits a job via WMProxy service.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.
 java.lang.String submitJob(java.lang.String jdl, java.lang.String inputDir)
          Submits a job via WMProxy service.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.
 java.lang.String submitJob(java.lang.String wmProxyURL, java.lang.String jdl, java.lang.String inputDir)
          Submits a job via WMProxy service.
 

Method Detail

createProxy

org.globus.gsi.GlobusCredential createProxy(java.lang.String vo,
                                            int lifetime)
                                            throws GridAPIException
Creates a VOMS user proxy certificate.
If you want to request specific ACs or create a limited proxy, check the advanced version.

Parameters:
vo - VO name
lifetime - proxy validity time in seconds
Returns:
created proxy certificate
Throws:
GridAPIException

createProxy

org.globus.gsi.GlobusCredential createProxy(java.lang.String[] vomsArgs,
                                            int lifetime,
                                            int proxyType,
                                            boolean limited)
                                            throws GridAPIException
Creates a VOMS user proxy certificate (advanced version).

Parameters:
vomsArgs - a list of VOMS commands in the form [:] identical to "-voms" arguments of glite-voms-proxy-init command
lifetime - proxy validity time in seconds
proxyType - version of proxy certificate {2,3,4} (use 2 for default gLite behavior)
limited - creates a limited proxy (use false for default gLite behavior)
Returns:
created proxy certificate
Throws:
GridAPIException

getProxy

org.globus.gsi.GlobusCredential getProxy()
Returns a proxy certificate linked to the session.

Returns:
proxy certiciate (null if proxy is not found)

destroyProxy

void destroyProxy()
                  throws GridAPIException
Destroys a proxy certificate linked to the session.

Throws:
GridAPIException

delegateProxy

void delegateProxy(java.lang.String delegationId)
                   throws GridAPIException
Delegates a proxy certificate linked to the session to WMProxy service.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.

Parameters:
delegationId - delegation identifier
Throws:
GridAPIException

delegateProxy

void delegateProxy(java.lang.String wmProxyURL,
                   java.lang.String delegationId)
                   throws GridAPIException
Delegates a proxy certificate linked to the session to the specified WMProxy service.

Parameters:
wmProxyURL - WMProxy service endpoint
delegationId - delegation identifier
Throws:
GridAPIException

listMatchedCE

java.util.List<MatchedCE> listMatchedCE(java.lang.String jdl)
                                        throws GridAPIException
Matches available grid resources (computing elements, CE) to requirements specified in the job description.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.
Returns a list of matched CEs sorted in decreasing rank order. The MatchedCE structure contains a CE identifier and its rank.

Parameters:
jdl - job description in JDL format
Returns:
list of matched CEs
Throws:
GridAPIException

listMatchedCE

java.util.List<MatchedCE> listMatchedCE(java.lang.String wmProxyURL,
                                        java.lang.String jdl)
                                        throws GridAPIException
Matches available grid resources (computing elements) to requirements specified in the job description.
Returns a list of matched CEs sorted in decreasing rank order. The MatchedCE structure contains a CE identifier and its rank.

Parameters:
wmProxyURL - WMProxy service endpoint
jdl - job description in JDL format
Returns:
list of matched CEs
Throws:
GridAPIException

submitJob

java.lang.String submitJob(java.lang.String jdl)
                           throws GridAPIException
Submits a job via WMProxy service.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.

Parameters:
jdl - job description in JDL format
Returns:
job identifier
Throws:
GridAPIException

submitJob

java.lang.String submitJob(java.lang.String jdl,
                           java.lang.String inputDir)
                           throws GridAPIException
Submits a job via WMProxy service.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.

Parameters:
jdl - job description in JDL format
inputDir - all input files with relative paths will be searched in the specified directory
Returns:
job identifier
Throws:
GridAPIException

submitJob

java.lang.String submitJob(java.lang.String wmProxyURL,
                           java.lang.String jdl,
                           java.lang.String inputDir)
                           throws GridAPIException
Submits a job via WMProxy service.

Parameters:
wmProxyURL - WMProxy service endpoint
jdl - job description in JDL format
inputDir - search input files in the specified directory
Returns:
job identifier
Throws:
GridAPIException

getJobStatus

org.glite.wsdl.types.lb.JobStatus getJobStatus(java.lang.String jobId)
                                               throws GridAPIException
Retrieves the status of a job.

Parameters:
jobId - job identifier
Returns:
job status structure (as returned from LB WS endpoint)
Throws:
GridAPIException

getJobState

java.lang.String getJobState(java.lang.String jobId)
                             throws GridAPIException
Retrieves current job state of a job.
Possible job states are: SUBMITTED, WAITING, READY, SCHEDULED, RUNNING, DONE, ABORTED, CANCELED, CLEARED (refer to gLite documentation).

Parameters:
jobId - job identifier
Returns:
job state
Throws:
GridAPIException

getJobOutput

void getJobOutput(java.lang.String jobId,
                  java.lang.String outputDir,
                  boolean purge)
                  throws GridAPIException
Retrieves the output of a job via GridFTP.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.
Throws GridAPIException if the job is not in DONE state.

Parameters:
jobId - job identifier
outputDir - directory to store retrieved files
purge - purge job output from the server after retrieval (use true for default gLite behavior)
Throws:
GridAPIException

getJobOutput

void getJobOutput(java.lang.String wmProxyURL,
                  java.lang.String jobId,
                  java.lang.String outputDir,
                  boolean purge)
                  throws GridAPIException
Retrieves the output of a job via GridFTP.
Throws GridAPIException if the job is not in DONE state.

Parameters:
wmProxyURL - WMProxy service endpoint
jobId - job identifier
outputDir - directory to store retrieved files
purge - purge job output from the server after retrieval (use true for default gLite behavior)
Throws:
GridAPIException

listJobOutput

java.util.List<java.lang.String> listJobOutput(java.lang.String jobId)
                                               throws GridAPIException
Returns URIs of the job output files on the server.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.
Throws GridAPIException if the job is not in DONE state.

Parameters:
jobId - job identifier
Returns:
list of file URIs
Throws:
GridAPIException

listJobOutput

java.util.List<java.lang.String> listJobOutput(java.lang.String wmProxyURL,
                                               java.lang.String jobId)
                                               throws GridAPIException
Returns URIs of the job output files on the server.
Throws GridAPIException if the job is not in DONE state.

Parameters:
wmProxyURL - WMProxy service endpoint
jobId - job identifier
Returns:
list of file URIs
Throws:
GridAPIException

cancelJob

void cancelJob(java.lang.String jobId)
               throws GridAPIException
Requests cancellation of a job.
The WMProxy service endpoint is determined by the default VO of the proxy certificate.

Parameters:
jobId - job identifier
Throws:
GridAPIException

cancelJob

void cancelJob(java.lang.String wmProxyURL,
               java.lang.String jobId)
               throws GridAPIException
Requests cancellation of a job.

Parameters:
wmProxyURL - WMProxy service endpoint
jobId - job identifier
Throws:
GridAPIException