use of org.mobicents.tools.sip.balancer.AppServerWithRmi in project load-balancer by RestComm.
the class TcpWorstCaseAffinityTest method setUp.
@Before
public void setUp() throws Exception {
shootist = new Shootist(ListeningPoint.TCP, 5060);
balancer = new BalancerRunner();
LoadBalancerConfiguration lbConfig = new LoadBalancerConfiguration();
lbConfig.getSipConfiguration().getInternalLegConfiguration().setTcpPort(5065);
lbConfig.getSipConfiguration().getExternalLegConfiguration().setTcpPort(5060);
lbConfig.getSipConfiguration().getAlgorithmConfiguration().setAlgorithmClass(WorstCaseUdpTestAffinityAlgorithm.class.getName());
lbConfig.getSipConfiguration().getAlgorithmConfiguration().setEarlyDialogWorstCase(true);
HeartbeatConfig rmiConfig = new HeartbeatConfigRmi();
lbConfig.setHeartbeatConfiguration(rmiConfig);
balancer.start(lbConfig);
for (int q = 0; q < servers.length; q++) {
servers[q] = new AppServerWithRmi("node" + q, 4060 + q, "127.0.0.1", 2000, 5060, 5065, "0", ListeningPoint.TCP);
servers[q].start();
}
Thread.sleep(5000);
}
Aggregations