Search in sources :

Example 1 with PersistenceRAInterfaceProxy

use of org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy in project smscgateway by RestComm.

the class TxHttpServerSbbTest method setUpClass.

@BeforeMethod
public void setUpClass() throws Exception {
    System.out.println("setUpClass");
    this.pers = new PersistenceRAInterfaceProxy();
    this.cassandraDbInited = this.pers.testCassandraAccess();
    if (!this.cassandraDbInited)
        return;
    // if (!this.cassandraDbInited)
    // Assert.fail("Cassandra DB is not inited");
    this.pers.start();
    SmscPropertiesManagement.getInstance("Test");
    SmscPropertiesManagement.getInstance().setSmscStopped(false);
    SmscPropertiesManagement.getInstance().setStoreAndForwordMode(StoreAndForwordMode.normal);
    MProcManagement.getInstance("Test");
    HttpUsersManagement usersManagement = HttpUsersManagement.getInstance("Test");
    if (usersManagement.getHttpUserByName("user_4321") == null) {
        // add if not exists
        usersManagement.createHttpUser("user_4321", "password", 0);
    }
    this.sbb = new TxHttpServerSbbProxy(this.pers);
}
Also used : PersistenceRAInterfaceProxy(org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy) HttpUsersManagement(org.mobicents.smsc.domain.HttpUsersManagement) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with PersistenceRAInterfaceProxy

use of org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy in project smscgateway by RestComm.

the class TxSmppServerSbbTest method setUpClass.

@BeforeMethod
public void setUpClass() throws Exception {
    System.out.println("setUpClass");
    this.pers = new PersistenceRAInterfaceProxy();
    this.cassandraDbInited = this.pers.testCassandraAccess();
    if (!this.cassandraDbInited)
        return;
    this.pers.start();
    this.sbb = new TxSmppServerSbbProxy(this.pers);
    SmscPropertiesManagement.getInstance("Test");
    SmscPropertiesManagement.getInstance().setSmscStopped(false);
    SmscPropertiesManagement.getInstance().setStoreAndForwordMode(StoreAndForwordMode.normal);
    MProcManagement.getInstance("Test");
}
Also used : PersistenceRAInterfaceProxy(org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with PersistenceRAInterfaceProxy

use of org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy in project smscgateway by RestComm.

the class RxSmppServerSbbTest method setUpClass.

@BeforeMethod
public void setUpClass() throws Exception {
    System.out.println("setUpClass");
    this.pers = new PersistenceRAInterfaceProxy();
    this.cassandraDbInited = this.pers.testCassandraAccess();
    if (!this.cassandraDbInited)
        return;
    this.pers.start();
    this.sbb = new RxSmppServerSbbProxy(this.pers);
    SmscPropertiesManagement.getInstance("Test");
    SmscPropertiesManagement.getInstance().setSmscStopped(false);
    SmscPropertiesManagement.getInstance().setStoreAndForwordMode(StoreAndForwordMode.normal);
    MProcManagement.getInstance("Test");
    EsmeManagementProxy2 esmeManagement = new EsmeManagementProxy2();
    EsmeManagementProxy.init((EsmeManagement) esmeManagement);
    int windowSize = SmppConstants.DEFAULT_WINDOW_SIZE;
    long connectTimeout = SmppConstants.DEFAULT_CONNECT_TIMEOUT;
    long requestExpiryTimeout = SmppConstants.DEFAULT_REQUEST_EXPIRY_TIMEOUT;
    long clientBindTimeout = SmppConstants.DEFAULT_BIND_TIMEOUT;
    long windowMonitorInterval = SmppConstants.DEFAULT_WINDOW_MONITOR_INTERVAL;
    long windowWaitTimeout = SmppConstants.DEFAULT_WINDOW_WAIT_TIMEOUT;
    // try {
    // esmeManagement.destroyEsme("Esme_1");
    // } catch (Exception e) {
    // }
    // esme = esmeManagement.createEsme("Esme_1", "Esme_systemId_1", "pwd", "host", 10, false, SmppBindType.TRANSCEIVER.toString(), null,
    // SmppInterfaceVersionType.SMPP34.toString(), (byte) -1, (byte) -1, null, SmppSession.Type.CLIENT.toString(), windowSize, connectTimeout,
    // requestExpiryTimeout, windowMonitorInterval, windowWaitTimeout, "Esme_1", true, 30000, -1, -1, "^[0-9a-zA-Z]*", -1, -1, "^[0-9a-zA-Z]*", 0, 0,
    // 0, 0, 0, -1, -1, -1, -1);
    // DefaultSmppSessionProxy smppSession = new DefaultSmppSessionProxy(null, null, null, null, 0L, null, (byte) 0, null);
    // esme.setSmppSession(smppSession);
    // public Esme createEsme(String name, String systemId, String password, String host, int port,
    // boolean chargingEnabled, String smppBindType, String systemType, String smppIntVersion, byte ton, byte npi, String address,
    // String smppSessionType, int windowSize, long connectTimeout, long requestExpiryTimeout, long windowMonitorInterval,
    // long windowWaitTimeout, String clusterName, boolean countersEnabled, int enquireLinkDelay, int enquireLinkDelayServer, long linkDropServer int sourceTon,
    // int sourceNpi, String sourceAddressRange, int routingTon, int routingNpi, String routingAddressRange,
    // int networkId, long rateLimitPerSecond, long rateLimitPerMinute, long rateLimitPerHour, long rateLimitPerDay,
    // int nationalLanguageSingleShift, int nationalLanguageLockingShift, int minMessageLength,
    // int maxMessageLength)
    // throws Exception;
    // 
    esme = new Esme("Esme_1", "Esme_systemId_1", "pwd", "host", 0, false, null, SmppInterfaceVersionType.SMPP34, -1, -1, null, SmppBindType.TRANSCEIVER, SmppSession.Type.CLIENT, windowSize, connectTimeout, requestExpiryTimeout, clientBindTimeout, windowMonitorInterval, windowWaitTimeout, "Esme_1", true, 30000, 0, 0L, -1, -1, "^[0-9a-zA-Z]*", -1, -1, "^[0-9a-zA-Z]*", 0, false, 0, 0, 0, 0, -1, -1, 0, -1, -1, -1, -1);
    SmsSetCache.getInstance().clearProcessingSmsSet();
    sbb.setMaxMessagesPerStep(2);
}
Also used : Esme(org.restcomm.smpp.Esme) PersistenceRAInterfaceProxy(org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 4 with PersistenceRAInterfaceProxy

use of org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy in project smscgateway by RestComm.

the class MtTest method setUpMethod.

@BeforeMethod
public void setUpMethod() throws Exception {
    System.out.println("setUpMethod");
    SmscPropertiesManagement smscPropertiesManagement = SmscPropertiesManagement.getInstance("Test");
    smscPropertiesManagement.setServiceCenterGt("1111");
    smscPropertiesManagement.setServiceCenterSsn(8);
    smscPropertiesManagement.setHlrSsn(6);
    smscPropertiesManagement.setMscSsn(8);
    MapVersionCache mvc = MapVersionCache.getInstance("test");
    mvc.forceClear();
    this.pers = new PersistenceRAInterfaceProxy();
    this.cassandraDbInited = this.pers.testCassandraAccess();
    if (!this.cassandraDbInited)
        return;
    this.pers.start();
    this.mtSbb = new MtSbbProxy(this.pers);
    this.rsdsSbb = new RsdsSbbProxy(this.pers);
    this.sriSbb = new SriSbbProxy(this.pers, this.mtSbb, this.rsdsSbb);
    this.mtSbb.setSriSbbProxy(this.sriSbb);
    this.mtSbb.setRsdsSbbProxy(rsdsSbb);
    SmsSetCache.getInstance().clearProcessingSmsSet();
    SmscPropertiesManagement.getInstance().setSmscStopped(false);
    SmscPropertiesManagement.getInstance().setStoreAndForwordMode(StoreAndForwordMode.normal);
}
Also used : MapVersionCache(org.mobicents.smsc.domain.MapVersionCache) SmscPropertiesManagement(org.mobicents.smsc.domain.SmscPropertiesManagement) PersistenceRAInterfaceProxy(org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 5 with PersistenceRAInterfaceProxy

use of org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy in project smscgateway by RestComm.

the class MoSbbTest method setUpClass.

// private byte[] msg = { 11, 12, 13, 14, 15, 15 };
@BeforeMethod
public void setUpClass() throws Exception {
    System.out.println("setUpClass");
    this.pers = new PersistenceRAInterfaceProxy();
    this.cassandraDbInited = this.pers.testCassandraAccess();
    if (!this.cassandraDbInited)
        return;
    this.pers.start();
    MProcManagement.getInstance("TestMo");
    SmscPropertiesManagement.getInstance("Test");
    SmscPropertiesManagement.getInstance().setSmscStopped(false);
    SmscPropertiesManagement.getInstance().setStoreAndForwordMode(StoreAndForwordMode.normal);
    try {
        MProcManagement.getInstance().destroyMProcRule(1);
        MProcManagement.getInstance().destroyMProcRule(2);
        MProcManagement.getInstance().destroyMProcRule(3);
    } catch (Exception e) {
    }
    this.sbb = new MoSbbProxy(this.pers);
}
Also used : PersistenceRAInterfaceProxy(org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

PersistenceRAInterfaceProxy (org.mobicents.smsc.slee.resources.persistence.PersistenceRAInterfaceProxy)8 BeforeMethod (org.testng.annotations.BeforeMethod)8 SmscPropertiesManagement (org.mobicents.smsc.domain.SmscPropertiesManagement)2 HttpUsersManagement (org.mobicents.smsc.domain.HttpUsersManagement)1 MapVersionCache (org.mobicents.smsc.domain.MapVersionCache)1 Esme (org.restcomm.smpp.Esme)1 GenerateType (org.restcomm.smpp.GenerateType)1