Search in sources :

Example 11 with DefaultSmppServer

use of com.cloudhopper.smpp.impl.DefaultSmppServer in project load-balancer by RestComm.

the class RebindTest method initialization.

@BeforeClass
public static void initialization() {
    boolean enableSslLbPort = false;
    boolean terminateTLSTraffic = true;
    // start lb
    balancer = new BalancerRunner();
    balancer.start(ConfigInit.getLbProperties(enableSslLbPort, terminateTLSTraffic));
    // start servers
    serverArray = new DefaultSmppServer[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();
    }
}
Also used : DefaultSmppServer(com.cloudhopper.smpp.impl.DefaultSmppServer) BalancerRunner(org.mobicents.tools.sip.balancer.BalancerRunner) SmppChannelException(com.cloudhopper.smpp.type.SmppChannelException) BeforeClass(org.junit.BeforeClass)

Example 12 with DefaultSmppServer

use of com.cloudhopper.smpp.impl.DefaultSmppServer in project load-balancer by RestComm.

the class ResponseTimerTest method initialization.

@BeforeClass
public static void initialization() {
    // start lb
    boolean enableSslLbPort = false;
    boolean terminateTLSTraffic = true;
    balancer = new BalancerRunner();
    balancer.start(ConfigInit.getLbProperties(enableSslLbPort, terminateTLSTraffic, true));
    // start servers
    serverArray = new DefaultSmppServer[serverNumbers];
    for (int i = 0; i < serverNumbers; i++) {
        serverArray[i] = new DefaultSmppServer(ConfigInit.getSmppServerConfiguration(i, false), new ServerHandlerForResponseTimer(), 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();
    }
}
Also used : DefaultSmppServer(com.cloudhopper.smpp.impl.DefaultSmppServer) BalancerRunner(org.mobicents.tools.sip.balancer.BalancerRunner) SmppChannelException(com.cloudhopper.smpp.type.SmppChannelException) BeforeClass(org.junit.BeforeClass)

Example 13 with DefaultSmppServer

use of com.cloudhopper.smpp.impl.DefaultSmppServer in project load-balancer by RestComm.

the class SmppStatisticTest method initialization.

@BeforeClass
public static void initialization() {
    boolean enableSslLbPort = false;
    boolean terminateTLSTraffic = true;
    // start lb
    balancer = new BalancerRunner();
    balancer.start(ConfigInit.getLbProperties(enableSslLbPort, terminateTLSTraffic, true));
    // 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();
    }
}
Also used : DefaultSmppServer(com.cloudhopper.smpp.impl.DefaultSmppServer) BalancerRunner(org.mobicents.tools.sip.balancer.BalancerRunner) SmppChannelException(com.cloudhopper.smpp.type.SmppChannelException) BeforeClass(org.junit.BeforeClass)

Example 14 with DefaultSmppServer

use of com.cloudhopper.smpp.impl.DefaultSmppServer in project load-balancer by RestComm.

the class SpliterActiveStandbyTest method initialization.

@BeforeClass
public static void initialization() {
    boolean enableSslLbPort = false;
    boolean terminateTLSTraffic = true;
    // start lb
    balancer = new BalancerRunner();
    balancer.start(ConfigInit.getLbSpliterProperties(enableSslLbPort, terminateTLSTraffic, false));
    // 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");
    }
    sleep(2000);
}
Also used : DefaultSmppServer(com.cloudhopper.smpp.impl.DefaultSmppServer) BalancerRunner(org.mobicents.tools.sip.balancer.BalancerRunner) SmppChannelException(com.cloudhopper.smpp.type.SmppChannelException) BeforeClass(org.junit.BeforeClass)

Example 15 with DefaultSmppServer

use of com.cloudhopper.smpp.impl.DefaultSmppServer in project load-balancer by RestComm.

the class SpliterModeResponseTimerTest method initialization.

@BeforeClass
public static void initialization() {
    // start lb
    boolean enableSslLbPort = false;
    boolean terminateTLSTraffic = true;
    balancer = new BalancerRunner();
    balancer.start(ConfigInit.getLbSpliterProperties(enableSslLbPort, terminateTLSTraffic, true));
    // start servers
    serverArray = new DefaultSmppServer[serverNumbers];
    for (int i = 0; i < serverNumbers; i++) {
        serverArray[i] = new DefaultSmppServer(ConfigInit.getSmppServerConfiguration(i, false), new ServerHandlerForResponseTimer(), 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();
    }
}
Also used : DefaultSmppServer(com.cloudhopper.smpp.impl.DefaultSmppServer) BalancerRunner(org.mobicents.tools.sip.balancer.BalancerRunner) SmppChannelException(com.cloudhopper.smpp.type.SmppChannelException) BeforeClass(org.junit.BeforeClass)

Aggregations

DefaultSmppServer (com.cloudhopper.smpp.impl.DefaultSmppServer)21 SmppChannelException (com.cloudhopper.smpp.type.SmppChannelException)19 BeforeClass (org.junit.BeforeClass)19 BalancerRunner (org.mobicents.tools.sip.balancer.BalancerRunner)19 LoadBalancerConfiguration (org.mobicents.tools.configuration.LoadBalancerConfiguration)3 ArrayList (java.util.ArrayList)2 Test (org.junit.Test)2 BalancerDispatcher (org.mobicents.tools.smpp.balancer.core.BalancerDispatcher)2 UrlRewriteTest (org.mobicents.tools.http.balancer.UrlRewriteTest)1