private void checkFirstFieldFound(boolean firstFieldFound, final int groupCountTag, final int firstField, int tag) throws FieldException { if (!firstFieldFound) { throw new FieldException( SessionRejectReason.REPEATING_GROUP_FIELDS_OUT_OF_ORDER, "The group " + groupCountTag + " must set the delimiter field " + firstField, tag); } }
/** * Returns the first invalid tag, which is all that can be reported * in the resulting FIX reject message. * * @return the first invalid tag */ int getInvalidTag() { return exception != null ? exception.getField() : 0; }
if (message.isSetField(e.getField())) { if (rejectInvalidMessage) { throw e; getLog().onErrorEvent( "Warn: incoming message with incorrect field: " + message.getField(e.getField()) + ": " + message); } else { getLog().onErrorEvent( "Warn: incoming message with missing field: " + e.getField() + ": " + e.getMessage() + ": " + message); final String reason = SessionRejectReasonText.getMessage(e.getSessionRejectReason()); final String errorMessage = "Invalid Logon message: " + reason + " (field " + e.getField() + ")"; generateLogout(errorMessage); state.incrNextTargetMsgSeqNum(); disconnect(errorMessage, true); } else { generateReject(message, e.getSessionRejectReason(), e.getField());
if (message.isSetField(e.getField())) { if (rejectInvalidMessage) { throw e; getLog().onErrorEvent( "Warn: incoming message with incorrect field: " + message.getField(e.getField()) + ": " + getMessageToLog(message)); } else { getLog().onErrorEvent( "Warn: incoming message with missing field: " + e.getField() + ": " + e.getMessage() + ": " + getMessageToLog(message));
if (message.isSetField(e.getField())) { if (rejectInvalidMessage) { throw e; getLog().onErrorEvent( "Warn: incoming message with incorrect field: " + message.getField(e.getField()) + ": " + getMessageToLog(message)); } else { getLog().onErrorEvent( "Warn: incoming message with missing field: " + e.getField() + ": " + e.getMessage() + ": " + getMessageToLog(message));
private void checkFirstFieldFound(boolean firstFieldFound, final int groupCountTag, final int firstField, int tag) throws FieldException { if (!firstFieldFound) { throw new FieldException( SessionRejectReason.REPEATING_GROUP_FIELDS_OUT_OF_ORDER, "The group " + groupCountTag + " must set the delimiter field " + firstField, tag); } }
/** * Returns the first invalid tag, which is all that can be reported * in the resulting FIX reject message. * * @return the first invalid tag */ int getInvalidTag() { return exception != null ? exception.getField() : 0; }
/** Check if message type is defined in spec. **/ private void checkMsgType(String msgType) { if (!isMsgType(msgType)) { throw new FieldException(SessionRejectReason.INVALID_MSGTYPE, MsgType.FIELD); } }
/** * Returns the first invalid tag, which is all that can be reported * in the resulting FIX reject message. * * @return the first invalid tag */ int getInvalidTag() { return exception != null ? exception.getField() : 0; }
private FieldException newIncorrectDataException(FieldConvertError e, int tag) { return new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE, e.getMessage(), tag); }
/** Check if message type is defined in spec. **/ private void checkMsgType(String msgType) { if (!isMsgType(msgType)) { throw new FieldException(SessionRejectReason.INVALID_MSGTYPE, MsgType.FIELD); } }
private void checkMsgType(String msgType) { if (!isMsgType(msgType)) { // It would be better to include the msgType in exception message // Doing that will break acceptance tests throw new FieldException(SessionRejectReason.INVALID_MSGTYPE); } }
private FieldException newIncorrectDataException(FieldConvertError e, int tag) { return new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE, e.getMessage(), tag); }
private FieldException newIncorrectDataException(FieldConvertError e, int tag) { return new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE, e.getMessage(), tag); }
/** Check if field tag number is defined in spec. **/ void checkValidTagNumber(Field<?> field) { if (!fields.contains(field.getTag())) { throw new FieldException(SessionRejectReason.INVALID_TAG_NUMBER, field.getField()); } }
/** Check if a field has a value. **/ private void checkHasValue(StringField field) { if (checkFieldsHaveValues && field.getValue().length() == 0) { throw new FieldException(SessionRejectReason.TAG_SPECIFIED_WITHOUT_A_VALUE, field.getField()); } }
/** Check if field tag number is defined in spec. **/ void checkValidTagNumber(Field<?> field) { if (!fields.contains(field.getTag())) { throw new FieldException(SessionRejectReason.INVALID_TAG_NUMBER, field.getField()); } }
/** Check if a field has a value. **/ private void checkHasValue(StringField field) { if (checkFieldsHaveValues && field.getValue().length() == 0) { throw new FieldException(SessionRejectReason.TAG_SPECIFIED_WITHOUT_A_VALUE, field.getField()); } }
void checkValidTagNumber(Field<?> field) { if (!fields.contains(field.getTag())) { throw new FieldException(SessionRejectReason.INVALID_TAG_NUMBER, field.getField()); } }
private void checkHasValue(StringField field) { if (checkFieldsHaveValues && field.getValue().length() == 0) { throw new FieldException(SessionRejectReason.TAG_SPECIFIED_WITHOUT_A_VALUE, field.getField()); } }