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 jain-slee.diameter by RestComm.
the class HSSClientChildSbb method setSbbContext.
/*
* (non-Javadoc)
* @see javax.slee.Sbb#setSbbContext(javax.slee.SbbContext)
*/
@Override
public void setSbbContext(SbbContext sbbContext) {
this.sbbContext = (SbbContextExt) sbbContext;
if (tracer == null) {
tracer = sbbContext.getTracer(HSSClientChildSbb.class.getSimpleName());
}
try {
Context context = (Context) new InitialContext().lookup("java:comp/env");
diameterShClientSbbInterface = (ShClientProvider) context.lookup("slee/resources/diameter-sh-client-ra-interface");
diameterShClientACIF = (ShClientActivityContextInterfaceFactory) context.lookup("slee/resources/JDiameterShClientResourceAdaptor/java.net/0.8.1/acif");
diameterShClientMessageFactory = diameterShClientSbbInterface.getClientMessageFactory();
diameterShClientAvpFactory = diameterShClientSbbInterface.getClientAvpFactory();
} catch (NamingException e) {
tracer.severe("Can't set sbb context.", e);
}
}
use of javax.slee.SbbContext in project smscgateway by RestComm.
the class TxSmppServerSbb method setSbbContext.
// *********
// SBB staff
@Override
public void setSbbContext(SbbContext sbbContext) {
super.setSbbContext(sbbContext);
try {
Context ctx = (Context) new InitialContext().lookup("java:comp/env");
this.smppServerTransactionACIFactory = (SmppTransactionACIFactory) ctx.lookup("slee/resources/smppp/server/1.0/acifactory");
this.smppServerSessions = (SmppSessions) ctx.lookup("slee/resources/smpp/server/1.0/provider");
} catch (Exception ne) {
logger.severe("Could not set SBB context:", ne);
}
}
use of javax.slee.SbbContext 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
}
use of javax.slee.SbbContext in project smscgateway by RestComm.
the class AlertSbb 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.logger = this.sbbContext.getTracer(AlertSbb.class.getSimpleName());
this.persistence = (PersistenceRAInterface) this.sbbContext.getResourceAdaptorInterface(PERSISTENCE_ID, PERSISTENCE_LINK);
this.scheduler = (SchedulerRaSbbInterface) this.sbbContext.getResourceAdaptorInterface(SCHEDULER_ID, SCHEDULER_LINK);
} catch (Exception ne) {
logger.severe("Could not set SBB context:", ne);
}
}
Aggregations