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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations