com.vhosting.netconf.messages
Class RpcReplyMsg

java.lang.Object
  extended by com.vhosting.netconf.messages.RpcReplyMsg
All Implemented Interfaces:
RpcReply

public class RpcReplyMsg
extends java.lang.Object
implements RpcReply

This class represents the RPC Reply message in the Netconf protocol.

Version:
1.01, 02/11/2010
Author:
Giuseppe Palmeri

Field Summary
static java.lang.String base_1_0_xmlns
           
 
Method Summary
 boolean containsErrors()
          Check if the RPC Reply message contains errors.
static RpcReplyMsg createServerRpcReply(byte[] message)
          Create the server side Rpc Reply message from a byte array as source.
 RpcReplyError[] getErrors()
          Returns the error associated with the RPC operation associated if any.
 java.lang.Integer getMessageId()
          Get the message id of the Rpc operation with this message as reply.
 boolean load(Rpc rpc)
          Load into an RPC structure the values for it if exist.
 boolean validate()
          Validate the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

base_1_0_xmlns

public static final java.lang.String base_1_0_xmlns
See Also:
Constant Field Values
Method Detail

createServerRpcReply

public static final RpcReplyMsg createServerRpcReply(byte[] message)
                                              throws org.xml.sax.SAXException,
                                                     java.io.IOException
Create the server side Rpc Reply message from a byte array as source.

Parameters:
message - The byte array.
Returns:
The RPC Reply message or null if the message is not a valid RPC Reply message.
Throws:
org.xml.sax.SAXException - Throw this exception if there are parsing troubles.
java.io.IOException - Throw this exception if there are reading troubles.

getMessageId

public java.lang.Integer getMessageId()
Get the message id of the Rpc operation with this message as reply.

Specified by:
getMessageId in interface RpcReply
Returns:
The message identifier.

containsErrors

public boolean containsErrors()
Description copied from interface: RpcReply
Check if the RPC Reply message contains errors.

Specified by:
containsErrors in interface RpcReply
Returns:
false if the operation has not generated errors and possible data can to be available; true otherwise.

getErrors

public RpcReplyError[] getErrors()
Description copied from interface: RpcReply
Returns the error associated with the RPC operation associated if any.

Specified by:
getErrors in interface RpcReply
Returns:
An array of errors; If empty, it means that there were no errors to report.

load

public boolean load(Rpc rpc)
Description copied from interface: RpcReply
Load into an RPC structure the values for it if exist.

Specified by:
load in interface RpcReply
Parameters:
rpc - The RPC structure.
Returns:
true if it has been possible to load values into the structure; false otherwise.

validate

public boolean validate()
Validate the message.

Returns:
true if the document is a validated Netconf XML Document; false otherwise.