@Test public void readAwsConfig() { String xml = "<hazelcast>\n" + " <group>\n" + " <name>dev</name>\n" + " <password>dev-pass</password>\n" + " </group>\n" + " <network>\n" + " <port auto-increment=\"true\">5701</port>\n" + " <join>\n" + " <multicast enabled=\"false\">\n" + " <multicast-group>224.2.2.3</multicast-group>\n" + " <multicast-port>54327</multicast-port>\n" + " </multicast>\n" + " <tcp-ip enabled=\"false\" conn-timeout-seconds=\"10\">\n" + " <interface>127.0.0.1</interface>\n" + " </tcp-ip>\n" + " <aws enabled=\"true\">\n" + " <access-key>access</access-key>\n" + " <secret-key>secret</secret-key>\n" + " </aws>\n" + " </join>\n" + " <interfaces enabled=\"false\">\n" + " <interface>10.10.1.*</interface>\n" + " </interfaces>\n" + " </network>\n" + "</hazelcast>"; ByteArrayInputStream bis = new ByteArrayInputStream(xml.getBytes()); XmlConfigBuilder configBuilder = new XmlConfigBuilder(bis); Config config = configBuilder.build(); AwsConfig awsConfig = config.getNetworkConfig().getJoin().getAwsConfig(); assertTrue(awsConfig.isEnabled()); assertEquals(10, config.getNetworkConfig().getJoin().getTcpIpConfig().getConnectionTimeoutSeconds()); assertEquals("access", awsConfig.getAccessKey()); assertEquals("secret", awsConfig.getSecretKey()); }
public Config build() { Config config = new Config(); config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); return build(config); }
XmlConfigBuilder extends AbstractXmlConfigHelper implements ConfigBuilder { public Config build() { Config config = new Config(); config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); return build(config); } }
XmlConfigBuilder extends AbstractXmlConfigHelper implements ConfigBuilder { public Config build() { Config config = new Config(); config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); return build(config); } XmlConfigBuilder(String xmlFileName);  XmlConfigBuilder(InputStream inputStream);  XmlConfigBuilder(); }
XmlConfigBuilder extends AbstractXmlConfigHelper implements ConfigBuilder { public Config build() { Config config = new Config(); config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); return build(config); } XmlConfigBuilder(String xmlFileName);  XmlConfigBuilder(InputStream inputStream);  XmlConfigBuilder(); Config build(); Config build(Config config); Config build(Element element); }
XmlConfigBuilder extends AbstractXmlConfigHelper implements ConfigBuilder { public Config build() { Config config = new Config(); config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); return build(config); } XmlConfigBuilder(String xmlFileName);  XmlConfigBuilder(InputStream inputStream);  XmlConfigBuilder(); Config build(); Config build(Config config); Config build(Element element);  }