|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.bnl.star.offline.scheduler.request.Request
public class Request
Holds all the informations describing a job to be executed by the scheduler. It contains the machine from which it was dispatched, the command line, the file required for input and output and the environment variables needed by the process. It can also handle the information about the processes to be dispatched in order to execute the job. The scheduler Policy will decide this information and put it in this class for the Dispatcher to use.
Field Summary | |
---|---|
static java.net.URL |
discard
|
Constructor Summary | |
---|---|
Request()
|
|
Request(java.lang.String fileName)
Creates a new Request and provides XML file name. |
|
Request(java.lang.String username,
java.lang.String command,
java.lang.String name,
java.lang.String description,
java.lang.String fileName)
Creates a new JobRequest with a title and a description. |
Method Summary | |
---|---|
void |
addResource(Resource resource)
Add a Resource value to this Request |
void |
addToReportText(java.lang.String Text)
|
Application |
getApplication()
Return Application value. |
java.lang.String |
getAuthenticatedUser()
|
java.lang.String |
getCommand()
Deprecated. use getTask instead |
java.lang.String |
getDescription()
Returns a description of the job request. |
java.lang.String |
getFileListType()
Getter for property fileListType. |
double |
getFilesPerHour()
Getter for property filesPerHour. |
java.lang.String |
getID()
Returns the base jobs ID |
java.util.List |
getInputList()
Returns the list of data files that were requested as an input of the job. |
java.util.List |
getInputOrder()
Getter for property inputOrder. |
java.util.List |
getJobs()
Returns a list of all the job objects of this request |
boolean |
getMail()
Returns true if communication by mail from the queuing system is allowed. |
java.lang.String |
getName()
Returns a title describing the job request. |
int |
getNProcesses()
Getter for property nProcesses. |
java.util.List |
getOutputList()
Return the list of data files that were requested as an output of the job. |
java.lang.String |
GetReportText()
|
java.lang.String |
getRequestFileName()
Retrieves the filename of the orignal request sent to the scheduler. |
Resource |
getResource(java.lang.String name)
Get a Resource value from this Request If the Resource doesn't exist, return a default Resource |
java.util.Hashtable |
getResourceTable()
|
Sandbox |
getSandbox()
|
boolean |
getSimulation()
Returns true if this job requests is only a simulations. |
java.net.URL |
getStdErr()
Deprecated. use getTask().getStdErr() instead |
java.net.URL |
getStdIn()
Deprecated. use getTask().getStdIn() instead |
java.net.URL |
getStdOut()
Deprecated. use getTask().getStdOut() instead |
Task |
getTask()
Return Task value. |
java.lang.String |
getUsername()
Returns the user name under which the job has to run. |
boolean |
hasNoInput()
Returns true if the job request didn't contain any input. |
void |
prepareInputOrder(java.lang.String commaSeparated)
|
void |
setApplication(Application app)
Set Application attribute. |
void |
setAuthenticatedUser(java.lang.String authenticatedUser)
|
void |
setCommand(java.lang.String command)
Deprecated. use setTask instead |
void |
setFileListType(java.lang.String fileListType)
Setter for property fileListType. |
void |
setFilesPerHour(double filesPerHour)
Setter for property filesPerHour. |
void |
setID(java.lang.String id)
sets the base ID for the request |
void |
setInputOrder(java.util.List inputOrder)
Setter for property inputOrder. |
void |
setJobs(java.util.List jobs)
Sets the list of jobs that where made from this request |
void |
setMail(boolean mail)
Specifies if the queuing system is allowed to send mail to the user. |
void |
setName(java.lang.String name)
Set the request name |
void |
setNProcesses(int nProcesses)
Setter for property nProcesses. |
void |
setOutputList(java.util.List output)
|
void |
SetReportText(java.lang.String Text)
|
void |
setResourceMax(java.lang.String name,
int max)
Set a Resource's max value If the Resource doesn't exist, create it |
void |
setResourceMin(java.lang.String name,
int min)
Set a Resource's min value If the Resource doesn't exist, create it |
void |
setResourceTable(java.util.Hashtable resources)
|
void |
setSandbox(Sandbox sandbox)
|
void |
setSimulation(boolean simulation)
Set to true if this job request is only to be simulated. |
void |
setStdErr(java.net.URL stderr)
Deprecated. use setTask() instead |
void |
setStdIn(java.net.URL stdin)
Deprecated. use setTask() instead |
void |
setStdOut(java.net.URL stdout)
Deprecated. use setTask() instead |
void |
setTask(Task task)
Set Task attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.net.URL discard
Constructor Detail |
---|
public Request(java.lang.String username, java.lang.String command, java.lang.String name, java.lang.String description, java.lang.String fileName)
username
- the username submitting the jobcommand
- the command line to be executedname
- a short description of the jobdescription
- a more detailed description of the jobfileName
- the XML request file namepublic Request(java.lang.String fileName)
fileName
- the XML request file namepublic Request()
Method Detail |
---|
public void setResourceTable(java.util.Hashtable resources)
public java.util.Hashtable getResourceTable()
public void setID(java.lang.String id)
public java.lang.String getID()
public void setJobs(java.util.List jobs)
public java.util.List getJobs()
public void setSimulation(boolean simulation)
This mode is intended to be used by advanced users and developers to check whether their request was executed correctly. The dispatcher is responsible to check for this flag, and implement fake dispatching.
simulation
- true if no actual dispatching action is requestedpublic java.lang.String getRequestFileName()
public java.lang.String getUsername()
public boolean hasNoInput()
public java.lang.String getCommand()
public java.lang.String getName()
public java.lang.String getDescription()
public java.net.URL getStdIn()
public java.net.URL getStdOut()
public java.net.URL getStdErr()
public Application getApplication()
public Task getTask()
public java.util.List getInputList()
public java.util.List getOutputList()
public void setOutputList(java.util.List output)
public boolean getSimulation()
This mode is intended to be used by advanced users and developers to check whether their request was executed correctly. The dispatcher is responsible to check for this flag, and implement fake dispatching.
public boolean getMail()
public java.lang.String getFileListType()
public double getFilesPerHour()
public java.util.List getInputOrder()
public void addResource(Resource resource)
resource
- to addpublic Resource getResource(java.lang.String name)
name
- of resource to getpublic void setResourceMin(java.lang.String name, int min)
name
- of Resourcemin
- valuepublic void setResourceMax(java.lang.String name, int max)
name
- of Resourcemax
- valuepublic int getNProcesses()
public void setNProcesses(int nProcesses)
nProcesses
- New value of property nProcesses.public void addToReportText(java.lang.String Text)
public void SetReportText(java.lang.String Text)
public java.lang.String GetReportText()
public void setName(java.lang.String name)
name
- public void setCommand(java.lang.String command)
command
- the command line to be executedpublic void setStdIn(java.net.URL stdin)
stdin
- a file containing the input file to be redirected in the standard inpublic void setStdOut(java.net.URL stdout)
stdout
- a file containing the output file where the standard out should be redirectedpublic void setStdErr(java.net.URL stderr)
stderr
- a file containing the output file where the standard error should be redirectedpublic void setApplication(Application app)
app
- public void setTask(Task task)
task
- public void setMail(boolean mail)
mail
- true if the user is allowed to recieve mailpublic void setFileListType(java.lang.String fileListType)
fileListType
- New value of property fileListType.public void setFilesPerHour(double filesPerHour)
filesPerHour
- New value of property filesPerHour.public void setInputOrder(java.util.List inputOrder)
inputOrder
- New value of property inputOrder.public void prepareInputOrder(java.lang.String commaSeparated)
public java.lang.String getAuthenticatedUser()
public void setAuthenticatedUser(java.lang.String authenticatedUser)
public void setSandbox(Sandbox sandbox)
public Sandbox getSandbox()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |