Search in sources :

Example 1 with SmsRoutingRuleType

use of org.mobicents.smsc.cassandra.SmsRoutingRuleType in project smscgateway by RestComm.

the class DatabaseSmsRoutingRule method updateDbSmsRoutingRule.

@Override
public void updateDbSmsRoutingRule(String dbSmsRoutingRuleTypeStr, String address, int networkId, String clusterName) throws PersistenceException {
    SmsRoutingRuleType dbSmsRoutingRuleType = SmsRoutingRuleType.valueOf(dbSmsRoutingRuleTypeStr);
    DbSmsRoutingRule dbSmsRoutingRule = new DbSmsRoutingRule(dbSmsRoutingRuleType, address, networkId, clusterName);
    switch(dbSmsRoutingRuleType) {
        case SMPP:
            dbOperations_C2.c2_updateSmppSmsRoutingRule(dbSmsRoutingRule);
            break;
        case SIP:
            dbOperations_C2.c2_updateSipSmsRoutingRule(dbSmsRoutingRule);
            break;
        default:
            throw new PersistenceException("Unknown DbSmsRoutingRuleType=" + dbSmsRoutingRuleType);
    }
// }
}
Also used : PersistenceException(org.mobicents.smsc.cassandra.PersistenceException) SmsRoutingRuleType(org.mobicents.smsc.cassandra.SmsRoutingRuleType) DbSmsRoutingRule(org.mobicents.smsc.library.DbSmsRoutingRule)

Aggregations

PersistenceException (org.mobicents.smsc.cassandra.PersistenceException)1 SmsRoutingRuleType (org.mobicents.smsc.cassandra.SmsRoutingRuleType)1 DbSmsRoutingRule (org.mobicents.smsc.library.DbSmsRoutingRule)1