Search in sources :

Example 1 with ParameterFactoryImpl

use of org.restcomm.protocols.ss7.sccp.impl.parameter.ParameterFactoryImpl in project smscgateway by RestComm.

the class RsdsSbb method setSbbContext.

@Override
public void setSbbContext(SbbContext sbbContext) {
    this.sbbContext = (SbbContextExt) sbbContext;
    try {
        Context ctx = (Context) new InitialContext().lookup("java:comp/env");
        this.mapAcif = (MAPContextInterfaceFactory) ctx.lookup("slee/resources/map/2.0/acifactory");
        this.mapProvider = (MAPProvider) ctx.lookup("slee/resources/map/2.0/provider");
        this.mapParameterFactory = this.mapProvider.getMAPParameterFactory();
        this.mapSmsTpduParameterFactory = this.mapProvider.getMAPSmsTpduParameterFactory();
        this.logger = this.sbbContext.getTracer(this.className);
        this.persistence = (PersistenceRAInterface) this.sbbContext.getResourceAdaptorInterface(PERSISTENCE_ID, PERSISTENCE_LINK);
        this.sccpParameterFact = new ParameterFactoryImpl();
    } catch (Exception ne) {
        logger.severe("Could not set SBB context:", ne);
    }
// TODO : Handle proper error
}
Also used : Context(javax.naming.Context) InitialContext(javax.naming.InitialContext) EventContext(javax.slee.EventContext) SbbContext(javax.slee.SbbContext) RolledBackContext(javax.slee.RolledBackContext) MAPApplicationContext(org.restcomm.protocols.ss7.map.api.MAPApplicationContext) ParameterFactoryImpl(org.restcomm.protocols.ss7.sccp.impl.parameter.ParameterFactoryImpl) InitialContext(javax.naming.InitialContext) CreateException(javax.slee.CreateException) MAPException(org.restcomm.protocols.ss7.map.api.MAPException)

Example 2 with ParameterFactoryImpl

use of org.restcomm.protocols.ss7.sccp.impl.parameter.ParameterFactoryImpl in project smscgateway by RestComm.

the class MtCommonSbb method setSbbContext.

// *********
// SBB staff
@Override
public void setSbbContext(SbbContext sbbContext) {
    super.setSbbContext(sbbContext);
    try {
        Context ctx = (Context) new InitialContext().lookup("java:comp/env");
        this.mapAcif = (MAPContextInterfaceFactory) ctx.lookup("slee/resources/map/2.0/acifactory");
        this.mapProvider = (MAPProvider) ctx.lookup("slee/resources/map/2.0/provider");
        this.mapParameterFactory = this.mapProvider.getMAPParameterFactory();
        this.mapSmsTpduParameterFactory = this.mapProvider.getMAPSmsTpduParameterFactory();
        this.sccpParameterFact = new ParameterFactoryImpl();
    } catch (Exception ne) {
        logger.severe("Could not set SBB context:", ne);
    }
}
Also used : InitialContext(javax.naming.InitialContext) SbbContext(javax.slee.SbbContext) Context(javax.naming.Context) MAPApplicationContext(org.restcomm.protocols.ss7.map.api.MAPApplicationContext) ParameterFactoryImpl(org.restcomm.protocols.ss7.sccp.impl.parameter.ParameterFactoryImpl) InitialContext(javax.naming.InitialContext) MAPException(org.restcomm.protocols.ss7.map.api.MAPException)

Example 3 with ParameterFactoryImpl

use of org.restcomm.protocols.ss7.sccp.impl.parameter.ParameterFactoryImpl in project smscgateway by RestComm.

the class HomeRoutingCommonSbb method setSbbContext.

@Override
public void setSbbContext(SbbContext sbbContext) {
    this.sbbContext = (SbbContextExt) sbbContext;
    try {
        Context ctx = (Context) new InitialContext().lookup("java:comp/env");
        this.mapAcif = (MAPContextInterfaceFactory) ctx.lookup("slee/resources/map/2.0/acifactory");
        this.mapProvider = (MAPProvider) ctx.lookup("slee/resources/map/2.0/provider");
        this.mapParameterFactory = this.mapProvider.getMAPParameterFactory();
        this.mapErrorMessageFactory = this.mapProvider.getMAPErrorMessageFactory();
        this.sccpParameterFact = new ParameterFactoryImpl();
        // this.smppServerSessions = (SmppSessions) ctx
        // .lookup("slee/resources/smpp/server/1.0/provider");
        this.persistence = (PersistenceRAInterface) this.sbbContext.getResourceAdaptorInterface(PERSISTENCE_ID, PERSISTENCE_LINK);
        this.logger = this.sbbContext.getTracer(this.className);
        itsMProcRa = (MProcRuleRaProvider) this.sbbContext.getResourceAdaptorInterface(MPROC_RATYPE_ID, MPROC_RA_LINK);
    } catch (Exception ne) {
        logger.severe("Could not set SBB context:", ne);
    }
// TODO : Handle proper error
}
Also used : Context(javax.naming.Context) InitialContext(javax.naming.InitialContext) SbbContext(javax.slee.SbbContext) RolledBackContext(javax.slee.RolledBackContext) ParameterFactoryImpl(org.restcomm.protocols.ss7.sccp.impl.parameter.ParameterFactoryImpl) InitialContext(javax.naming.InitialContext) CreateException(javax.slee.CreateException)

Aggregations

Context (javax.naming.Context)3 InitialContext (javax.naming.InitialContext)3 SbbContext (javax.slee.SbbContext)3 ParameterFactoryImpl (org.restcomm.protocols.ss7.sccp.impl.parameter.ParameterFactoryImpl)3 CreateException (javax.slee.CreateException)2 RolledBackContext (javax.slee.RolledBackContext)2 MAPApplicationContext (org.restcomm.protocols.ss7.map.api.MAPApplicationContext)2 MAPException (org.restcomm.protocols.ss7.map.api.MAPException)2 EventContext (javax.slee.EventContext)1