|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IResponseHandler
This interface is used for handling an xCAT response (from the xCAT daemon). The methods included in this interface allow a class that would like to handle an xCAT response the necessarily functionality needed to handle either the XML response or the error that occurred while attempting the communication.
Method Summary | |
---|---|
void |
handleError(java.lang.Exception e)
This method is called when an error has occurred while attempting to submit a request (send a command) to the xCAT daemon. |
void |
handleXmlResponse(java.io.InputStream inputStream)
This method takes the InputStream from the SSL socket connection and parses it. |
Method Detail |
---|
void handleError(java.lang.Exception e)
e
- The error that occurred.void handleXmlResponse(java.io.InputStream inputStream)
The response is in a XML format with the root XML tag of
1. <xcatresponse> <data>...</data> <data>...</data> ... <data>...</data> </xcatresponse>
In this format, there can be multiple
2. <xcatresponse> <data> <desc>desc1</desc> <contents>contents1</contents> </data> <data> <desc>desc2</desc> <contents>contents2</contents> </data> </xcatresponse>
NOTE: In this format, only the data array can have more than one element. All other arrays are assumed to be a single element.
3. <xcatresponse> <node> <name>node1</name> <data> <desc>node 1 desc</desc> <contents>node 1 contents</contents> </data> </node> <node> <name>node2</name> <data> <desc>node 2 desc</desc> <contents>node 2 contents</contents> </data> </node> </xcatresponse>
NOTE: Only the node array can have more than one element. All other arrays are assumed to be a single element.
The response from xcatd may also contain an error. The error will be
specified in the XML response and in which case the client should
recognize this error and respond accordingly. NOTE: The
handleError
method is not automatically called when xcatd
responds with valid XML containing an error message. This is up to the
client.
inputStream
- the input stream from the xCAT daemon to this client.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |