本文整理汇总了Java中org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary.close方法的典型用法代码示例。如果您正苦于以下问题:Java MAPDialogSupplementary.close方法的具体用法?Java MAPDialogSupplementary.close怎么用?Java MAPDialogSupplementary.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary
的用法示例。
在下文中一共展示了MAPDialogSupplementary.close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: closeCurrentDialog
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入方法依赖的package包/类
@Override
public String closeCurrentDialog() {
if (isStarted) {
MAPDialogSupplementary curDialog = currentDialog;
if (curDialog != null) {
try {
curDialog.close(false);
this.doRemoveDialog();
return "The current dialog has been closed";
} catch (MAPException e) {
this.doRemoveDialog();
return "Exception when closing the current dialog: " + e.toString();
}
} else {
return "No current dialog";
}
} else {
return "The tester is not started";
}
}
示例2: sendUssdBusyResponse
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入方法依赖的package包/类
@Override
public String sendUssdBusyResponse() {
if (!isStarted) {
return "The tester is not started";
}
if (this.sender != null) {
return "The tester is not in manual mode";
}
MAPDialogSupplementary curDialog = currentDialog;
if (curDialog == null) {
return "No current dialog exists. Start it previousely";
}
if (invokeId == null) {
return "No pending unstructured request";
}
MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider();
try {
// MAPUserAbortChoice mapUserAbortChoice = new MAPUserAbortChoiceImpl();
// mapUserAbortChoice.setUserSpecificReason();
// curDialog.abort(mapUserAbortChoice);
MAPErrorMessage mapErrorMessage = mapProvider.getMAPErrorMessageFactory().createMAPErrorMessageExtensionContainer(
(Long) (long) MAPErrorCode.ussdBusy, null);
curDialog.sendErrorComponent(invokeId, mapErrorMessage);
curDialog.close(false);
invokeId = null;
currentRequestDef += "Sent ussdBusyResp;";
this.countErrSent++;
StringBuilder sb = new StringBuilder();
sb.append("dialogId=");
sb.append(curDialog.getLocalDialogId());
sb.append(" unstrSsResp");
String uData = sb.toString();
this.testerHost.sendNotif(SOURCE_NAME, "Sent: ussdBusyResp", uData, Level.DEBUG);
return "UssdBusyResponse has been sent";
} catch (MAPException ex) {
return "Exception when sending UssdBusyResponse: " + ex.toString();
}
}