public boolean start() { MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); mapProvider.getMAPServiceSupplementary().acivate(); mapProvider.getMAPServiceSupplementary().addMAPServiceListener(this); mapProvider.addMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "USSD Server has been started", "", Level.INFO); isStarted = true; return true; }
public void start() throws Exception { this.logger.info("Starting MapServerUssdClient ..."); this.mapProvider = this.mapStack.getMAPProvider(); this.mapProvider.addMAPDialogListener(this); this.mapProvider.getMAPServiceSupplementary().addMAPServiceListener(this); this.mapProvider.getMAPServiceSupplementary().acivate(); this.rateLimiterObj = RateLimiter.create(getMaxConcurrentDialogs()); // rate SCCP_CLIENT_ADDRESS = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, CLIENT_SPC, SSN); SCCP_SERVER_ADDRESS = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, SERVER_SPC, SSN); Thread mainThread = new Thread(new MapServerUssdClient_StartClass()); mainThread.start(); this.logger.info("Started MapServerUssdClient ..."); }
private void initMAP() throws Exception { this.mapStack = new MAPStackImpl("TestServer", this.tcapStack.getProvider()); this.mapProvider = this.mapStack.getMAPProvider(); this.mapProvider.addMAPDialogListener(this); this.mapProvider.getMAPServiceSupplementary().addMAPServiceListener(this); this.mapProvider.getMAPServiceSupplementary().acivate(); this.mapStack.start(); }
private void initMAP() throws Exception { // this.mapStack = new MAPStackImpl(this.sccpStack.getSccpProvider(), SSN); this.mapStack = new MAPStackImpl("TestClient", this.tcapStack.getProvider()); this.mapProvider = this.mapStack.getMAPProvider(); this.mapProvider.addMAPDialogListener(this); this.mapProvider.getMAPServiceSupplementary().addMAPServiceListener(this); this.mapProvider.getMAPServiceSupplementary().acivate(); this.mapStack.start(); }
@Override public void stop() { MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); isStarted = false; this.doRemoveDialog(); mapProvider.getMAPServiceSupplementary().deactivate(); mapProvider.getMAPServiceSupplementary().removeMAPServiceListener(this); mapProvider.removeMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "USSD Server has been stopped", "", Level.INFO); }
@Override public void stop() { MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); isStarted = false; if (this.sender != null) { this.sender.stop(); try { this.sender.notify(); } catch (Exception e) { } try { Thread.sleep(100); } catch (InterruptedException e) { } this.sender = null; } this.doRemoveDialog(); mapProvider.getMAPServiceSupplementary().deactivate(); mapProvider.getMAPServiceSupplementary().removeMAPServiceListener(this); mapProvider.removeMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "USSD Client has been stopped", "", Level.INFO); }
private void initMAP() throws Exception { System.out.println("initMAP"); this.mapStack = new MAPStackImpl("Test", this.sccpStack.getSccpProvider(), SSN); this.mapProvider = this.mapStack.getMAPProvider(); System.out.println("this.mapProvider = " + this.mapProvider); this.mapProvider.addMAPDialogListener(this); this.mapProvider.getMAPServiceSms().addMAPServiceListener(this); this.mapProvider.getMAPServiceSms().acivate(); this.mapStack.start(); this.mapStack.getMAPProvider().getMAPServiceSupplementary().acivate(); }
public boolean start() { this.countSriReq = 0; this.countSriResp = 0; this.countErrSent = 0; this.countProcUnstReq = 0; this.countProcUnstResp = 0; this.countProcUnstReqNot = 0; this.countUnstReq = 0; this.countUnstResp = 0; this.countUnstNotifReq = 0; this.countErrSent = 0; this.countErrSent = 0; MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); mapProvider.getMAPServiceSupplementary().acivate(); mapProvider.getMAPServiceSupplementary().addMAPServiceListener(this); mapProvider.getMAPServiceSms().acivate(); mapProvider.getMAPServiceSms().addMAPServiceListener(this); mapProvider.addMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "USSD Client has been started", "", Level.INFO); isStarted = true; if (this.testerHost.getConfigurationData().getTestUssdClientConfigurationData().getUssdClientAction().intValue() == UssdClientAction.VAL_AUTO_SendProcessUnstructuredSSRequest) { nbConcurrentDialogs = new AtomicInteger(); this.sender = new MessageSender(); Thread thr = new Thread(this.sender); thr.start(); } return true; }
@Override public String performUnstructuredRequest(String msg) { if (!isStarted) return "The tester is not started"; if (msg == null || msg.equals("")) return "USSD message is empty"; MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); MAPDialogSupplementary curDialog = currentDialog; try { if (curDialog == null) { MAPApplicationContext mapUssdAppContext = MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext, MAPApplicationContextVersion.version2); curDialog = mapProvider.getMAPServiceSupplementary().createNewDialog(mapUssdAppContext, this.mapMan.createOrigAddress(), this.mapMan.createOrigReference(), this.mapMan.createDestAddress(), this.mapMan.createDestReference()); currentDialog = curDialog; } DialogData dd = (DialogData) curDialog.getUserObject(); if (dd == null) { dd = new DialogData(); curDialog.setUserObject(dd); } String res = this.sendUnstructuredRequest(curDialog, msg); curDialog.send(); return res; } catch (Exception e) { this.testerHost.sendNotif(SOURCE_NAME, "Exception when invoking send() : " + e.getMessage(), e, Level.ERROR); return "Exception when sending UnstructuredSSRequest: " + e.toString(); } }
this.realProvider.getMAPServiceOam().addMAPServiceListener(this); this.realProvider.getMAPServicePdpContextActivation().addMAPServiceListener(this); this.realProvider.getMAPServiceSupplementary().addMAPServiceListener(this); this.realProvider.getMAPServiceSms().addMAPServiceListener(this); this.realProvider.getMAPServiceLsm().addMAPServiceListener(this); this.realProvider.getMAPServiceOam().acivate(); this.realProvider.getMAPServicePdpContextActivation().acivate(); this.realProvider.getMAPServiceSupplementary().acivate(); this.realProvider.getMAPServiceSms().acivate(); this.realProvider.getMAPServiceLsm().acivate();
public void setWrappedProvider(MAPProvider wrappedProvider) { this.wrappedProvider = wrappedProvider; this.wrappedMAPServiceMobility = new MAPServiceMobilityWrapper(this, wrappedProvider.getMAPServiceMobility()); this.wrappedMAPServiceCallHandling = new MAPServiceCallHandlingWrapper(this, wrappedProvider.getMAPServiceCallHandling()); this.wrappedMAPServiceOam = new MAPServiceOamWrapper(this, wrappedProvider.getMAPServiceOam()); this.wrappedMAPServicePdpContextActivation = new MAPServicePdpContextActivationWrapper(this, wrappedProvider.getMAPServicePdpContextActivation()); this.wrappedUSSD = new MAPServiceSupplementaryWrapper(this, wrappedProvider.getMAPServiceSupplementary()); this.wrappedLSM = new MAPServiceLsmWrapper(this, wrappedProvider.getMAPServiceLsm()); this.wrappedSMS = new MAPServiceSmsWrapper(this, wrappedProvider.getMAPServiceSms()); }
MAPDialogSupplementary mapDialog = this.mapProvider.getMAPServiceSupplementary().createNewDialog( MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext, MAPApplicationContextVersion.version2), SCCP_CLIENT_ADDRESS, origRef, SCCP_SERVER_ADDRESS, destRef);
AddressString destRef = this.mapProvider.getMAPParameterFactory().createAddressString( AddressNature.international_number, NumberingPlan.ISDN, "67890"); MAPDialogSupplementary mapDialog = this.mapProvider.getMAPServiceSupplementary().createNewDialog( MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext, MAPApplicationContextVersion.version2), SCCP_CLIENT_ADDRESS, origRef, SCCP_SERVER_ADDRESS, destRef);
public void raInactive() { if (tracer.isFineEnabled()) tracer.fine("raInactive"); if (tracer.isFineEnabled()) { tracer.fine("MAP Resource Adaptor - inactivating"); } this.realProvider.getMAPServiceMobility().deactivate(); this.realProvider.getMAPServiceCallHandling().deactivate(); this.realProvider.getMAPServiceOam().deactivate(); this.realProvider.getMAPServicePdpContextActivation().deactivate(); this.realProvider.getMAPServiceSupplementary().deactivate(); this.realProvider.getMAPServiceLsm().deactivate(); this.realProvider.getMAPServiceSms().deactivate(); this.realProvider.getMAPServiceMobility().removeMAPServiceListener(this); this.realProvider.getMAPServiceCallHandling().removeMAPServiceListener(this); this.realProvider.getMAPServiceOam().removeMAPServiceListener(this); this.realProvider.getMAPServicePdpContextActivation().removeMAPServiceListener(this); this.realProvider.getMAPServiceSupplementary().removeMAPServiceListener(this); this.realProvider.getMAPServiceLsm().removeMAPServiceListener(this); this.realProvider.getMAPServiceSms().removeMAPServiceListener(this); this.realProvider.removeMAPDialogListener(this); if (tracer.isInfoEnabled()) { tracer.info("MAP Resource Adaptor entity inactive."); } }
MAPApplicationContextVersion.version2); curDialog = mapProvider.getMAPServiceSupplementary().createNewDialog(mapUssdAppContext, this.mapMan.createOrigAddress(), this.mapMan.createOrigReference(), this.mapMan.createDestAddress(), this.mapMan.createDestReference()); currentDialog = curDialog;
MAPDialogSupplementary curDialog = mapProvider.getMAPServiceSupplementary().createNewDialog(mapUssdAppContext, this.mapMan.createOrigAddress(), this.mapMan.createOrigReference(), this.mapMan.createDestAddress(), this.mapMan.createDestReference());