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 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"; } }
@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"; } }
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(
@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"; } }
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()); } }