protected void fireTCEnd(Dialog tcapDialog, Boolean sendMapCloseInfo, boolean prearrangedEnd, ApplicationContextName acn,
MAPExtensionContainer mapExtensionContainer, boolean returnMessageOnError) throws MAPException {
if (this.getTCAPProvider().getPreviewMode()) {
return;
}
TCEndRequest endRequest = encodeTCEnd(tcapDialog, sendMapCloseInfo, prearrangedEnd, acn, mapExtensionContainer);
if (returnMessageOnError)
endRequest.setReturnMessageOnError(true);
try {
tcapDialog.send(endRequest);
} catch (TCAPSendException e) {
throw new MAPException(e.getMessage(), e);
}
}