com.ace.moab.api.request
Class SubmitJobRequest

java.lang.Object
  extended by com.ace.moab.api.request.SubmitJobRequest
All Implemented Interfaces:
com.moab.api.commands.Request

public class SubmitJobRequest
extends java.lang.Object
implements com.moab.api.commands.Request

This class represents a request that is built to submit a job.

In order to use this, a MoabJob object must be created that describes the job requirements that the user wants to user when submitting a job.

The following is a list of supported operations for this request:

Author:
Brady Kimball

Constructor Summary
SubmitJobRequest(MoabJob job)
           Initializes a new request that is set up according to the job object passed.
 
Method Summary
 java.util.List<java.lang.String> getMoabCommands()
          Returns a list of commands that define the request.
 boolean hasChanges()
          Returns true if changes exist for the request.
 void setJob(MoabJob job)
          Sets the job description used to build the commands to submit a job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubmitJobRequest

public SubmitJobRequest(MoabJob job)
                 throws InvalidMoabArgumentException

Initializes a new request that is set up according to the job object passed.

The job object cannot be null.

Parameters:
job - the job description used to build the submit job request.
Throws:
InvalidMoabArgumentException - thrown if job is null.
Method Detail

getMoabCommands

public java.util.List<java.lang.String> getMoabCommands()
                                                 throws com.moab.api.connect.exception.RequestException
Returns a list of commands that define the request. These commands are run on the server containing Moab. These will only be run if the Request.hasChanges() method returns true.

Specified by:
getMoabCommands in interface com.moab.api.commands.Request
Returns:
a list of Strings representing commands defining the request.
Throws:
com.moab.api.connect.exception.RequestException - thrown if the implementing Request class has problems building the associated commands.

hasChanges

public boolean hasChanges()
Description copied from interface: com.moab.api.commands.Request
Returns true if changes exist for the request.

Specified by:
hasChanges in interface com.moab.api.commands.Request
Returns:
true if changes exist for the request.

setJob

public void setJob(MoabJob job)
            throws InvalidMoabArgumentException
Sets the job description used to build the commands to submit a job.

Parameters:
job - the job description to use to submit a job.
Throws:
InvalidMoabArgumentException - thrown if job is null.


Copyright © 2001-2009 Cluster Resources, Inc. All Rights Reserved.