|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edg.workload.userinterface.jclient.Job
Allow controlling the job and perform several operations.
The Job class provides methods that allow controlling the job during its lifetime. The allowed operations are:
Field Summary | |
static int |
JOB_AD
JobAd Constructor Utilised |
static int |
JOB_ID
JobId Constructor utilised |
static int |
JOB_NONE
Empty Constructor Job |
static int |
JOB_SUBMITTED
JobAd constructor and then submitted, both JobAd and JobId are avaliable |
Constructor Summary | |
Job()
Instantiates an empty Job object |
|
Job(edg.workload.common.jrequestad.JobAd ad)
Instantiates an Job object with a JobAd |
|
Job(JobId id)
Instantiates an Job object with a JobId |
Method Summary | |
void |
attach(Listener ls)
Attach the Job with the specified implemented listener The port where to listen to is automatically determined: if possible it at appends to the first logged port This method is equal to attach (Listener , 0 ) |
void |
attach(Listener ls,
int port)
Attach the Job with the spècified implemented listener |
Result |
cancel()
Cancel the job from the resource broker ( syncronous version ) |
Job |
copy()
Create a copy of the Job, including its private JobId and JobAd members information |
boolean |
equals(Job job)
Check if two Job objects are the same, i.e have the same JobId |
edg.workload.common.jrequestad.JobAd |
getJobAd()
Get the JobAd instance |
JobId |
getJobId()
Get the JobId instance |
Result |
getLogInfo()
Retrieve the bookkeeping information of the job ( syncronous version ) |
Result |
getOutput(java.lang.String dirPath)
Retrieve output files of a submitted job ( syncronous version ) |
edg.workload.common.jrequestad.JobState |
getState(int step)
Retrieve the specified checkpointable step from the LB server |
Result |
getStatus()
The same as getStatus( true) |
Result |
getStatus(boolean ad)
Retrieve the status of the job |
java.util.Vector |
getSubJobsId()
Retrieves the Job Id of all sub jobs of the job. |
Result |
listMatchingCE(Url nsAddr)
Look for matching Computing Element available resources ( syncronous version ) |
edg.workload.common.jrequestad.JobAd |
retrieveJobAd()
Set the JobAd member attribute of the Job instance to the job description got from the LB |
void |
setCredPath(java.io.File cp)
Set a different Proxy certificate from the default one and check it |
void |
setJobAd(edg.workload.common.jrequestad.JobAd ad)
set the JobAd instance |
void |
setJobId(JobId id)
set the JobId instance |
void |
setLoggerLevel(int level)
Set the NS verbosity level |
Result |
submit(Url ns,
Url lb,
java.lang.String ceId)
Submit the job to the Network Server This method is equal to submit (ns, lb, ceId, null, null) |
Result |
submit(Url ns,
Url lb,
java.lang.String ceId,
Listener ls,
edg.workload.common.jrequestad.JobState state)
Submit the job to theNetworkServer. |
void |
unsetCredPath()
Set the Proxy certificate as default |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int JOB_NONE
public static final int JOB_ID
public static final int JOB_AD
public static final int JOB_SUBMITTED
Constructor Detail |
public Job()
public Job(JobId id) throws java.lang.IllegalArgumentException
id
- the JobId instance from which the Job has to be created
java.lang.IllegalArgumentException
- If the JobId is not validpublic Job(edg.workload.common.jrequestad.JobAd ad) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- If the JobAd is not validMethod Detail |
public Job copy()
public boolean equals(Job job)
job
- the Job to check with the current instance
public JobId getJobId() throws java.lang.NoSuchFieldException
java.lang.NoSuchFieldException
- If the JobId instance is emptypublic edg.workload.common.jrequestad.JobAd getJobAd() throws java.lang.NoSuchFieldException
java.lang.NoSuchFieldException
- If the JobAd instance is emptypublic void setLoggerLevel(int level)
level
- minimum (no verbosity) level = 0. Maximum (full verbosity) = 6public void setCredPath(java.io.File cp) throws org.globus.gsi.GlobusCredentialException, java.io.FileNotFoundException
cp
- The full path of the proxy certificate file to be set
java.io.FileNotFoundException
- Unable to find-load-read the specified file
org.globus.gsi.GlobusCredentialException
- Unable to Load the specified proxy certificatepublic void unsetCredPath() throws org.globus.gsi.GlobusCredentialException, java.io.FileNotFoundException
java.io.FileNotFoundException
- Unable to find-load-read the deafult proxy file
org.globus.gsi.GlobusCredentialException
- Unable to Load the default proxy certificatepublic void setJobAd(edg.workload.common.jrequestad.JobAd ad) throws java.lang.IllegalArgumentException
ad
- the JobAd Instance to set from
java.lang.IllegalArgumentException
- The JobAd instance has been already setpublic void setJobId(JobId id) throws java.lang.IllegalArgumentException
id
- the JobId Instance to set from
java.lang.IllegalArgumentException
- If the JobId has been alreaty setpublic edg.workload.common.jrequestad.JobAd retrieveJobAd() throws edg.workload.common.jrequestad.JobAdException, java.lang.UnsupportedOperationException, java.io.FileNotFoundException, org.globus.gsi.GlobusCredentialException
edg.workload.common.jrequestad.JobAdException
- when the Jdl has errors
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
java.io.FileNotFoundException
- unable to find any certificate file
org.globus.gsi.GlobusCredentialException
- proxy certificate information failedpublic Result getStatus() throws java.lang.UnsupportedOperationException, java.io.FileNotFoundException, org.globus.gsi.GlobusCredentialException
java.io.FileNotFoundException
- Unable to find certificates files
gsi.GlobusCredentialException
- error while checking certificates validity
java.lang.UnsupportedOperationException
org.globus.gsi.GlobusCredentialException
getStatus(boolean)
public Result getStatus(boolean ad) throws java.lang.UnsupportedOperationException, org.globus.gsi.GlobusCredentialException, java.io.FileNotFoundException
ad
- determine whether to download (true) or not (false) all JobAd information from server
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
java.io.FileNotFoundException
- Unable to find certificates files
gsi.GlobusCredentialException
- error while checking certificates validity
org.globus.gsi.GlobusCredentialException
public java.util.Vector getSubJobsId() throws java.lang.UnsupportedOperationException, org.globus.gsi.GlobusCredentialException, java.io.FileNotFoundException
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
java.io.FileNotFoundException
- Unable to find certificates files
gsi.GlobusCredentialException
- error while checking certificates validity
org.globus.gsi.GlobusCredentialException
public Result getLogInfo() throws java.lang.UnsupportedOperationException, java.io.FileNotFoundException, org.globus.gsi.GlobusCredentialException
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
java.io.FileNotFoundException
- Unable to find certificates files
gsi.GlobusCredentialException
- error while checking certificates validity
java.lang.UnsatisfiedLinkError
- Unable to fine the native shared library that implements LB-RB functions
org.globus.gsi.GlobusCredentialException
public void attach(Listener ls) throws java.lang.Exception
The port where to listen to is automatically determined: if possible it at appends to the first logged port This method is equal to attach (Listener , 0 )
ls
- the implementation of the listener
java.lang.Exception
attach(Listener, int)
public void attach(Listener ls, int port) throws edg.workload.common.jrequestad.JobAdException, java.lang.UnsupportedOperationException, java.io.FileNotFoundException, org.globus.gsi.GlobusCredentialException, java.net.UnknownHostException
ls
- an implementation of the Listener interfaceport
- the interactive port where the console listener listens to
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
java.net.UnknownHostException
- If unable to determine the current system operator
java.lang.NoSuchFieldException
- If any required attribute is missing from the JDL
java.io.FileNotFoundException
- unable to find any certificate file
org.globus.gsi.GlobusCredentialException
- proxy certificate information failed
edg.workload.common.jrequestad.JobAdException
public edg.workload.common.jrequestad.JobState getState(int step) throws java.lang.UnsupportedOperationException, java.io.FileNotFoundException, org.globus.gsi.GlobusCredentialException, edg.workload.common.jrequestad.JobAdException, java.text.ParseException
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
java.io.FileNotFoundException
- unable to find any certificate file
org.globus.gsi.GlobusCredentialException
- proxy certificate information failed
java.text.ParseException
- Unable to parse the JobState string retrieved from LB
edg.workload.common.jrequestad.JobAdException
- the Jdl has semantic errorspublic Result submit(Url ns, Url lb, java.lang.String ceId) throws javax.naming.directory.InvalidAttributeValueException, java.net.UnknownHostException, edg.workload.common.jrequestad.JobAdException, java.lang.NoSuchFieldException, java.lang.UnsupportedOperationException, java.io.FileNotFoundException, org.globus.gsi.GlobusCredentialException
ns
- The Network Server addresslb
- The Logging and bookkeeping addressceId
- The Computing Element Identificator where to perform the job
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
InvalidAttributeValueException
- Unable to set values inside the JobAd instance
java.net.UnknownHostException
- If unable to determine the current system operator
edg.workload.common.jrequestad.JobAdException
- when the Jdl has semantic errors
java.lang.NoSuchFieldException
- If any required attribute is missing from the JobAd
java.io.FileNotFoundException
- unable to find any certificate file
org.globus.gsi.GlobusCredentialException
- proxy certificate information failedPerfroms extra Interactive/checkpointable job activities
public Result submit(Url ns, Url lb, java.lang.String ceId, Listener ls, edg.workload.common.jrequestad.JobState state) throws javax.naming.directory.InvalidAttributeValueException, java.net.UnknownHostException, edg.workload.common.jrequestad.JobAdException, java.lang.NoSuchFieldException, java.lang.UnsupportedOperationException, java.io.FileNotFoundException, org.globus.gsi.GlobusCredentialException
ns
- The Network Server addresslb
- The Logging and bookkeeping addressceId
- The Computing Element Identificator where to force the job submissionls
- an instance implementation of Listener interface.When the submission is finished, the Job will launch the Listener.run methodstate
- A specific JobState step of the job (which must be of checkpointing jobtype). The job will take on the submission starting from the specified step
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
InvalidAttributeValueException
- Unable to set values inside the JobAd instance
java.net.UnknownHostException
- If unable to determine the current system operator
edg.workload.common.jrequestad.JobAdException
- when the Jdl has semantic errors
java.lang.NoSuchFieldException
- If any required attribute is missing from the JobAd
java.io.FileNotFoundException
- unable to find any certificate file
org.globus.gsi.GlobusCredentialException
- proxy certificate information failedListener.run( Shadow)
public Result listMatchingCE(Url nsAddr) throws edg.workload.common.jrequestad.JobAdException, java.lang.UnsupportedOperationException, java.io.FileNotFoundException, org.globus.gsi.GlobusCredentialException
nsAddr
- = The Resource Broker full address given in the form java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
edg.workload.common.jrequestad.JobAdException
- when the Jdl has semantic errors
java.io.FileNotFoundException
- unable to find any certificate file
org.globus.gsi.GlobusCredentialException
- proxy certificate information failedpublic Result cancel() throws edg.workload.common.jrequestad.JobAdException, java.lang.UnsupportedOperationException, java.io.FileNotFoundException, org.globus.gsi.GlobusCredentialException
edg.workload.common.jrequestad.JobAdException
- when the Jdl has semantic errors
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
java.io.FileNotFoundException
- unable to find any certificate file
org.globus.gsi.GlobusCredentialException
- proxy certificate information failedpublic Result getOutput(java.lang.String dirPath) throws edg.workload.common.jrequestad.JobAdException, java.lang.UnsupportedOperationException, java.io.FileNotFoundException, org.globus.gsi.GlobusCredentialException
dirPath
- the path where to retrieve the OutputSandbox files
edg.workload.common.jrequestad.JobAdException
- when the Jdl has semantic errors
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
java.io.FileNotFoundException
- unable to find any certificate file
org.globus.gsi.GlobusCredentialException
- proxy certificate information failed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |