|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cri.xcat.api.Request
public abstract class Request
A request (also referred to as a command) is the basic information that is sent to the xCAT daemon. This class is responsible for creating the appropriate XML to send to xcatd as well as submitting this request to the server. The communication to the server is done via a xCAT connection object.
Constructor Summary | |
---|---|
Request()
|
Method Summary | |
---|---|
abstract void |
buildXmlOutputStream(java.io.OutputStream stream)
Creates the XML and sends it to the xCAT server. |
Connection |
getConnection()
Gets the connection used to create the socket. |
IResponseHandler |
getHandler()
Gets the handler used to handle XML responses and any errors that might have occurred. |
int |
getSocketTimeOut()
Gets the timeout used to read data from the socket to xCAT (in milliseconds). |
void |
setSocketTimeOut(int socketTimeOut)
Sets the timeout used to read data from the socket to xCAT (in milliseconds). |
void |
submitRequest(Connection connection)
Submits a request to the xCAT daemon using the connection passed in and a new DefaultResponseHandler as the handler. |
void |
submitRequest(Connection connection,
IResponseHandler handler)
Submits a request to the xCAT daemon using the connection and handler passed in. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Request()
Method Detail |
---|
public abstract void buildXmlOutputStream(java.io.OutputStream stream) throws XcatCommunicationException
stream
- The OutputStream from the SSL socket to the xCAT server. The
XML created should be sent to this output stream.
XcatCommunicationException
public Connection getConnection()
public IResponseHandler getHandler()
public int getSocketTimeOut()
submitRequest
method.
A value of 0 represents an infinite timeout (or no timeout).
Default value set to
public void setSocketTimeOut(int socketTimeOut)
submitRequest
method.
Setting the value to 0 represents an infinite timeout (or no timeout)
Default value set to
socketTimeOut
- The timeout used to read data from the socket to xCAT (in
milliseconds).public void submitRequest(Connection connection)
DefaultResponseHandler
as the handler.
connection
- the connection used to create a socket connection to xcatdpublic void submitRequest(Connection connection, IResponseHandler handler)
connection
- the connection used to create a socket connection to xcatdhandler
- the handler used to handle the XML response or any errors that
occurred.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |