Search in sources :

Example 1 with ServerSocketEndpointConfig

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

the class SingleProtocolHandlerRegressionTest method createMemberEndpointConfig.

protected Config createMemberEndpointConfig() {
    ServerSocketEndpointConfig endpointConfig = new ServerSocketEndpointConfig();
    endpointConfig.setName("CLIENT").setPort(10000).setPortAutoIncrement(true);
    Config config = new Config();
    config.getAdvancedNetworkConfig().setEnabled(true).setClientEndpointConfig(endpointConfig);
    return config;
}
Also used : Config(com.hazelcast.config.Config) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig)

Example 2 with ServerSocketEndpointConfig

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

the class TcpServerControlTest method createConfig.

private Config createConfig() {
    ServerSocketEndpointConfig memberServerSocketConfig = new ServerSocketEndpointConfig().setPort(SERVER_MEMBER_ADDRESS.getPort());
    memberServerSocketConfig.getInterfaces().addInterface(SERVER_MEMBER_ADDRESS.getHost());
    ServerSocketEndpointConfig clientServerSocketConfig = new ServerSocketEndpointConfig().setPort(SERVER_CLIENT_ADDRESS.getPort());
    clientServerSocketConfig.getInterfaces().addInterface(SERVER_CLIENT_ADDRESS.getHost());
    ServerSocketEndpointConfig wanServerSocketConfig = new ServerSocketEndpointConfig().setName("wan").setPort(SERVER_WAN_ADDRESS.getPort());
    wanServerSocketConfig.getInterfaces().addInterface(SERVER_WAN_ADDRESS.getHost());
    memberServerSocketConfig.getInterfaces().addInterface("127.0.0.1");
    Config config = smallInstanceConfig();
    config.getAdvancedNetworkConfig().setEnabled(true).setMemberEndpointConfig(memberServerSocketConfig).setClientEndpointConfig(clientServerSocketConfig).addWanEndpointConfig(wanServerSocketConfig);
    return config;
}
Also used : HazelcastTestSupport.smallInstanceConfig(com.hazelcast.test.HazelcastTestSupport.smallInstanceConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) Config(com.hazelcast.config.Config) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig)

Example 3 with ServerSocketEndpointConfig

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

the class LocalAddressRegistryIntegrationTest method createConfigForServer.

private Config createConfigForServer() {
    Config config = smallInstanceConfig();
    AdvancedNetworkConfig advancedNetworkConfig = config.getAdvancedNetworkConfig();
    JoinConfig advancedJoinConfig = advancedNetworkConfig.getJoin();
    advancedJoinConfig.getTcpIpConfig().setEnabled(true);
    ServerSocketEndpointConfig memberServerSocketConfig = new ServerSocketEndpointConfig().setPort(SERVER_MEMBER_ADDRESS.getPort());
    memberServerSocketConfig.getInterfaces().addInterface(SERVER_MEMBER_ADDRESS.getHost());
    ServerSocketEndpointConfig clientServerSocketConfig = new ServerSocketEndpointConfig().setPort(SERVER_CLIENT_ADDRESS.getPort());
    clientServerSocketConfig.getInterfaces().addInterface(SERVER_CLIENT_ADDRESS.getHost());
    ServerSocketEndpointConfig wanServerSocketConfig = new ServerSocketEndpointConfig().setName("wan").setPort(SERVER_WAN_ADDRESS.getPort());
    wanServerSocketConfig.getInterfaces().addInterface(SERVER_WAN_ADDRESS.getHost());
    memberServerSocketConfig.getInterfaces().addInterface("127.0.0.1");
    advancedNetworkConfig.setEnabled(true).setMemberEndpointConfig(memberServerSocketConfig).setClientEndpointConfig(clientServerSocketConfig).addWanEndpointConfig(wanServerSocketConfig);
    return config;
}
Also used : AdvancedNetworkConfig(com.hazelcast.config.AdvancedNetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig) Config(com.hazelcast.config.Config) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) AdvancedNetworkConfig(com.hazelcast.config.AdvancedNetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig)

Example 4 with ServerSocketEndpointConfig

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

the class LocalAddressRegistryIntegrationTest method createConfigForInitiator.

private Config createConfigForInitiator() {
    Config config = smallInstanceConfig();
    AdvancedNetworkConfig advancedNetworkConfig = config.getAdvancedNetworkConfig();
    JoinConfig advancedJoinConfig = advancedNetworkConfig.getJoin();
    advancedJoinConfig.getTcpIpConfig().setEnabled(true).addMember(SERVER_MEMBER_ADDRESS.getHost() + ":" + SERVER_MEMBER_ADDRESS.getPort());
    ServerSocketEndpointConfig memberServerSocketConfig = new ServerSocketEndpointConfig().setPort(INITIATOR_MEMBER_ADDRESS.getPort());
    memberServerSocketConfig.getInterfaces().addInterface(INITIATOR_MEMBER_ADDRESS.getHost());
    ServerSocketEndpointConfig clientServerSocketConfig = new ServerSocketEndpointConfig().setPort(INITIATOR_CLIENT_ADDRESS.getPort());
    ServerSocketEndpointConfig wanServerSocketConfig = new ServerSocketEndpointConfig().setName("wan").setPort(SERVER_WAN_ADDRESS.getPort());
    wanServerSocketConfig.getInterfaces().addInterface(INITIATOR_WAN_ADDRESS.getHost());
    memberServerSocketConfig.getInterfaces().addInterface("127.0.0.1");
    advancedNetworkConfig.setEnabled(true).setMemberEndpointConfig(memberServerSocketConfig).setClientEndpointConfig(clientServerSocketConfig).addWanEndpointConfig(wanServerSocketConfig);
    return config;
}
Also used : AdvancedNetworkConfig(com.hazelcast.config.AdvancedNetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig) Config(com.hazelcast.config.Config) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) AdvancedNetworkConfig(com.hazelcast.config.AdvancedNetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig)

Example 5 with ServerSocketEndpointConfig

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

the class RestMultiendpointTest method getConfig.

@Override
public Config getConfig() {
    Config config = super.getConfig();
    config.setClusterName(randomString());
    ServerSocketEndpointConfig memberEndpointConfig = new ServerSocketEndpointConfig();
    memberEndpointConfig.setName("MEMBER").setPort(6000).setPortAutoIncrement(true);
    ServerSocketEndpointConfig clientEndpointConfig = new ServerSocketEndpointConfig();
    clientEndpointConfig.setName("CLIENT").setPort(5000).setPortAutoIncrement(true);
    RestServerEndpointConfig restEndpoint = new RestServerEndpointConfig();
    restEndpoint.setName("Text").setPort(10000).setPortAutoIncrement(true).enableAllGroups();
    config.getAdvancedNetworkConfig().setEnabled(true).setMemberEndpointConfig(memberEndpointConfig).setClientEndpointConfig(clientEndpointConfig).setRestEndpointConfig(restEndpoint);
    // we start pairs of HazelcastInstances which form a cluster to have remote invocations for all operations
    JoinConfig join = config.getAdvancedNetworkConfig().getJoin();
    join.getMulticastConfig().setEnabled(false);
    join.getTcpIpConfig().setEnabled(true).addMember("127.0.0.1:6000").addMember("127.0.0.1:6001");
    instance = factory.newHazelcastInstance(config);
    remoteInstance = factory.newHazelcastInstance(config);
    communicator = new HTTPCommunicator(instance);
    return config;
}
Also used : Config(com.hazelcast.config.Config) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) JoinConfig(com.hazelcast.config.JoinConfig) RestServerEndpointConfig(com.hazelcast.config.RestServerEndpointConfig) JoinConfig(com.hazelcast.config.JoinConfig) 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