if(message.getHeader().getField(msgType).valueEquals("8")) executionReport(message, sessionID); if(message.getHeader().getField(msgType).valueEquals("9")) cancelReject(message, sessionID); } catch(FieldNotFound e) {
if (isAvailable) { if (isMissingField) {  sendBusinessReject(message, BusinessRejectReason.CONDITIONALLY_REQUIRED_FIELD_MISSING, "Conditionally required field missing"); } else if (message.getHeader().isSetField(DeliverToCompID.FIELD)) {   sendSessionReject(message, SessionRejectReason.COMPID_PROBLEM); } else if (message.getHeader().getField(msgType).valueEquals("8")) { executionReport(message, sessionID); } else if (message.getHeader().getField(msgType).valueEquals("9")) { cancelReject(message, sessionID); } else { sendBusinessReject(message, BusinessRejectReason.UNSUPPORTED_MESSAGE_TYPE, "Unsupported Message Type"); } } else { sendBusinessReject(message, BusinessRejectReason.APPLICATION_NOT_AVAILABLE, "Application not available"); } } catch (Exception e) {
        public void run() {            try {                MsgType msgType = new MsgType();                if(message.getHeader().getField(msgType).valueEquals("8"))                    executionReport(message, sessionID);                if(message.getHeader().getField(msgType).valueEquals("9"))                    cancelReject(message, sessionID);            } catch(FieldNotFound e) {                System.out.println(e);            }        }