protected String getUserAbortReason(DialogUserAbort evt) { MAPUserAbortChoice userReason = evt.getUserReason(); String reason = null; if (userReason.isUserSpecificReason()) { reason = MAP_USER_ABORT_CHOICE_USER_SPECIFIC_REASON; } else if (userReason.isUserResourceLimitation()) { reason = MAP_USER_ABORT_CHOICE_USER_RESOURCE_LIMITATION; } else if (userReason.isResourceUnavailableReason()) { ResourceUnavailableReason resourceUnavailableReason = userReason.getResourceUnavailableReason(); reason = resourceUnavailableReason.toString(); } else if (userReason.isProcedureCancellationReason()) { ProcedureCancellationReason procedureCancellationReason = userReason.getProcedureCancellationReason(); reason = procedureCancellationReason.toString(); } else { reason = MAP_USER_ABORT_CHOICE_UNKNOWN; } return reason; }
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("MAPUserAbortChoice ["); if (this.isUserSpecificReason) sb.append(" UserSpecificReason"); if (this.isUserResourceLimitation) sb.append(" UserResourceLimitation"); if (this.isResourceUnavailableReason) { sb.append(" ResourceUnavailableReason="); if (this.resourceUnavailableReason != null) sb.append(this.resourceUnavailableReason.toString()); } if (this.isProcedureCancellationReason) { sb.append(" ProcedureCancellationReason="); if (this.procedureCancellationReason != null) sb.append(this.procedureCancellationReason.toString()); } sb.append("]"); return sb.toString(); }
@Override public void onDialogNotice(MAPDialog mapDialog, MAPNoticeProblemDiagnostic notice) { String uData = "dialogNotice=" + notice.toString() + ", dlgId=" + mapDialog.getLocalDialogId(); this.testerHost.sendNotif(this.className, "Rcvd: DialogNotice", uData, Level.DEBUG); }
if (this.mapUserAbortChoice.isUserSpecificReason()) { asnOS.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, MAPUserAbortChoiceImpl.USER_SPECIFIC_REASON_TAG); } else if (this.mapUserAbortChoice.isUserResourceLimitation()) { asnOS.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, MAPUserAbortChoiceImpl.USER_RESOURCE_LIMITATION_TAG); } else if (this.mapUserAbortChoice.isResourceUnavailableReason()) { ResourceUnavailableReason rur = this.mapUserAbortChoice.getResourceUnavailableReason(); if (rur == null) throw new MAPException("Error encoding MAPUserAbortInfo: ResourceUnavailableReason value must not be null"); asnOS.writeInteger(Tag.CLASS_CONTEXT_SPECIFIC, MAPUserAbortChoiceImpl.RESOURCE_UNAVAILABLE, rur.getCode()); } else if (this.mapUserAbortChoice.isProcedureCancellationReason()) { ProcedureCancellationReason pcr = this.mapUserAbortChoice.getProcedureCancellationReason(); if (pcr == null) throw new MAPException( "Error encoding MAPUserAbortInfo: ProcedureCancellationReason value must not be null"); asnOS.writeInteger(Tag.CLASS_CONTEXT_SPECIFIC, MAPUserAbortChoiceImpl.APPLICATION_PROCEDURE_CANCELLATION, pcr.getCode());
@Override public String closeCurrentDialog() { if (!isStarted) return "The tester is not started"; MAPDialogMobility curDialog = currentDialog; if (curDialog != null) { try { MAPUserAbortChoice choice = new MAPUserAbortChoiceImpl(); choice.setUserSpecificReason(); curDialog.abort(choice); 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"; } }
ResourceUnavailableReason resUnaReas = ResourceUnavailableReason.getInstance(code); usAbrtChoice.setResourceUnavailableReason(resUnaReas); this.setMAPUserAbortChoice(usAbrtChoice); ProcedureCancellationReason procCanReasn = ProcedureCancellationReason.getInstance(code); usAbrtChoice.setProcedureCancellationReason(procCanReasn); this.setMAPUserAbortChoice(usAbrtChoice);
switch (chkRes.getResult()) { case AC_Serving: perfSer = ser; try { this.fireTCAbortACNNotSupported(tcBeginIndication.getDialog(), null, chkRes.getAlternativeApplicationContext(), false); } catch (MAPException e1) { loger.error("Error while firing TC-U-ABORT. ", e1);
public void encodeData(AsnOutputStream asnOS) throws MAPException { if (this.mapProviderAbortReason == null) throw new MAPException("Error while encoding MAP-ProviderAbortInfo: MapProviderAbortReason parameter has not set"); try { asnOS.writeInteger(Tag.CLASS_UNIVERSAL, Tag.ENUMERATED, this.mapProviderAbortReason.getCode()); if (this.extensionContainer != null) ((MAPExtensionContainerImpl) this.extensionContainer).encodeAll(asnOS); } catch (IOException e) { throw new MAPException("IOException when encoding MAPProviderAbortInfo: " + e.getMessage(), e); } catch (AsnException e) { throw new MAPException("AsnException when encoding MAPProviderAbortInfo: " + e.getMessage(), e); } } }
public void encodeData(AsnOutputStream asnOS) throws MAPException { if (this.reason == null) throw new MAPException("Error decoding MAP-RefuseInfo: Reason field must not be empty"); try { asnOS.writeInteger(Tag.CLASS_UNIVERSAL, Tag.ENUMERATED, this.reason.getCode()); if (this.extensionContainer != null) ((MAPExtensionContainerImpl) this.extensionContainer).encodeAll(asnOS); if (this.alternativeAcn != null) asnOS.writeObjectIdentifier(this.alternativeAcn.getOid()); } catch (IOException e) { throw new MAPException("IOException when encoding MAPRefuseInfo: " + e.getMessage(), e); } catch (AsnException e) { throw new MAPException("AsnException when encoding MAPRefuseInfo: " + e.getMessage(), e); } } }
+ localAis.getTagClass() + ", tag=" + tag, MAPParsingComponentExceptionReason.MistypedParameter); int code = (int) localAis.readInteger(); this.mapProviderAbortReason = MAPProviderAbortReason.getInstance(code); if (this.mapProviderAbortReason == null) throw new MAPParsingComponentException(
MAPParsingComponentExceptionReason.MistypedParameter); int reasonCode = (int) localAis.readInteger(); this.reason = Reason.getReason(reasonCode);
@Override public String closeCurrentDialog() { if (!isStarted) return "The tester is not started"; if (this.sender != null) return "The tester is not in a manual mode"; MAPDialogMobility curDialog = currentDialog; if (curDialog != null) { try { MAPUserAbortChoice choice = new MAPUserAbortChoiceImpl(); choice.setUserSpecificReason(); curDialog.abort(choice); 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"; } }
@Override public String closeCurrentDialog() { if (!isStarted) return "The tester is not started"; if (this.sender != null) return "The tester is not in a manual mode"; MAPDialogSupplementary curDialog = currentDialog; if (curDialog != null) { try { MAPUserAbortChoice choice = new MAPUserAbortChoiceImpl(); choice.setUserSpecificReason(); curDialog.abort(choice); 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"; } }
private void endActivity(MAPDialogWrapper mapDialog) { if (tracer.isFineEnabled()) tracer.fine("endActivity:" + mapDialog); MAPDialogActivityHandle mapDialogActHndl = mapDialog.getActivityHandle(); if (mapDialogActHndl == null) { if (this.tracer.isWarningEnabled()) { this.tracer.warning("Activity ended but no MAPDialogActivityHandle found for Dialog ID, ignoring " + mapDialog.getLocalDialogId()); } } else { try { MAPUserAbortChoice ach = this.realProvider.getMAPParameterFactory().createMAPUserAbortChoice(); ach.setUserSpecificReason(); mapDialog.abort(ach); } catch (MAPException e) { tracer.warning("Cannot abort dialog ", e); } this.sleeEndpoint.endActivity(mapDialogActHndl); if (tracer.isFineEnabled()) this.tracer.fine("Activity marked to be ended:" + mapDialog.getLocalDialogId()); } }