Tabnine Logo
FieldException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
quickfix.FieldException
constructor

Best Java code snippets using quickfix.FieldException.<init> (Showing top 20 results out of 315)

origin: quickfix-j/quickfixj

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);
  }
}
origin: org.quickfixj/quickfixj-all

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);
  }
}
origin: quickfix-j/quickfixj

/** Check if message type is defined in spec. **/
private void checkMsgType(String msgType) {
  if (!isMsgType(msgType)) {
    throw new FieldException(SessionRejectReason.INVALID_MSGTYPE, MsgType.FIELD);
  }
}
origin: quickfix-j/quickfixj

/** 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());
  }
}
origin: quickfix-j/quickfixj

/** 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());
  }
}
origin: org.quickfixj/quickfixj-all

/** 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());
  }
}
origin: org.quickfixj/quickfixj-all

/** 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());
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

void checkValidTagNumber(Field<?> field) {
  if (!fields.contains(field.getTag())) {
    throw new FieldException(SessionRejectReason.INVALID_TAG_NUMBER, field.getField());
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

private void checkHasValue(StringField field) {
  if (checkFieldsHaveValues && field.getValue().length() == 0) {
    throw new FieldException(SessionRejectReason.TAG_SPECIFIED_WITHOUT_A_VALUE,
        field.getField());
  }
}
origin: quickfix-j/quickfixj

/** Check if group count matches number of groups in **/
private void checkGroupCount(StringField field, FieldMap fieldMap, String msgType) {
  final int fieldNum = field.getField();
  if (isGroup(msgType, fieldNum)) {
    if (fieldMap.getGroupCount(fieldNum) != Integer.parseInt(field.getValue())) {
      throw new FieldException(
          SessionRejectReason.INCORRECT_NUMINGROUP_COUNT_FOR_REPEATING_GROUP,
          fieldNum);
    }
  }
}
origin: quickfix-j/quickfixj

public BytesField getField(BytesField field) throws FieldNotFound {
  final Field<?> returnField = fields.get(field.getField());
  if (returnField == null) {
    throw new FieldNotFound(field.getField());
  } else if (returnField instanceof BytesField) {
    return (BytesField) returnField;
  } else {
    throw new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE,
        field.getField());
  }
}
origin: quickfix-j/quickfixj

private void setField(FieldMap fields, StringField field) {
  if (fields.isSetField(field)) {
    throw new FieldException(SessionRejectReason.TAG_APPEARS_MORE_THAN_ONCE, field.getTag());
  }
  fields.setField(field);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

void checkField(Field<?> field, String msgType, boolean message) {
  // use different validation for groups and messages
  boolean messageField = message ? isMsgField(msgType, field.getField()) : fields.contains(field.getField());
  boolean fail = checkFieldFailure(field.getField(), messageField);
  if (fail) {
    if (fields.contains(field.getField())) {
      throw new FieldException(SessionRejectReason.TAG_NOT_DEFINED_FOR_THIS_MESSAGE_TYPE, field.getField());
    } else {
      throw new FieldException(SessionRejectReason.INVALID_TAG_NUMBER, field.getField());
    }
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

private void checkGroupCount(StringField field, FieldMap fieldMap, String msgType) {
  final int fieldNum = field.getField();
  if (isGroup(msgType, fieldNum)) {
    if (fieldMap.getGroupCount(fieldNum) != Integer.parseInt(field.getValue())) {
      throw new FieldException(
          SessionRejectReason.INCORRECT_NUMINGROUP_COUNT_FOR_REPEATING_GROUP,
          fieldNum);
    }
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

public BytesField getField(BytesField field) throws FieldNotFound {
  final Field<?> returnField = fields.get(field.getField());
  if (returnField == null) {
    throw new FieldNotFound(field.getField());
  } else if (returnField instanceof BytesField) {
    return (BytesField) returnField;
  } else {
    throw new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE,
        field.getField());
  }
}
origin: org.quickfixj/quickfixj-all

private void setField(FieldMap fields, StringField field) {
  if (fields.isSetField(field)) {
    throw new FieldException(SessionRejectReason.TAG_APPEARS_MORE_THAN_ONCE, field.getTag());
  }
  fields.setField(field);
}
origin: org.quickfixj/quickfixj-all

/** Check if group count matches number of groups in **/
private void checkGroupCount(StringField field, FieldMap fieldMap, String msgType) {
  final int fieldNum = field.getField();
  if (isGroup(msgType, fieldNum)) {
    if (fieldMap.getGroupCount(fieldNum) != Integer.parseInt(field.getValue())) {
      throw new FieldException(
          SessionRejectReason.INCORRECT_NUMINGROUP_COUNT_FOR_REPEATING_GROUP,
          fieldNum);
    }
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

private void setField(FieldMap fields, StringField field) {
  if (fields.isSetField(field)) {
    throw new FieldException(SessionRejectReason.TAG_APPEARS_MORE_THAN_ONCE, field.getTag());
  }
  fields.setField(field);
}
origin: quickfix-j/quickfixj

private void parseTrailer(DataDictionary dd) throws InvalidMessage {
  StringField field = extractField(dd, trailer);
  while (field != null) {
    if (!isTrailerField(field, dd)) {
      throw new FieldException(SessionRejectReason.TAG_SPECIFIED_OUT_OF_REQUIRED_ORDER,
          field.getTag());
    }
    trailer.setField(field);
    field = extractField(dd, trailer);
  }
}
origin: org.quickfixj/quickfixj-all

private void parseTrailer(DataDictionary dd) throws InvalidMessage {
  StringField field = extractField(dd, trailer);
  while (field != null) {
    if (!isTrailerField(field, dd)) {
      throw new FieldException(SessionRejectReason.TAG_SPECIFIED_OUT_OF_REQUIRED_ORDER,
          field.getTag());
    }
    trailer.setField(field);
    field = extractField(dd, trailer);
  }
}
quickfixFieldException<init>

Popular methods of FieldException

  • getField
  • getMessage
  • getSessionRejectReason

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • JLabel (javax.swing)
  • JOptionPane (javax.swing)
  • JPanel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now