org.ggf.drmaa
Interface JobTemplate

All Known Implementing Classes:
GridWayJobTemplate, SimpleJobTemplate

public interface JobTemplate

DRMAA application uses the JobTemplate interface, in order to define the attributes associated with a job. JobTemplates are created via the active Session implementation. A DRMAA application gets a JobTemplate from the active Session, specifies in the JobTemplate any required job parameters, and the passes the JobTemplate back to the Session when requesting that a job be executed. When finished, the DRMAA application should call the Session.deleteJobTemplate(org.ggf.drmaa.JobTemplate) method to allow the underlying implementation to free any resources bound to the JobTemplate object.


Field Summary
static int ACTIVE_STATE
          Pre-defined string to refer to the ACTIVE state on submission.
static int HOLD_STATE
          Pre-defined string to refer to the HOLD state on submission.
static java.lang.String HOME_DIRECTORY
          Pre-defined string to refer the user's home directory.
static java.lang.String PARAMETRIC_INDEX
          Pre-defined string to be used in parametric jobs (bulk jobs).
static java.lang.String WORKING_DIRECTORY
          Pre-defined string constant to represent the current working directory when building paths for the input, output, and error path attribute values.
 
Method Summary
 java.util.List getArgs()
          This method get the attribute SimpleJobTemplate.args.
 java.util.Set getAttributeNames()
          This method return the list of supported property names.
 boolean getBlockEmail()
          This method get the attribute SimpleJobTemplate.blockEmail.
 PartialTimestamp getDeadlineTime()
          This method get the attribute SimpleJobTemplate.deadlineTime.
 java.util.Set getEmail()
          This method get the attribute SimpleJobTemplate.email.
 java.lang.String getErrorPath()
          This method get the attribute SimpleJobTemplate.errorPath.
 long getHardRunDurationLimit()
          This method get the attribute SimpleJobTemplate.hardRunDurationLimit.
 long getHardWallclockTimeLimit()
          This method get the attribute SimpleJobTemplate.hardWallclockTimeLimit.
 java.lang.String getInputPath()
          This method get the attribute SimpleJobTemplate.inputPath.
 java.lang.String getJobCategory()
          This method get the attribute SimpleJobTemplate.jobCategory.
 java.util.Map getJobEnvironment()
          This method get the attribute SimpleJobTemplate.jobEnvironment.
 java.lang.String getJobName()
          This method get the attribute SimpleJobTemplate.jobName.
 int getJobSubmissionState()
          This method get the attribute SimpleJobTemplate.jobSubmissionState.
 boolean getJoinFiles()
          This method get the attribute SimpleJobTemplate.joinFiles.
 java.lang.String getNativeSpecification()
          This method get the attribute SimpleJobTemplate.nativeSpecification.
 java.lang.String getOutputPath()
          This method get the attribute SimpleJobTemplate.outputPath.
 java.lang.String getRemoteCommand()
          This method get the attribute SimpleJobTemplate.remoteCommand.
 long getSoftRunDurationLimit()
          This method get the attribute SimpleJobTemplate.softRunDurationLimit.
 long getSoftWallclockTimeLimit()
          This method get the attribute SimpleJobTemplate.softWallclockTimeLimit.
 java.util.Date getStartTime()
          This method get the attribute SimpleJobTemplate.startTime.
 FileTransferMode getTransferFiles()
          This method get the attribute SimpleJobTemplate.transferFiles.
 java.lang.String getWorkingDirectory()
          This method get the attribute SimpleJobTemplate.workingDirectory.
 void setArgs(java.util.List args)
          This method set the attribute SimpleJobTemplate.args.
 void setBlockEmail(boolean blockEmail)
          This method set the attribute SimpleJobTemplate.blockEmail.
 void setDeadlineTime(PartialTimestamp deadline)
          This method set the attribute SimpleJobTemplate.deadlineTime.
 void setEmail(java.util.Set email)
          This method set the attribute SimpleJobTemplate.email.
 void setErrorPath(java.lang.String errorPath)
          This method set the attribute SimpleJobTemplate.errorPath.
 void setHardRunDurationLimit(long limit)
          This method set the attribute SimpleJobTemplate.hardRunDurationLimit.
 void setHardWallclockTimeLimit(long limit)
          This method set the attribute SimpleJobTemplate.hardWallclockTimeLimit.
 void setInputPath(java.lang.String inputPath)
          This method set the attribute SimpleJobTemplate.inputPath.
 void setJobCategory(java.lang.String category)
          This method set the attribute SimpleJobTemplate.jobCategory.
 void setJobEnvironment(java.util.Map env)
          This method set the attribute SimpleJobTemplate.jobEnvironment.
 void setJobName(java.lang.String name)
          This method set the attribute SimpleJobTemplate.jobName.
 void setJobSubmissionState(int state)
          This method set the attribute SimpleJobTemplate.jobSubmissionState.
 void setJoinFiles(boolean joinFiles)
          This method set the attribute SimpleJobTemplate.joinFiles.
 void setNativeSpecification(java.lang.String spec)
          This method set the attribute SimpleJobTemplate.nativeSpecification.
 void setOutputPath(java.lang.String outputPath)
          This method set the attribute SimpleJobTemplate.outputPath.
 void setRemoteCommand(java.lang.String command)
          This method set the attribute SimpleJobTemplate.remoteCommand.
 void setSoftRunDurationLimit(long limit)
          This method set the attribute SimpleJobTemplate.softRunDurationLimit.
 void setSoftWallclockTimeLimit(long limit)
          This method set the attribute SimpleJobTemplate.softWallclockTimeLimit.
 void setStartTime(java.util.Date startTime)
          This method set the attribute SimpleJobTemplate.startTime.
 void setTransferFiles(FileTransferMode mode)
          This method set the attribute SimpleJobTemplate.transferFiles.
 void setWorkingDirectory(java.lang.String wd)
          This method set the attribute SimpleJobTemplate.workingDirectory.
 

Field Detail

HOLD_STATE

static final int HOLD_STATE
Pre-defined string to refer to the HOLD state on submission. Use this preprocessor directive to assign the value of the drmaa_js_state attribute through the setJobSubmissionState(int) method call.

See Also:
Constant Field Values

ACTIVE_STATE

static final int ACTIVE_STATE
Pre-defined string to refer to the ACTIVE state on submission. Use this preprocessor directive to assign the value of the drmaa_js_state attribute through the setJobSubmissionState(int) method call.

See Also:
Constant Field Values

HOME_DIRECTORY

static final java.lang.String HOME_DIRECTORY
Pre-defined string to refer the user's home directory.

See Also:
Constant Field Values

WORKING_DIRECTORY

static final java.lang.String WORKING_DIRECTORY
Pre-defined string constant to represent the current working directory when building paths for the input, output, and error path attribute values. Plase note that ALL FILES MUST BE NAMED RELATIVE TO THE WORKING DIRECTORY.

See Also:
Constant Field Values

PARAMETRIC_INDEX

static final java.lang.String PARAMETRIC_INDEX
Pre-defined string to be used in parametric jobs (bulk jobs). PARAMETRIC_INDEX will be available during job execution and can be used as an ARGUMENT for the REMOTE COMMAND, or to generate output filenames. Please note that this attribute name should be used ONLY in conjuntion with a Session.runBulkJobs(org.ggf.drmaa.JobTemplate, int, int, int) method call. Use DRMAA_GW_JOB_ID for "stand-alone" jobs.

See Also:
Constant Field Values
Method Detail

setRemoteCommand

void setRemoteCommand(java.lang.String command)
                      throws DrmaaException
This method set the attribute SimpleJobTemplate.remoteCommand.

Parameters:
command - A command to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setArgs

void setArgs(java.util.List args)
             throws DrmaaException
This method set the attribute SimpleJobTemplate.args.

Parameters:
args - The attributes to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setJobSubmissionState

void setJobSubmissionState(int state)
                           throws DrmaaException
This method set the attribute SimpleJobTemplate.jobSubmissionState.

Parameters:
state - The state to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setJobEnvironment

void setJobEnvironment(java.util.Map env)
                       throws DrmaaException
This method set the attribute SimpleJobTemplate.jobEnvironment.

Parameters:
env - The jobEnvironment to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setWorkingDirectory

void setWorkingDirectory(java.lang.String wd)
                         throws DrmaaException
This method set the attribute SimpleJobTemplate.workingDirectory.

Parameters:
wd - The working directoy to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setJobCategory

void setJobCategory(java.lang.String category)
                    throws DrmaaException
This method set the attribute SimpleJobTemplate.jobCategory.

Parameters:
category - The category to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setNativeSpecification

void setNativeSpecification(java.lang.String spec)
                            throws DrmaaException
This method set the attribute SimpleJobTemplate.nativeSpecification.

Parameters:
spec - The native specification to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setEmail

void setEmail(java.util.Set email)
              throws DrmaaException
This method set the attribute SimpleJobTemplate.email.

Parameters:
email - The email to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setBlockEmail

void setBlockEmail(boolean blockEmail)
                   throws DrmaaException
This method set the attribute SimpleJobTemplate.blockEmail.

Parameters:
blockEmail - The blockEmail to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setStartTime

void setStartTime(java.util.Date startTime)
                  throws DrmaaException
This method set the attribute SimpleJobTemplate.startTime.

Parameters:
startTime - The startTime to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setJobName

void setJobName(java.lang.String name)
                throws DrmaaException
This method set the attribute SimpleJobTemplate.jobName.

Parameters:
name - The Job name to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setInputPath

void setInputPath(java.lang.String inputPath)
                  throws DrmaaException
This method set the attribute SimpleJobTemplate.inputPath.

Parameters:
inputPath - The input path to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setOutputPath

void setOutputPath(java.lang.String outputPath)
                   throws DrmaaException
This method set the attribute SimpleJobTemplate.outputPath.

Parameters:
outputPath - The output path to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setErrorPath

void setErrorPath(java.lang.String errorPath)
                  throws DrmaaException
This method set the attribute SimpleJobTemplate.errorPath.

Parameters:
errorPath - The error path to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setJoinFiles

void setJoinFiles(boolean joinFiles)
                  throws DrmaaException
This method set the attribute SimpleJobTemplate.joinFiles.

Parameters:
joinFiles - The joinFiles to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setTransferFiles

void setTransferFiles(FileTransferMode mode)
                      throws DrmaaException
This method set the attribute SimpleJobTemplate.transferFiles.

Parameters:
mode - The transfer mode to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setDeadlineTime

void setDeadlineTime(PartialTimestamp deadline)
                     throws DrmaaException
This method set the attribute SimpleJobTemplate.deadlineTime.

Parameters:
deadline - The deadline to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setHardWallclockTimeLimit

void setHardWallclockTimeLimit(long limit)
                               throws DrmaaException
This method set the attribute SimpleJobTemplate.hardWallclockTimeLimit.

Parameters:
limit - The hard wall clock time limit to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setSoftWallclockTimeLimit

void setSoftWallclockTimeLimit(long limit)
                               throws DrmaaException
This method set the attribute SimpleJobTemplate.softWallclockTimeLimit.

Parameters:
limit - The soft wall clock time timit to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setHardRunDurationLimit

void setHardRunDurationLimit(long limit)
                             throws DrmaaException
This method set the attribute SimpleJobTemplate.hardRunDurationLimit.

Parameters:
limit - The hard run duration limit to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

setSoftRunDurationLimit

void setSoftRunDurationLimit(long limit)
                             throws DrmaaException
This method set the attribute SimpleJobTemplate.softRunDurationLimit.

Parameters:
limit - The soft run duration limit to set
Throws:
InvalidAttributeValueException
ConflictingAttributeValuesException
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getRemoteCommand

java.lang.String getRemoteCommand()
                                  throws DrmaaException
This method get the attribute SimpleJobTemplate.remoteCommand.

Returns:
A String with the remoteCommand value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getArgs

java.util.List getArgs()
                       throws DrmaaException
This method get the attribute SimpleJobTemplate.args.

Returns:
A String array with the args value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getJobSubmissionState

int getJobSubmissionState()
                          throws DrmaaException
This method get the attribute SimpleJobTemplate.jobSubmissionState.

Returns:
A String with the jobSubmissionState value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getJobEnvironment

java.util.Map getJobEnvironment()
                                throws DrmaaException
This method get the attribute SimpleJobTemplate.jobEnvironment.

Returns:
A Properties object with the jobEnvironment value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getWorkingDirectory

java.lang.String getWorkingDirectory()
                                     throws DrmaaException
This method get the attribute SimpleJobTemplate.workingDirectory.

Returns:
A String with the workingDirectory value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getJobCategory

java.lang.String getJobCategory()
                                throws DrmaaException
This method get the attribute SimpleJobTemplate.jobCategory.

Returns:
A String with the jobCategory value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getNativeSpecification

java.lang.String getNativeSpecification()
                                        throws DrmaaException
This method get the attribute SimpleJobTemplate.nativeSpecification.

Returns:
A String with the nativeSpecificationnativeSpecification value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getEmail

java.util.Set getEmail()
                       throws DrmaaException
This method get the attribute SimpleJobTemplate.email.

Returns:
A String array with the email value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getBlockEmail

boolean getBlockEmail()
                      throws DrmaaException
This method get the attribute SimpleJobTemplate.blockEmail.

Returns:
A boolean with the blockEmail value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getStartTime

java.util.Date getStartTime()
                            throws DrmaaException
This method get the attribute SimpleJobTemplate.startTime.

Returns:
A PartialTimestamp object with the startTime value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getJobName

java.lang.String getJobName()
                            throws DrmaaException
This method get the attribute SimpleJobTemplate.jobName.

Returns:
A String with the jobName value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getInputPath

java.lang.String getInputPath()
                              throws DrmaaException
This method get the attribute SimpleJobTemplate.inputPath.

Returns:
A String with the inputPath value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getOutputPath

java.lang.String getOutputPath()
                               throws DrmaaException
This method get the attribute SimpleJobTemplate.outputPath.

Returns:
A String with the outputPath value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getErrorPath

java.lang.String getErrorPath()
                              throws DrmaaException
This method get the attribute SimpleJobTemplate.errorPath.

Returns:
A String with the errorPath value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getJoinFiles

boolean getJoinFiles()
                     throws DrmaaException
This method get the attribute SimpleJobTemplate.joinFiles.

Returns:
A boolean with the joinFiles value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getTransferFiles

FileTransferMode getTransferFiles()
                                  throws DrmaaException
This method get the attribute SimpleJobTemplate.transferFiles.

Returns:
A FileTransferMode object with the transferFiles value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getDeadlineTime

PartialTimestamp getDeadlineTime()
                                 throws DrmaaException
This method get the attribute SimpleJobTemplate.deadlineTime.

Returns:
A PartialTimestamp object with the deadlineTime value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getHardWallclockTimeLimit

long getHardWallclockTimeLimit()
                               throws DrmaaException
This method get the attribute SimpleJobTemplate.hardWallclockTimeLimit.

Returns:
A long with the hardWallclockTimeLimit value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getSoftWallclockTimeLimit

long getSoftWallclockTimeLimit()
                               throws DrmaaException
This method get the attribute SimpleJobTemplate.softWallclockTimeLimit.

Returns:
A long with the softWallclockTimeLimit value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getHardRunDurationLimit

long getHardRunDurationLimit()
                             throws DrmaaException
This method get the attribute SimpleJobTemplate.hardRunDurationLimit.

Returns:
A long with the hardRunDurationLimit value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getSoftRunDurationLimit

long getSoftRunDurationLimit()
                             throws DrmaaException
This method get the attribute SimpleJobTemplate.softRunDurationLimit.

Returns:
A long with the softRunDurationLimit value
Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException

getAttributeNames

java.util.Set getAttributeNames()
                                throws DrmaaException
This method return the list of supported property names. The required Gridway property names are: The optional Gridway property names (implemented in GridWayJobTemplate) are:

Throws:
NoActiveSessionException
java.lang.OutOfMemoryError
DrmCommunicationException
AuthorizationException
java.lang.IllegalArgumentException
InternalException
DrmaaException