Search in sources :

Example 16 with ServerSocketEndpointConfig

use of com.hazelcast.config.ServerSocketEndpointConfig in project hazelcast by hazelcast.

the class AdvancedNetworkClientIntegrationTest method getConfig.

private Config getConfig() {
    Config config = smallInstanceConfig();
    config.getAdvancedNetworkConfig().setEnabled(true).setClientEndpointConfig(new ServerSocketEndpointConfig().setPort(BASE_CLIENT_PORT));
    config.getAdvancedNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
    config.getAdvancedNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true).addMember("127.0.0.1");
    return config;
}
Also used : HazelcastTestSupport.smallInstanceConfig(com.hazelcast.test.HazelcastTestSupport.smallInstanceConfig) ClientConfig(com.hazelcast.client.config.ClientConfig) Config(com.hazelcast.config.Config) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig)

Example 17 with ServerSocketEndpointConfig

use of com.hazelcast.config.ServerSocketEndpointConfig in project hazelcast by hazelcast.

the class MemcachedMultiendpointTest method createConfig.

@Override
protected Config createConfig() {
    Config config = smallInstanceConfig();
    AdvancedNetworkConfig anc = config.getAdvancedNetworkConfig();
    anc.setEnabled(true).setMemcacheEndpointConfig(new ServerSocketEndpointConfig());
    // Join is disabled intentionally. will start standalone HazelcastInstances.
    JoinConfig join = anc.getJoin();
    join.getAutoDetectionConfig().setEnabled(false);
    join.getTcpIpConfig().setEnabled(false);
    return config;
}
Also used : AdvancedNetworkConfig(com.hazelcast.config.AdvancedNetworkConfig) Config(com.hazelcast.config.Config) JoinConfig(com.hazelcast.config.JoinConfig) AdvancedNetworkConfig(com.hazelcast.config.AdvancedNetworkConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) JoinConfig(com.hazelcast.config.JoinConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig)

Example 18 with ServerSocketEndpointConfig

use of com.hazelcast.config.ServerSocketEndpointConfig in project hazelcast by hazelcast.

the class InvalidEndpointTest method createMemcacheEndpointConfig.

protected Config createMemcacheEndpointConfig() {
    ServerSocketEndpointConfig endpointConfig = new ServerSocketEndpointConfig();
    endpointConfig.setName("Text").setPort(10000).setPortAutoIncrement(true);
    Config config = new Config();
    config.getAdvancedNetworkConfig().setMemcacheEndpointConfig(endpointConfig).setEnabled(true);
    return config;
}
Also used : Config(com.hazelcast.config.Config) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) RestServerEndpointConfig(com.hazelcast.config.RestServerEndpointConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig)

Example 19 with ServerSocketEndpointConfig

use of com.hazelcast.config.ServerSocketEndpointConfig in project hazelcast by hazelcast.

the class AbstractAdvancedNetworkIntegrationTest method createServerSocketConfig.

protected ServerSocketEndpointConfig createServerSocketConfig(int port, String name) {
    ServerSocketEndpointConfig serverSocketConfig = new ServerSocketEndpointConfig();
    serverSocketConfig.setPort(port);
    serverSocketConfig.getInterfaces().addInterface("127.0.0.1");
    if (name != null) {
        serverSocketConfig.setName(name);
    }
    return serverSocketConfig;
}
Also used : ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig)

Example 20 with ServerSocketEndpointConfig

use of com.hazelcast.config.ServerSocketEndpointConfig in project hazelcast by hazelcast.

the class DelegatingAddressPickerTest method createAdvancedNetworkConfig.

private Config createAdvancedNetworkConfig() {
    Config config = new Config();
    config.getAdvancedNetworkConfig().setEnabled(true);
    config.getAdvancedNetworkConfig().getMemberAddressProviderConfig().setEnabled(true).setImplementation(new AnAddressProvider());
    config.getAdvancedNetworkConfig().setMemberEndpointConfig(new ServerSocketEndpointConfig().setPort(3000));
    config.getAdvancedNetworkConfig().setClientEndpointConfig(new ServerSocketEndpointConfig().setPort(3001));
    config.getAdvancedNetworkConfig().setRestEndpointConfig(new RestServerEndpointConfig().setPort(3002));
    config.getAdvancedNetworkConfig().addWanEndpointConfig(new ServerSocketEndpointConfig().setName("wan1").setPort(3003));
    return config;
}
Also used : Config(com.hazelcast.config.Config) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) RestServerEndpointConfig(com.hazelcast.config.RestServerEndpointConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) RestServerEndpointConfig(com.hazelcast.config.RestServerEndpointConfig)

Aggregations

ServerSocketEndpointConfig (com.hazelcast.config.ServerSocketEndpointConfig)20 Config (com.hazelcast.config.Config)12 AdvancedNetworkConfig (com.hazelcast.config.AdvancedNetworkConfig)5 JoinConfig (com.hazelcast.config.JoinConfig)5 RestServerEndpointConfig (com.hazelcast.config.RestServerEndpointConfig)5 EndpointConfig (com.hazelcast.config.EndpointConfig)3 TcpIpConfig (com.hazelcast.config.TcpIpConfig)2 WanBatchPublisherConfig (com.hazelcast.config.WanBatchPublisherConfig)2 WanReplicationConfig (com.hazelcast.config.WanReplicationConfig)2 EndpointQualifier (com.hazelcast.instance.EndpointQualifier)2 HazelcastTestSupport.smallInstanceConfig (com.hazelcast.test.HazelcastTestSupport.smallInstanceConfig)2 QuickTest (com.hazelcast.test.annotation.QuickTest)2 Test (org.junit.Test)2 ClientConfig (com.hazelcast.client.config.ClientConfig)1 EventJournalConfig (com.hazelcast.config.EventJournalConfig)1 InvalidConfigurationException (com.hazelcast.config.InvalidConfigurationException)1 MemberAddressProviderConfig (com.hazelcast.config.MemberAddressProviderConfig)1 MerkleTreeConfig (com.hazelcast.config.MerkleTreeConfig)1 NearCacheConfig (com.hazelcast.config.NearCacheConfig)1 NetworkConfig (com.hazelcast.config.NetworkConfig)1