com.vhosting.netconf
Class Get.GetReply

java.lang.Object
  extended by com.vhosting.netconf.Operation.Reply
      extended by com.vhosting.netconf.Get.GetReply
Enclosing class:
Get

public class Get.GetReply
extends Operation.Reply

This class provides specific methods to process the data obtained in response to a RpcReply after a get operation.

Author:
Giuseppe Palmeri

Constructor Summary
Get.GetReply(RpcReply reply)
          Constructs an instance of the class.
 
Method Summary
 org.w3c.dom.Document getData()
          Get the output data as an XML Document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Get.GetReply

public Get.GetReply(RpcReply reply)
Constructs an instance of the class.

Parameters:
reply - The Rpc Reply for the get operation.
Method Detail

getData

public org.w3c.dom.Document getData()
Get the output data as an XML Document. This document will contain all the required data. The document root element is the <data> xml element.
 Example:
 
 ...
 Get g = new Get(c.getSession());
 SubtreeFilter sf = g.createSubtreeFilter();
 Filter f = sf.addFilter(MyCapabilities.EXAMPLE);
 f.addFilterString("machines/machine|sysname=Linux");
 g.setSubtreeFilter(sf);
 RpcReply rep = g.executeSync(rpcHandler);
 GetReply grp = g.new GetReply(rep);
 Document d = grp.getData();
 DOMUtils.dump(d, System.out);
 ...
 
 Into the stdout is printed in the 
 following XML Document (or something similar):
 
 
 
    
       
          Linux
          i686
       
    
 
 
 

Returns:
The XML Document contain all the required data or null if the operation failed.