public void setSbbContext(SbbContext context) { sbbContext = (SbbContextExt) context; if (tracer == null) { tracer = this.sbbContext.getTracer("RESTClientEnabler"); } this.httpClientActivityContextInterfaceFactory = (HttpClientActivityContextInterfaceFactory) sbbContext .getActivityContextInterfaceFactory(HttpClientActivityContextInterfaceFactory.RESOURCE_ADAPTOR_TYPE_ID); this.httpProvider = (HttpClientResourceAdaptorSbbInterface) sbbContext .getResourceAdaptorInterface( HttpClientResourceAdaptorSbbInterface.RESOURCE_ADAPTOR_TYPE_ID, "HttpClientResourceAdaptor"); }
/** * @return */ private ServerTransaction getRegisterTransactionToReply() { ActivityContextInterface[] acis = this.sbbContextExt.getActivities(); Object activity = null; for (ActivityContextInterface aci : acis) { activity = aci.getActivity(); if (activity instanceof ServerTransaction) { // detach to not handle the activity end aci.detach(sbbContextExt.getSbbLocalObject()); return (ServerTransaction) activity; } } return null; }
public void setSbbContext(SbbContext context) { sbbContext = (SbbContextExt) context; sipActivityContextInterfaceFactory = (SipActivityContextInterfaceFactory) sbbContext .getActivityContextInterfaceFactory(sipRATypeID); sleeSipProvider = (SleeSipProvider) sbbContext .getResourceAdaptorInterface(sipRATypeID, sipRALink); addressFactory = sleeSipProvider.getAddressFactory(); headerFactory = sleeSipProvider.getHeaderFactory(); messageFactory = sleeSipProvider.getMessageFactory(); timerFacility = sbbContext.getTimerFacility(); }
public void setSbbContext(SbbContext context) { this.sbbContextExt = (SbbContextExt) context; this.tracer = sbbContextExt.getTracer("CS-Core"); this.timerFacility = this.sbbContextExt.getTimerFacility(); ResourceAdaptorTypeID raTypeID = new ResourceAdaptorTypeID("Diameter Ro", "java.net", "0.8.1"); this.roProvider = (RoProvider) sbbContextExt.getResourceAdaptorInterface(raTypeID, "DiameterRo"); //this.roAcif = (RoActivityContextInterfaceFactory) sbbContextExt.getActivityContextInterfaceFactory(raTypeID); this.avpFactory = this.roProvider.getRoAvpFactory(); }
private void returnSriSuccess(CorrelationIdValue correlationIdValue) { int inProcess = this.getInProcess(); if (inProcess == 0) // SriSucess or Failure is already processed return; HrSriClientSbbLocalObject local = (HrSriClientSbbLocalObject) super.sbbContext.getSbbLocalObject(); HrSriResultInterface parent = (HrSriResultInterface) local.getParent(); parent.onSriSuccess(correlationIdValue, false); }
public void setSbbContext(SbbContext sbbContext) { this.sbbContext = (SbbContextExt) sbbContext; this.logger = sbbContext.getTracer(this.loggerName); try { mapAcif = (MAPContextInterfaceFactory) this.sbbContext.getActivityContextInterfaceFactory(mapRATypeID); mapProvider = (MAPProvider) this.sbbContext.getResourceAdaptorInterface(mapRATypeID, mapRaLink); mapParameterFactory = mapProvider.getMAPParameterFactory(); } catch (Exception ne) { logger.severe("Could not set SBB context:", ne); } }
@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); } }
@Override public void setSbbContext(SbbContext context) { // SLEE this.tracer = context.getTracer("SipRegistrar"); this.sbbContextExt = (SbbContextExt) context; this.nullActivityContextInterfaceFactory = this.sbbContextExt .getNullActivityContextInterfaceFactory(); this.activityContextNamingFacility = this.sbbContextExt .getActivityContextNamingFacility(); this.nullActivityFactory = this.sbbContextExt.getNullActivityFactory(); this.timerFacility = this.sbbContextExt.getTimerFacility(); // get SIP stuff this.sipRA = (SleeSipProvider) this.sbbContextExt .getResourceAdaptorInterface(sipRATypeID, sipRALink); this.messageFactory = this.sipRA.getMessageFactory(); this.headerFactory = this.sipRA.getHeaderFactory(); this.addressFactory = this.sipRA.getAddressFactory(); }
@Override public void setSbbContext(SbbContext sbbContext) { this.sbbContext = (SbbContextExt) sbbContext; this.tracer = this.sbbContext.getTracer(this.className); }
private HttpClientActivity getHTTPClientActivity() { ActivityContextInterface[] acis = this.sbbContext.getActivities(); for (ActivityContextInterface aci : acis) { Object activity = aci.getActivity(); if (activity instanceof HttpClientActivity) { return (HttpClientActivity) activity; } } return null; }
/** * */ private void startExpiresTimer(ActivityContextInterface aci, int expires) { //lets schedule a bit earlier. 5s? if(expires-expiresDrift >0) { expires-=expiresDrift; } sbbContext.getTimerFacility().setTimer(aci,null,System.currentTimeMillis()+expires*1000,TIMER_OPTIONS); }
private void returnSriHrByPass(CorrelationIdValue correlationIdValue) { int inProcess = this.getInProcess(); if (inProcess == 0) // SriSucess or Failure is already processed return; HrSriClientSbbLocalObject local = (HrSriClientSbbLocalObject) super.sbbContext.getSbbLocalObject(); HrSriResultInterface parent = (HrSriResultInterface) local.getParent(); parent.onSriHrByPass(correlationIdValue); }
public void setSbbContext(SbbContext sbbContext) { this.sbbContext = (SbbContextExt) sbbContext; this.logger = sbbContext.getTracer(this.loggerName); try { mapAcif = (MAPContextInterfaceFactory) this.sbbContext.getActivityContextInterfaceFactory(mapRATypeID); mapProvider = (MAPProvider) this.sbbContext.getResourceAdaptorInterface(mapRATypeID, mapRaLink); mapParameterFactory = mapProvider.getMAPParameterFactory(); } catch (Exception ne) { logger.severe("Could not set SBB context:", ne); } }
@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 }
public void setSbbContext(SbbContext context) { this.sbbContext = (SbbContextExt) context; this.tracer = sbbContext.getTracer("CS-RF-SMPL"); }
protected CAPDialog getCAPDialog() { ActivityContextInterface[] acis = this.sbbContext.getActivities(); for (ActivityContextInterface aci : acis) { Object activity = aci.getActivity(); if (activity instanceof CAPDialog) { return (CAPDialog) activity; } } return null; }
/** * */ private void cancelExpiresTimer(ActivityContextInterface aci) { ActivityContextInterfaceExt aciExt = (ActivityContextInterfaceExt) aci; TimerID[] timerIDs = aciExt.getTimers(); if (timerIDs.length > 0) { sbbContext.getTimerFacility().cancelTimer(timerIDs[0]); } }
public void setSbbContext(SbbContext context) { sbbContext = (SbbContextExt) context; if (tracer == null) { tracer = this.sbbContext.getTracer("RESTClientEnabler"); } this.httpClientActivityContextInterfaceFactory = (HttpClientActivityContextInterfaceFactory) sbbContext .getActivityContextInterfaceFactory(HttpClientActivityContextInterfaceFactory.RESOURCE_ADAPTOR_TYPE_ID); this.httpProvider = (HttpClientResourceAdaptorSbbInterface) sbbContext .getResourceAdaptorInterface( HttpClientResourceAdaptorSbbInterface.RESOURCE_ADAPTOR_TYPE_ID, "HttpClientResourceAdaptor"); }
/** * Simple method to create JDBC activity and execute given task. * * @param jdbcTask */ private void executeTask(SimpleJdbcTask jdbcTask) { JdbcActivity jdbcActivity = jdbcRA.createActivity(); ActivityContextInterface jdbcACI = jdbcACIF.getActivityContextInterface(jdbcActivity); jdbcACI.attach(sbbContextExt.getSbbLocalObject()); jdbcActivity.execute(jdbcTask); }
public void setSbbContext(SbbContext sbbContext) { this.sbbContext = (SbbContextExt) sbbContext; this.logger = sbbContext.getTracer("CAMEL-GW"); this.eventsSerializeFactory = new EventsSerializeFactory(); // CAP RA this.capAcif = (CAPContextInterfaceFactory) this.sbbContext.getActivityContextInterfaceFactory(capRATypeID); this.capProvider = (CAPProvider) this.sbbContext.getResourceAdaptorInterface(capRATypeID, capRaLink); this.capParameterFactory = this.capProvider.getCAPParameterFactory(); // HTTP-Client RA this.httpClientActivityContextInterfaceFactory = (HttpClientActivityContextInterfaceFactory) this.sbbContext .getActivityContextInterfaceFactory(httpClientRATypeID); this.httpClientProvider = (HttpClientResourceAdaptorSbbInterface) this.sbbContext.getResourceAdaptorInterface( httpClientRATypeID, httpClientRaLink); camelStatAggregator = CamelStatAggregator.getInstance(); this.timerFacility = this.sbbContext.getTimerFacility(); }