com.vhosting.netconf
Class GetConfig.GetConfigReply

java.lang.Object
  extended by com.vhosting.netconf.Operation.Reply
      extended by com.vhosting.netconf.GetConfig.GetConfigReply
Enclosing class:
GetConfig

public class GetConfig.GetConfigReply
extends Operation.Reply

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

Author:
Giuseppe Palmeri

Constructor Summary
GetConfig.GetConfigReply(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

GetConfig.GetConfigReply

public GetConfig.GetConfigReply(RpcReply reply)
Constructs an instance of the class.

Parameters:
reply - The Rpc Reply for the get-config 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:
 
 ...
 GetConfig g = new GetConfig(c.getSession(), Datastore.candidate);
 SubtreeFilter sf = g.createSubtreeFilter();
 Filter f = sf.addFilter(MyCapabilities.EXAMPLE);
 f.addFilterString("machines/machine|sysname=Linux");
 g.setSubtreeFilter(sf);
 RpcReply rep = g.executeSync(rpcHandler);
 GetConfigReply grp = g.new GetConfigReply(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.