本文整理汇总了Java中org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast.setOperationCode方法的典型用法代码示例。如果您正苦于以下问题:Java ReturnResultLast.setOperationCode方法的具体用法?Java ReturnResultLast.setOperationCode怎么用?Java ReturnResultLast.setOperationCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast
的用法示例。
在下文中一共展示了ReturnResultLast.setOperationCode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addCancelLocationResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
@Override
public void addCancelLocationResponse(long invokeId, MAPExtensionContainer extensionContainer) throws MAPException {
if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.locationCancellationContext)
|| (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version1
&& this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2 && this.appCntx
.getApplicationContextVersion() != MAPApplicationContextVersion.version3))
throw new MAPException(
"Bad application context name for CancelLocationResponse: must be locationCancellationContext_V1, V2 or V3");
ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory()
.createTCResultLastRequest();
resultLast.setInvokeId(invokeId);
// Operation Code
OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
oc.setLocalOperationCode((long) MAPOperationCode.cancelLocation);
resultLast.setOperationCode(oc);
if (extensionContainer != null) {
CancelLocationResponseImpl req = new CancelLocationResponseImpl(extensionContainer);
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);
}
示例2: addSubscriberLocationReportResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
public void addSubscriberLocationReportResponse(long invokeId, ISDNAddressString naEsrd, ISDNAddressString naEsrk,
MAPExtensionContainer extensionContainer) throws MAPException {
if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.locationSvcEnquiryContext)
|| this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version3)
throw new MAPException(
"Bad application context name for addSubscriberLocationReportResponse: must be locationSvcEnquiryContext_V3");
ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory()
.createTCResultLastRequest();
resultLast.setInvokeId(invokeId);
// Operation Code
OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
oc.setLocalOperationCode((long) MAPOperationCode.subscriberLocationReport);
resultLast.setOperationCode(oc);
SubscriberLocationReportResponseImpl resInd = new SubscriberLocationReportResponseImpl(naEsrd, naEsrk,
extensionContainer);
AsnOutputStream asnOs = new AsnOutputStream();
resInd.encodeData(asnOs);
Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter();
p.setTagClass(resInd.getTagClass());
p.setPrimitive(resInd.getIsPrimitive());
p.setTag(resInd.getTag());
p.setData(asnOs.toByteArray());
resultLast.setParameter(p);
this.sendReturnResultLastComponent(resultLast);
}
示例3: addUpdateLocationResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
public void addUpdateLocationResponse(long invokeId, ISDNAddressString hlrNumber, MAPExtensionContainer extensionContainer,
boolean addCapability, boolean pagingAreaCapability) throws MAPException {
if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkLocUpContext)
|| (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version1
&& this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2 && this.appCntx
.getApplicationContextVersion() != MAPApplicationContextVersion.version3))
throw new MAPException(
"Bad application context name for UpdateLocationResponse: must be networkLocUpContext_V1, V2 or V3");
ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory()
.createTCResultLastRequest();
resultLast.setInvokeId(invokeId);
// Operation Code
OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
oc.setLocalOperationCode((long) MAPOperationCode.updateLocation);
resultLast.setOperationCode(oc);
UpdateLocationResponseImpl req = new UpdateLocationResponseImpl(this.appCntx.getApplicationContextVersion()
.getVersion(), hlrNumber, extensionContainer, addCapability, pagingAreaCapability);
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);
}
示例4: addAuthenticationFailureReportResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
@Override
public void addAuthenticationFailureReportResponse(long invokeId, MAPExtensionContainer extensionContainer) throws MAPException {
if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.authenticationFailureReportContext)
|| (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version3))
throw new MAPException("Bad application context name for authenticationFailureReportResponse: must be authenticationFailureReportContext_V3");
ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory()
.createTCResultLastRequest();
resultLast.setInvokeId(invokeId);
if (extensionContainer != null) {
// Operation Code
OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
oc.setLocalOperationCode((long) MAPOperationCode.authenticationFailureReport);
resultLast.setOperationCode(oc);
AuthenticationFailureReportResponseImpl req = new AuthenticationFailureReportResponseImpl(extensionContainer);
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);
}
示例5: addEraseSSResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
@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);
}
示例6: addActivateSSResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
@Override
public void addActivateSSResponse(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 addActivateSSResponse: 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.activateSS);
resultLast.setOperationCode(oc);
if (ssInfo != null) {
ActivateSSResponseImpl req = new ActivateSSResponseImpl(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);
}
示例7: addDeactivateSSResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
@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);
}
示例8: addUpdateGprsLocationResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
@Override
public void addUpdateGprsLocationResponse(long invokeId, ISDNAddressString hlrNumber,
MAPExtensionContainer extensionContainer, boolean addCapability, boolean sgsnMmeSeparationSupported)
throws MAPException {
if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.gprsLocationUpdateContext)
|| (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version3))
throw new MAPException(
"Bad application context name for UpdateGprsLocationResponse: must be gprsLocationUpdateContext_V3");
ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory()
.createTCResultLastRequest();
resultLast.setInvokeId(invokeId);
// Operation Code
OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
oc.setLocalOperationCode((long) MAPOperationCode.updateGprsLocation);
resultLast.setOperationCode(oc);
UpdateGprsLocationResponseImpl req = new UpdateGprsLocationResponseImpl(hlrNumber, extensionContainer, addCapability,
sgsnMmeSeparationSupported);
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);
}
示例9: addInterrogateSSResponse_BasicServiceGroupList
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
@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);
}
示例10: addSendIdentificationResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
@Override
public void addSendIdentificationResponse(long invokeId, IMSI imsi, AuthenticationSetList authenticationSetList,
CurrentSecurityContext currentSecurityContext, MAPExtensionContainer extensionContainer) throws MAPException {
if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.interVlrInfoRetrievalContext)
|| (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2 && this.appCntx
.getApplicationContextVersion() != MAPApplicationContextVersion.version3))
throw new MAPException(
"Bad application context name for CancelLocationResponse: must be interVlrInfoRetrievalContext_V2 or V3");
ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory()
.createTCResultLastRequest();
resultLast.setInvokeId(invokeId);
// Operation Code
OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
oc.setLocalOperationCode((long) MAPOperationCode.sendIdentification);
resultLast.setOperationCode(oc);
SendIdentificationResponseImpl req = new SendIdentificationResponseImpl(imsi, authenticationSetList,
currentSecurityContext, extensionContainer, this.appCntx.getApplicationContextVersion().getVersion());
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);
}
示例11: addAnyTimeInterrogationResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
public void addAnyTimeInterrogationResponse(long invokeId, SubscriberInfo subscriberInfo,
MAPExtensionContainer extensionContainer) throws MAPException {
if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.anyTimeEnquiryContext)
|| (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version3))
throw new MAPException(
"Bad application context name for AnyTimeInterrogationRequest: must be networkLocUpContext_V3");
ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory()
.createTCResultLastRequest();
resultLast.setInvokeId(invokeId);
// Operation Code
OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
oc.setLocalOperationCode((long) MAPOperationCode.anyTimeInterrogation);
resultLast.setOperationCode(oc);
AnyTimeInterrogationResponseImpl req = new AnyTimeInterrogationResponseImpl(subscriberInfo, extensionContainer);
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);
}
示例12: addGetPasswordResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
@Override
public void addGetPasswordResponse(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 addGetPasswordResponse: 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.getPassword);
resultLast.setOperationCode(oc);
GetPasswordResponseImpl req = new GetPasswordResponseImpl(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);
}
示例13: addSendRoutingInfoForLCSResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
public void addSendRoutingInfoForLCSResponse(long invokeId, SubscriberIdentity targetMS, LCSLocationInfo lcsLocationInfo,
MAPExtensionContainer extensionContainer, GSNAddress vgmlcAddress, GSNAddress hGmlcAddress, GSNAddress pprAddress,
GSNAddress additionalVGmlcAddress) throws MAPException {
if (targetMS == null || lcsLocationInfo == null) {
throw new MAPException("Mandatroy parameters targetMS or lcsLocationInfo cannot be null");
}
if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.locationSvcGatewayContext)
|| this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version3)
throw new MAPException(
"Bad application context name for addSendRoutingInfoForLCSResponse: must be locationSvcGatewayContext_V3");
ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory()
.createTCResultLastRequest();
resultLast.setInvokeId(invokeId);
// Operation Code
OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
oc.setLocalOperationCode((long) MAPOperationCode.sendRoutingInfoForLCS);
resultLast.setOperationCode(oc);
SendRoutingInfoForLCSResponseImpl resInd = new SendRoutingInfoForLCSResponseImpl(targetMS, lcsLocationInfo,
extensionContainer, vgmlcAddress, hGmlcAddress, pprAddress, additionalVGmlcAddress);
AsnOutputStream asnOs = new AsnOutputStream();
resInd.encodeData(asnOs);
Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter();
p.setTagClass(resInd.getTagClass());
p.setPrimitive(resInd.getIsPrimitive());
p.setTag(resInd.getTag());
p.setData(asnOs.toByteArray());
resultLast.setParameter(p);
this.sendReturnResultLastComponent(resultLast);
}
示例14: addPurgeMSResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
@Override
public void addPurgeMSResponse(long invokeId, boolean freezeTMSI, boolean freezePTMSI,
MAPExtensionContainer extensionContainer, boolean freezeMTMSI) throws MAPException {
if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.msPurgingContext)
|| ((this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version3) && (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2)))
throw new MAPException("Bad application context name for PurgeMSResponse: must be msPurgingContext_V3 OR msPurgingContext_V2");
ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory()
.createTCResultLastRequest();
resultLast.setInvokeId(invokeId);
// Operation Code
OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
oc.setLocalOperationCode((long) MAPOperationCode.purgeMS);
resultLast.setOperationCode(oc);
PurgeMSResponseImpl resp = new PurgeMSResponseImpl(freezeTMSI, freezePTMSI, extensionContainer, freezeMTMSI);
if (this.appCntx.getApplicationContextVersion().getVersion() >= 3 && (freezeTMSI || freezePTMSI || extensionContainer != null || freezeMTMSI)) {
AsnOutputStream aos = new AsnOutputStream();
resp.encodeData(aos);
Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter();
p.setTagClass(resp.getTagClass());
p.setPrimitive(resp.getIsPrimitive());
p.setTag(resp.getTag());
p.setData(aos.toByteArray());
resultLast.setParameter(p);
}
this.sendReturnResultLastComponent(resultLast);
}
示例15: addMoForwardShortMessageResponse
import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultLast; //导入方法依赖的package包/类
public void addMoForwardShortMessageResponse(long invokeId, SmsSignalInfo sm_RP_UI, MAPExtensionContainer extensionContainer)
throws MAPException {
if (this.appCntx.getApplicationContextName() != MAPApplicationContextName.shortMsgMORelayContext
|| this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version3)
throw new MAPException(
"Bad application context name for addMoForwardShortMessageResponse: must be shortMsgMORelayContext_V3");
ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory()
.createTCResultLastRequest();
resultLast.setInvokeId(invokeId);
// Operation Code
OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
oc.setLocalOperationCode((long) MAPOperationCode.mo_forwardSM);
resultLast.setOperationCode(oc);
if (sm_RP_UI != null || extensionContainer != null) {
MoForwardShortMessageResponseImpl req = new MoForwardShortMessageResponseImpl(sm_RP_UI, extensionContainer);
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);
}