use of com.cloudhopper.smpp.impl.DefaultSmppServer in project load-balancer by RestComm.
the class CommonTest method initialization.
@BeforeClass
public static void initialization() {
boolean enableSslLbPort = false;
boolean terminateTLSTraffic = true;
// start lb
balancer = new BalancerRunner();
ConfigInit.getLbProperties(enableSslLbPort, terminateTLSTraffic).getSmppConfiguration().setTimeoutConnection(2000);
ConfigInit.getLbProperties(enableSslLbPort, terminateTLSTraffic).getSmppConfiguration().setTimeoutConnectionCheckClientSide(5000);
ConfigInit.getLbProperties(enableSslLbPort, terminateTLSTraffic).getSmppConfiguration().setTimeoutConnectionCheckServerSide(5000);
balancer.start(ConfigInit.getLbProperties(enableSslLbPort, terminateTLSTraffic));
// start servers
serverArray = new DefaultSmppServer[serverNumbers];
serverHandlerArray = new DefaultSmppServerHandler[serverNumbers];
for (int i = 0; i < serverNumbers; i++) {
serverHandlerArray[i] = new DefaultSmppServerHandler();
serverArray[i] = new DefaultSmppServer(ConfigInit.getSmppServerConfiguration(i, false), serverHandlerArray[i], executor, monitorExecutor);
logger.info("Starting SMPP server...");
try {
serverArray[i].start();
} catch (SmppChannelException e) {
logger.info("SMPP server does not started");
e.printStackTrace();
}
logger.info("SMPP server started");
}
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Aggregations