private void registerSSRequest(Parameter parameter, MAPDialogSupplementaryImpl mapDialogImpl, Long invokeId) throws MAPParsingComponentException { if (parameter == null) throw new MAPParsingComponentException("Error while decoding registerSSRequest: Parameter is mandatory but not found", MAPParsingComponentExceptionReason.MistypedParameter); if (parameter.getTag() != Tag.SEQUENCE || parameter.getTagClass() != Tag.CLASS_UNIVERSAL || parameter.isPrimitive()) throw new MAPParsingComponentException( "Error while decoding registerSSRequest: Bad tag or tagClass or parameter is primitive, received tag=" + parameter.getTag(), MAPParsingComponentExceptionReason.MistypedParameter); byte[] buf = parameter.getData(); AsnInputStream ais = new AsnInputStream(buf, parameter.getTagClass(), parameter.isPrimitive(), parameter.getTag()); RegisterSSRequestImpl ind = new RegisterSSRequestImpl(); ind.decodeData(ais, buf.length); ind.setInvokeId(invokeId); ind.setMAPDialog(mapDialogImpl); for (MAPServiceListener serLis : this.serviceListeners) { try { serLis.onMAPMessage(ind); ((MAPServiceSupplementaryListener) serLis).onRegisterSSRequest(ind); } catch (Exception e) { loger.error("Error processing registerSSRequest: " + e.getMessage(), e); } } }
public void addProcessUnstructuredSSResponse(long invokeId, CBSDataCodingScheme ussdDataCodingScheme, USSDString ussdString) throws MAPException { Return returnResult = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); returnResult.setInvokeId(invokeId); // Operation Code OperationCode oc = TcapFactory.createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.processUnstructuredSS_Request); returnResult.setOperationCode(oc); ProcessUnstructuredSSResponseImpl req = new ProcessUnstructuredSSResponseImpl(ussdDataCodingScheme, ussdString); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); returnResult.setParameter(p); this.sendReturnResultLastComponent((ReturnResultLast) returnResult); }
public void addUnstructuredSSResponse(long invokeId, CBSDataCodingScheme ussdDataCodingScheme, USSDString ussdString) throws MAPException { Return returnResult = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); returnResult.setInvokeId(invokeId); // Operation Code OperationCode oc = TcapFactory.createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.unstructuredSS_Request); returnResult.setOperationCode(oc); if (ussdString != null) { UnstructuredSSResponseImpl req = new UnstructuredSSResponseImpl(ussdDataCodingScheme, ussdString); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); returnResult.setParameter(p); } this.sendReturnResultLastComponent((ReturnResultLast) returnResult); }
@Override public void addInterrogateSSResponse_BasicServiceGroupList(long invokeId, ArrayList<BasicServiceCode> basicServiceGroupList) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext) || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2) throw new MAPException("Bad application context name for addInterrogateSSResponse: must be networkFunctionalSsContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.interrogateSS); resultLast.setOperationCode(oc); InterrogateSSResponseImpl req = new InterrogateSSResponseImpl(basicServiceGroupList, false); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); this.sendReturnResultLastComponent(resultLast); }
private void deactivateSSRequest(Parameter parameter, MAPDialogSupplementaryImpl mapDialogImpl, Long invokeId) throws MAPParsingComponentException { if (parameter == null) throw new MAPParsingComponentException("Error while decoding deactivateSSRequest: Parameter is mandatory but not found", MAPParsingComponentExceptionReason.MistypedParameter); if (parameter.getTag() != Tag.SEQUENCE || parameter.getTagClass() != Tag.CLASS_UNIVERSAL || parameter.isPrimitive()) throw new MAPParsingComponentException( "Error while decoding deactivateSSRequest: Bad tag or tagClass or parameter is primitive, received tag=" + parameter.getTag(), MAPParsingComponentExceptionReason.MistypedParameter); byte[] buf = parameter.getData(); AsnInputStream ais = new AsnInputStream(buf, parameter.getTagClass(), parameter.isPrimitive(), parameter.getTag()); DeactivateSSRequestImpl ind = new DeactivateSSRequestImpl(); ind.decodeData(ais, buf.length); ind.setInvokeId(invokeId); ind.setMAPDialog(mapDialogImpl); for (MAPServiceListener serLis : this.serviceListeners) { try { serLis.onMAPMessage(ind); ((MAPServiceSupplementaryListener) serLis).onDeactivateSSRequest(ind); } catch (Exception e) { loger.error("Error processing onDeactivateSSRequest: " + e.getMessage(), e); } } }
@Override public void addRegisterPasswordResponse(long invokeId, Password password) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext) || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2) throw new MAPException("Bad application context name for addRegisterPasswordResponse: must be networkFunctionalSsContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.registerPassword); resultLast.setOperationCode(oc); RegisterPasswordResponseImpl req = new RegisterPasswordResponseImpl(password); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); this.sendReturnResultLastComponent(resultLast); }
private void interrogateSSRequest(Parameter parameter, MAPDialogSupplementaryImpl mapDialogImpl, Long invokeId) throws MAPParsingComponentException { if (parameter == null) throw new MAPParsingComponentException("Error while decoding interrogateSSRequest: Parameter is mandatory but not found", MAPParsingComponentExceptionReason.MistypedParameter); if (parameter.getTag() != Tag.SEQUENCE || parameter.getTagClass() != Tag.CLASS_UNIVERSAL || parameter.isPrimitive()) throw new MAPParsingComponentException( "Error while decoding interrogateSSRequest: Bad tag or tagClass or parameter is primitive, received tag=" + parameter.getTag(), MAPParsingComponentExceptionReason.MistypedParameter); byte[] buf = parameter.getData(); AsnInputStream ais = new AsnInputStream(buf, parameter.getTagClass(), parameter.isPrimitive(), parameter.getTag()); InterrogateSSRequestImpl ind = new InterrogateSSRequestImpl(); ind.decodeData(ais, buf.length); ind.setInvokeId(invokeId); ind.setMAPDialog(mapDialogImpl); for (MAPServiceListener serLis : this.serviceListeners) { try { serLis.onMAPMessage(ind); ((MAPServiceSupplementaryListener) serLis).onInterrogateSSRequest(ind); } catch (Exception e) { loger.error("Error processing onInterrogateSSRequest: " + e.getMessage(), e); } } }
@Override public void addInterrogateSSResponse_ForwardingFeatureList(long invokeId, ArrayList<ForwardingFeature> forwardingFeatureList) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext) || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2) throw new MAPException("Bad application context name for addInterrogateSSResponse: must be networkFunctionalSsContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.interrogateSS); resultLast.setOperationCode(oc); InterrogateSSResponseImpl req = new InterrogateSSResponseImpl(forwardingFeatureList); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); this.sendReturnResultLastComponent(resultLast); }
private void eraseSSRequest(Parameter parameter, MAPDialogSupplementaryImpl mapDialogImpl, Long invokeId) throws MAPParsingComponentException { if (parameter == null) throw new MAPParsingComponentException("Error while decoding eraseSSRequest: Parameter is mandatory but not found", MAPParsingComponentExceptionReason.MistypedParameter); if (parameter.getTag() != Tag.SEQUENCE || parameter.getTagClass() != Tag.CLASS_UNIVERSAL || parameter.isPrimitive()) throw new MAPParsingComponentException( "Error while decoding eraseSSRequest: Bad tag or tagClass or parameter is primitive, received tag=" + parameter.getTag(), MAPParsingComponentExceptionReason.MistypedParameter); byte[] buf = parameter.getData(); AsnInputStream ais = new AsnInputStream(buf, parameter.getTagClass(), parameter.isPrimitive(), parameter.getTag()); EraseSSRequestImpl ind = new EraseSSRequestImpl(); ind.decodeData(ais, buf.length); ind.setInvokeId(invokeId); ind.setMAPDialog(mapDialogImpl); for (MAPServiceListener serLis : this.serviceListeners) { try { serLis.onMAPMessage(ind); ((MAPServiceSupplementaryListener) serLis).onEraseSSRequest(ind); } catch (Exception e) { loger.error("Error processing onEraseSSRequest: " + e.getMessage(), e); } } }
@Override public void addSendImsiResponse(long invokeId, IMSI imsi) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.imsiRetrievalContext) || (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2)) throw new MAPException("Bad application context name for addSendImsiResponse: must be imsiRetrievalContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.sendIMSI); resultLast.setOperationCode(oc); SendImsiResponseImpl req = new SendImsiResponseImpl(imsi); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); this.sendReturnResultLastComponent(resultLast); }
private void activateSSRequest(Parameter parameter, MAPDialogSupplementaryImpl mapDialogImpl, Long invokeId) throws MAPParsingComponentException { if (parameter == null) throw new MAPParsingComponentException("Error while decoding activateSSRequest: Parameter is mandatory but not found", MAPParsingComponentExceptionReason.MistypedParameter); if (parameter.getTag() != Tag.SEQUENCE || parameter.getTagClass() != Tag.CLASS_UNIVERSAL || parameter.isPrimitive()) throw new MAPParsingComponentException( "Error while decoding activateSSRequest: Bad tag or tagClass or parameter is primitive, received tag=" + parameter.getTag(), MAPParsingComponentExceptionReason.MistypedParameter); byte[] buf = parameter.getData(); AsnInputStream ais = new AsnInputStream(buf, parameter.getTagClass(), parameter.isPrimitive(), parameter.getTag()); ActivateSSRequestImpl ind = new ActivateSSRequestImpl(); ind.decodeData(ais, buf.length); ind.setInvokeId(invokeId); ind.setMAPDialog(mapDialogImpl); for (MAPServiceListener serLis : this.serviceListeners) { try { serLis.onMAPMessage(ind); ((MAPServiceSupplementaryListener) serLis).onActivateSSRequest(ind); } catch (Exception e) { loger.error("Error processing onActivateSSRequest: " + e.getMessage(), e); } } }
@Override public void addInitiateCallAttemptResponse(long invokeId, SupportedCamelPhases supportedCamelPhases, OfferedCamel4Functionalities offeredCamel4Functionalities, CAPExtensions extensions, boolean releaseCallArgExtensionAllowed) throws CAPException { if (this.appCntx != CAPApplicationContext.CapV4_gsmSSF_scfGeneric && this.appCntx != CAPApplicationContext.CapV4_scf_gsmSSFGeneric) throw new CAPException( "Bad application context name for addInitiateCallAttemptResponse: must be CapV4_gsmSSF_scfGeneric or CapV4_scf_gsmSSFGeneric"); ReturnResultLast resultLast = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory() .createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) CAPOperationCode.initiateCallAttempt); resultLast.setOperationCode(oc); InitiateCallAttemptResponseImpl res = new InitiateCallAttemptResponseImpl(supportedCamelPhases, offeredCamel4Functionalities, extensions, releaseCallArgExtensionAllowed); AsnOutputStream aos = new AsnOutputStream(); res.encodeData(aos); Parameter p = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(res.getTagClass()); p.setPrimitive(res.getIsPrimitive()); p.setTag(res.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); this.sendReturnResultLastComponent(resultLast); }
private void unstructuredSSRequest(Parameter parameter, MAPDialogSupplementaryImpl mapDialogImpl, Long invokeId) throws MAPParsingComponentException { if (parameter == null) throw new MAPParsingComponentException( "Error while decoding UnstructuredSSRequestIndication: Parameter is mandatory but not found", MAPParsingComponentExceptionReason.MistypedParameter); if (parameter.getTag() != Tag.SEQUENCE || parameter.getTagClass() != Tag.CLASS_UNIVERSAL || parameter.isPrimitive()) throw new MAPParsingComponentException( "Error while decoding UnstructuredSSRequestIndication: Bad tag or tagClass or parameter is primitive, received tag=" + parameter.getTag(), MAPParsingComponentExceptionReason.MistypedParameter); byte[] buf = parameter.getData(); AsnInputStream ais = new AsnInputStream(buf, parameter.getTagClass(), parameter.isPrimitive(), parameter.getTag()); UnstructuredSSRequestImpl ind = new UnstructuredSSRequestImpl(); ind.decodeData(ais, buf.length); ind.setInvokeId(invokeId); ind.setMAPDialog(mapDialogImpl); for (MAPServiceListener serLis : this.serviceListeners) { try { serLis.onMAPMessage(ind); ((MAPServiceSupplementaryListener) serLis).onUnstructuredSSRequest(ind); } catch (Exception e) { loger.error("Error processing UnstructuredSSRequestIndication: " + e.getMessage(), e); } } }
@Override public void addInterrogateSSResponse_SSStatus(long invokeId, SSStatus ssStatus) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext) || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2) throw new MAPException("Bad application context name for addInterrogateSSResponse: must be networkFunctionalSsContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.interrogateSS); resultLast.setOperationCode(oc); InterrogateSSResponseImpl req = new InterrogateSSResponseImpl(ssStatus); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); this.sendReturnResultLastComponent(resultLast); }
private void processUnstructuredSSRequest(Parameter parameter, MAPDialogSupplementaryImpl mapDialogImpl, Long invokeId) throws MAPParsingComponentException { if (parameter == null) throw new MAPParsingComponentException( "Error while decoding ProcessUnstructuredSSRequestIndication: Parameter is mandatory but not found", MAPParsingComponentExceptionReason.MistypedParameter); if (parameter.getTag() != Tag.SEQUENCE || parameter.getTagClass() != Tag.CLASS_UNIVERSAL || parameter.isPrimitive()) throw new MAPParsingComponentException( "Error while decoding ProcessUnstructuredSSRequestIndication: Bad tag or tagClass or parameter is primitive, received tag=" + parameter.getTag(), MAPParsingComponentExceptionReason.MistypedParameter); byte[] buf = parameter.getData(); AsnInputStream ais = new AsnInputStream(buf, parameter.getTagClass(), parameter.isPrimitive(), parameter.getTag()); ProcessUnstructuredSSRequestImpl ind = new ProcessUnstructuredSSRequestImpl(); ind.decodeData(ais, buf.length); ind.setInvokeId(invokeId); ind.setMAPDialog(mapDialogImpl); for (MAPServiceListener serLis : this.serviceListeners) { try { serLis.onMAPMessage(ind); ((MAPServiceSupplementaryListener) serLis).onProcessUnstructuredSSRequest(ind); } catch (Exception e) { loger.error("Error processing ProcessUnstructuredSSRequestIndication: " + e.getMessage(), e); } } }
public void sendErrorComponent(Long invokeId, MAPErrorMessage mem) throws MAPException { if (this.tcapDialog.getPreviewMode()) return; MAPErrorMessageImpl mapErrorMessage = (MAPErrorMessageImpl) mem; // this.removeIncomingInvokeId(invokeId); ReturnError returnError = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory() .createTCReturnErrorRequest(); try { returnError.setInvokeId(invokeId); // Error Code ErrorCode ec = TcapFactory.createErrorCode(); ec.setLocalErrorCode(mapErrorMessage.getErrorCode()); returnError.setErrorCode(ec); AsnOutputStream aos = new AsnOutputStream(); mapErrorMessage.encodeData(aos); byte[] buf = aos.toByteArray(); if (buf.length != 0) { Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(mapErrorMessage.getTagClass()); p.setPrimitive(mapErrorMessage.getIsPrimitive()); p.setTag(mapErrorMessage.getTag()); p.setData(buf); returnError.setParameter(p); } this.tcapDialog.sendComponent(returnError); } catch (TCAPSendException e) { throw new MAPException(e.getMessage(), e); } }
private void registerPasswordRequest(Parameter parameter, MAPDialogSupplementaryImpl mapDialogImpl, Long invokeId) throws MAPParsingComponentException { if (parameter == null) throw new MAPParsingComponentException("Error while decoding registerPasswordRequest: Parameter is mandatory but not found", MAPParsingComponentExceptionReason.MistypedParameter); if (parameter.getTag() != Tag.STRING_OCTET || parameter.getTagClass() != Tag.CLASS_UNIVERSAL || !parameter.isPrimitive()) throw new MAPParsingComponentException( "Error while decoding registerPasswordRequest: Bad tag or tagClass or parameter is not primitive, received tag=" + parameter.getTag(), MAPParsingComponentExceptionReason.MistypedParameter); byte[] buf = parameter.getData(); AsnInputStream ais = new AsnInputStream(buf, parameter.getTagClass(), parameter.isPrimitive(), parameter.getTag()); RegisterPasswordRequestImpl ind = new RegisterPasswordRequestImpl(); ind.decodeData(ais, buf.length); ind.setInvokeId(invokeId); ind.setMAPDialog(mapDialogImpl); for (MAPServiceListener serLis : this.serviceListeners) { try { serLis.onMAPMessage(ind); ((MAPServiceSupplementaryListener) serLis).onRegisterPasswordRequest(ind); } catch (Exception e) { loger.error("Error processing onRegisterPasswordRequest: " + e.getMessage(), e); } } }
@Override public void addEraseSSResponse(long invokeId, SSInfo ssInfo) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext) || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2) throw new MAPException("Bad application context name for addEraseSSResponse: must be networkFunctionalSsContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.eraseSS); resultLast.setOperationCode(oc); if (ssInfo != null) { EraseSSResponseImpl req = new EraseSSResponseImpl(ssInfo); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); } this.sendReturnResultLastComponent(resultLast); }
private void processActivateTraceModeResponse(Parameter parameter, MAPDialogOamImpl mapDialogImpl, Long invokeId, boolean returnResultNotLast) throws MAPParsingComponentException { ActivateTraceModeResponseImpl_Oam ind = new ActivateTraceModeResponseImpl_Oam(); if (parameter != null) { if (parameter.getTag() != Tag.SEQUENCE || parameter.getTagClass() != Tag.CLASS_UNIVERSAL || parameter.isPrimitive()) throw new MAPParsingComponentException( "Error while decoding processActivateTraceModeResponse: Bad tag or tagClass or parameter is primitive, received tag=" + parameter.getTag(), MAPParsingComponentExceptionReason.MistypedParameter); byte[] buf = parameter.getData(); AsnInputStream ais = new AsnInputStream(buf); ind.decodeData(ais, buf.length); } ind.setInvokeId(invokeId); ind.setMAPDialog(mapDialogImpl); ind.setReturnResultNotLast(returnResultNotLast); for (MAPServiceListener serLis : this.serviceListeners) { try { ((MAPServiceOamListener) serLis).onActivateTraceModeResponse_Oam(ind); } catch (Exception e) { loger.error("Error processing processActivateTraceModeResponse: " + e.getMessage(), e); } } }
@Override public void addDeactivateSSResponse(long invokeId, SSInfo ssInfo) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext) || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2) throw new MAPException("Bad application context name for addDeactivateSSResponse: must be networkFunctionalSsContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.deactivateSS); resultLast.setOperationCode(oc); if (ssInfo != null) { DeactivateSSResponseImpl req = new DeactivateSSResponseImpl(ssInfo); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); } this.sendReturnResultLastComponent(resultLast); }