|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cri.xcat.api.Request
com.cri.xcat.api.helpers.BasicRequest
public class BasicRequest
BasicRequest extends the base Request class and represents a basic xCAT request to the xCAT daemon. A request is also commonly referred to as a command. A basic xCAT request (or command) consists of four parts:
Not all requests must use all four parts. For a BasicRequest, only the commandName must be explicitly set by the user. For the node range and argument list, only if values are set will the resulting XML contain these fields, otherwise no node range or argument list is sent to the xCAT daemon.
The current working directory is also always sent to the xCAT daemon, but
this information can be found by using the System's user directory if the
user does not explicitly set this value. The user cannot however set the
current working directory to null
as the xCAT daemon is
expecting this information.
For example, if a user creates a BasicRequest but only sets the node range value to "n01", the following information will be sent to the xCAT daemon:
Constructor Summary | |
---|---|
BasicRequest(java.lang.String commandName)
Default Constructor that creates a Basic Request with the command name equal to the input parameter. |
Method Summary | |
---|---|
void |
buildXmlOutputStream(java.io.OutputStream stream)
Creates the XML and sends it to the xCAT server. |
java.lang.String[] |
getArgs()
Gets the list of arguments that will be sent to the xCAT deamon with the command. |
java.lang.String |
getCommandName()
Gets the name of the command that will be sent to the xCAT deamon. |
java.lang.String |
getCurrentWorkingDirectory()
Gets the current working directory. |
java.lang.String |
getNodeRange()
Get the node range for the command. |
void |
setArgs(java.lang.String[] args)
Sets the list of arguments that will be sent to the xCAT deamon with the command. |
void |
setCommandName(java.lang.String name)
Sets the name of the command that will be sent to the xCAT deamon. |
void |
setCurrentWorkingDirectory(java.lang.String currentWorkingDirectory)
Set the current working directory for the xCAT request. |
void |
setNodeRange(java.lang.String nodeRange)
Set the node range for the request. |
Methods inherited from class com.cri.xcat.api.Request |
---|
getConnection, getHandler, getSocketTimeOut, setSocketTimeOut, submitRequest, submitRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicRequest(java.lang.String commandName)
commandName
- the name of the command which will be sent to the xCAT daemon.Method Detail |
---|
public void buildXmlOutputStream(java.io.OutputStream stream) throws XcatCommunicationException
Request
buildXmlOutputStream
in class Request
stream
- The OutputStream from the SSL socket to the xCAT server. The
XML created should be sent to this output stream.
XcatCommunicationException
public java.lang.String[] getArgs()
May return null
if the argument list was never set or was
set to null
.
public java.lang.String getCommandName()
public java.lang.String getCurrentWorkingDirectory()
May return null
if the directory was never set or was set to
null
.
public java.lang.String getNodeRange()
May return null
if the range was never set or was set to
null
.
public void setArgs(java.lang.String[] args)
args
- the list of arguments that will be sent to the xCAT deamon
with the commandpublic void setCommandName(java.lang.String name)
Cannot be empty or null
.
name
- the name of the command that will be sent to the xCAT deamonpublic void setCurrentWorkingDirectory(java.lang.String currentWorkingDirectory)
null
), the System's user directory is
used.
currentWorkingDirectory
- the current working directory for the xCAT requestpublic void setNodeRange(java.lang.String nodeRange)
nodeRange
- node range for the request
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |