use of javax.slee.SbbContext in project charging-server by RestComm.
the class HTTPClientSbb method setSbbContext.
/*
* (non-Javadoc)
*
* @see javax.slee.Sbb#setSbbContext(javax.slee.SbbContext)
*/
public void setSbbContext(SbbContext context) {
this.sbbContext = (SbbContextExt) context;
this.tracer = sbbContext.getTracer("CS-RF-HTTP");
try {
Context ctx = (Context) new InitialContext().lookup("java:comp/env");
httpClientAci = (HttpClientActivityContextInterfaceFactory) ctx.lookup("slee/resources/http-client/acifactory");
raSbbInterface = (HttpClientResourceAdaptorSbbInterface) ctx.lookup("slee/resources/http-client/sbbinterface");
httpURLString = (String) ctx.lookup("HTTPURL");
} catch (NamingException ne) {
tracer.severe("Could not set SBB context:", ne);
}
}
use of javax.slee.SbbContext in project smscgateway by RestComm.
the class ChargingSbb method setSbbContext.
@Override
public void setSbbContext(SbbContext sbbContext) {
this.sbbContext = (SbbContextExt) sbbContext;
try {
Context ctx = (Context) new InitialContext().lookup("java:comp/env");
this.logger = this.sbbContext.getTracer(getClass().getSimpleName());
if (logger.isFineEnabled()) {
logger.fine("setSbbContext invoked.");
}
this.roProvider = (RoProvider) this.sbbContext.getResourceAdaptorInterface(DIAMETER_ID, LINK_DIAM);
roMessageFactory = roProvider.getRoMessageFactory();
avpFactory = roProvider.getRoAvpFactory();
acif = (RoActivityContextInterfaceFactory) ctx.lookup("slee/resources/JDiameterRoResourceAdaptor/java.net/0.8.1/acif");
// SLEE Facilities
timerFacility = (TimerFacility) ctx.lookup("slee/facilities/timer");
nullActivityFactory = (NullActivityFactory) ctx.lookup("slee/nullactivity/factory");
nullACIFactory = (NullActivityContextInterfaceFactory) ctx.lookup("slee/nullactivity/activitycontextinterfacefactory");
this.persistence = (PersistenceRAInterface) this.sbbContext.getResourceAdaptorInterface(PERSISTENCE_ID, LINK_PERS);
this.scheduler = (SchedulerRaSbbInterface) this.sbbContext.getResourceAdaptorInterface(SCHEDULER_ID, SCHEDULER_LINK);
itsMProcRa = (MProcRuleRaProvider) this.sbbContext.getResourceAdaptorInterface(MPROC_RATYPE_ID, MPROC_RA_LINK);
} catch (Exception ne) {
logger.severe("Could not set SBB context:", ne);
}
}
use of javax.slee.SbbContext 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
}
use of javax.slee.SbbContext in project smscgateway by RestComm.
the class RxSmppServerSbb method setSbbContext.
// *********
// SBB staff
@Override
public void setSbbContext(SbbContext sbbContext) {
super.setSbbContext(sbbContext);
try {
Context ctx = (Context) new InitialContext().lookup("java:comp/env");
maxMessagesPerStep = ((Integer) ctx.lookup("maxMessagesPerStep"));
this.smppServerTransactionACIFactory = (SmppTransactionACIFactory) ctx.lookup("slee/resources/smppp/server/1.0/acifactory");
this.smppServerSessions = (SmppSessions) ctx.lookup("slee/resources/smpp/server/1.0/provider");
MAPProvider mapProvider = (MAPProvider) ctx.lookup("slee/resources/map/2.0/provider");
this.mapSmsTpduParameterFactory = mapProvider.getMAPSmsTpduParameterFactory();
} catch (Exception ne) {
logger.severe("Could not set SBB context:", ne);
}
}
use of javax.slee.SbbContext in project smscgateway by RestComm.
the class MoCommonSbb 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();
} catch (Exception ne) {
logger.severe("Could not set SBB context:", ne);
}
}
Aggregations