@Test public void testDataNodesResult() throws Exception { String rawXml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + " <ListDataNode xmlns=\"http: " <DataNodes> 10.247.102.239</DataNodes>\n" + " <DataNodes>10.247.102.240</DataNodes>\n" + " <DataNodes>10.247.102.241 </DataNodes>\n" + " <VersionInfo>vipr-2.0.0.0.r2b3e482</VersionInfo>\n" + " </ListDataNode>"; ListDataNodesResult result = new ViPRResponsesSaxParser().parseListDataNodeResult(new StringInputStream(rawXml)).getResult(); Assert.assertNotNull("result is null", result); Assert.assertEquals("wrong version", "vipr-2.0.0.0.r2b3e482", result.getVersion()); Assert.assertEquals("wrong number of hosts", 3, result.getHosts().size()); Assert.assertEquals("wrong 1st host", "10.247.102.239", result.getHosts().get(0)); Assert.assertEquals("wrong 2nd host", "10.247.102.240", result.getHosts().get(1)); Assert.assertEquals("wrong 3rd host", "10.247.102.241", result.getHosts().get(2)); }
public ListDataNodesResultHandler parseListDataNodeResult(InputStream inputStream) throws AmazonClientException { ListDataNodesResultHandler handler = new ListDataNodesResultHandler(); parseXmlInputStream(handler, inputStream); return handler; }
ViPRResponsesSaxParser extends XmlResponsesSaxParser { public ListDataNodesResultHandler parseListDataNodeResult(InputStream inputStream) throws AmazonClientException { ListDataNodesResultHandler handler = new ListDataNodesResultHandler(); parseXmlInputStream(handler, inputStream); return handler; } }
ViPRResponsesSaxParser extends XmlResponsesSaxParser { public ListDataNodesResultHandler parseListDataNodeResult(InputStream inputStream) throws AmazonClientException { ListDataNodesResultHandler handler = new ListDataNodesResultHandler(); parseXmlInputStream(handler, inputStream); return handler; }  }
ViPRResponsesSaxParser extends XmlResponsesSaxParser { public ListDataNodesResultHandler parseListDataNodeResult(InputStream inputStream) throws AmazonClientException { ListDataNodesResultHandler handler = new ListDataNodesResultHandler(); parseXmlInputStream(handler, inputStream); return handler; }  FileAccessResultHandler parseFileAccessResult(InputStream inputStream); ListDataNodesResultHandler parseListDataNodeResult(InputStream inputStream); }
ViPRResponsesSaxParser extends XmlResponsesSaxParser { public ListDataNodesResultHandler parseListDataNodeResult(InputStream inputStream) throws AmazonClientException { ListDataNodesResultHandler handler = new ListDataNodesResultHandler(); parseXmlInputStream(handler, inputStream); return handler; }  FileAccessResultHandler parseFileAccessResult(InputStream inputStream); ListDataNodesResultHandler parseListDataNodeResult(InputStream inputStream);  }