当前位置: 首页>>代码示例>>Java>>正文


Java MAPDialogSupplementary.addProcessUnstructuredSSResponse方法代码示例

本文整理汇总了Java中org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary.addProcessUnstructuredSSResponse方法的典型用法代码示例。如果您正苦于以下问题:Java MAPDialogSupplementary.addProcessUnstructuredSSResponse方法的具体用法?Java MAPDialogSupplementary.addProcessUnstructuredSSResponse怎么用?Java MAPDialogSupplementary.addProcessUnstructuredSSResponse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary的用法示例。


在下文中一共展示了MAPDialogSupplementary.addProcessUnstructuredSSResponse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sendProcessUnstructuredResponse

import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入方法依赖的package包/类
public String sendProcessUnstructuredResponse(MAPDialogSupplementary curDialog, String msg, long invokeId) {

        MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider();

        USSDString ussdString = null;
        try {
            ussdString = mapProvider.getMAPParameterFactory().createUSSDString(
                    msg,
                    new CBSDataCodingSchemeImpl(this.testerHost.getConfigurationData().getTestUssdServerConfigurationData()
                            .getDataCodingScheme()), null);
        } catch (MAPException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }

        try {
            curDialog.addProcessUnstructuredSSResponse(invokeId, new CBSDataCodingSchemeImpl(this.testerHost
                    .getConfigurationData().getTestUssdServerConfigurationData().getDataCodingScheme()), ussdString);
        } catch (MAPException e) {
            this.testerHost.sendNotif(SOURCE_NAME,
                    "Exception when invoking addProcessUnstructuredSSResponse() : " + e.getMessage(), e, Level.ERROR);
            return "Exception when sending ProcessUnstructuredSSResponse: " + e.toString();
        }

        currentRequestDef += "procUnstrSsResp=\"" + msg + "\";";
        DialogData dd = (DialogData) curDialog.getUserObject();
        if (dd != null) {
            dd.currentRequestDef = currentRequestDef;
        }
        this.countProcUnstResp++;
        if (this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().isOneNotificationFor100Dialogs()) {
            int i1 = countProcUnstResp / 100;
            if (countProcUnstRespNot < i1) {
                countProcUnstRespNot = i1;
                this.testerHost.sendNotif(SOURCE_NAME, "Sent: procUnstrSsResp: " + (countProcUnstRespNot * 100)
                        + " messages sent", "", Level.DEBUG);
            }
        } else {
            String uData = this.createUssdMessageData(curDialog.getLocalDialogId(), this.testerHost.getConfigurationData()
                    .getTestUssdServerConfigurationData().getDataCodingScheme(), null, null);
            this.testerHost.sendNotif(SOURCE_NAME, "Sent: procUnstrSsResp: " + msg, uData, Level.DEBUG);
        }

        return "ProcessUnstructuredSSResponse has been sent";
    }
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:46,代码来源:TestUssdServerMan.java


注:本文中的org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary.addProcessUnstructuredSSResponse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。