com.hazelcast.client.config.XmlClientConfigBuilder Java Examples

The following examples show how to use com.hazelcast.client.config.XmlClientConfigBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HazelcastJetClientConfiguration.java    From hazelcast-jet-contrib with Apache License 2.0 5 votes vote down vote up
private static ClientConfig getClientConfig(Resource clientConfigLocation) throws IOException {
    URL configUrl = clientConfigLocation.getURL();
    String configFileName = configUrl.getPath();
    if (configFileName.endsWith(".yaml") || configFileName.endsWith("yml")) {
        return new YamlClientConfigBuilder(configUrl).build();
    }
    return new XmlClientConfigBuilder(configUrl).build();
}
 
Example #2
Source File: ConnectDisconnectTest.java    From hazelcast-simulator with Apache License 2.0 4 votes vote down vote up
@Setup
public void setup() throws IOException {
    clientConfig = new XmlClientConfigBuilder(new File("client-hazelcast.xml")).build();
    targetInstance.shutdown();
}
 
Example #3
Source File: ConnectDisconnectTest.java    From hazelcast-simulator with Apache License 2.0 4 votes vote down vote up
@Setup
public void setup() throws IOException {
    clientConfig = new XmlClientConfigBuilder(new File("client-hazelcast.xml")).build();
    targetInstance.shutdown();
}
 
Example #4
Source File: HazelcastClientFactory.java    From incubator-batchee with Apache License 2.0 4 votes vote down vote up
public static HazelcastInstance newClient(final String xmlConfiguration) throws IOException {
    return HazelcastClient.newHazelcastClient(
        new XmlClientConfigBuilder(IOs.findConfiguration(xmlConfiguration)).build());
}