Class AnalyzedMessage


  • public class AnalyzedMessage
    extends Object
    Analyzes a QuickFIX/J message, producing a human-readable representation of its contents.
    Since:
    1.0.0
    Version:
    $Id: AnalyzedMessage.java 16154 2012-07-14 16:34:05Z colin $
    Author:
    tlerios@marketcetera.com
    • Constructor Detail

      • AnalyzedMessage

        public AnalyzedMessage​(quickfix.DataDictionary qDict,
                               quickfix.Message qMsg)
        Creates a new analyzed message for the given QuickFIX/J message, interpreted using the given data dictionary.
        Parameters:
        qDict - The data dictionary.
        qMsg - The message.
      • AnalyzedMessage

        public AnalyzedMessage​(quickfix.DataDictionary inDataDictionary,
                               quickfix.FieldMap inFieldMap,
                               String inMsgType)
        Creates a new analyzed message for the given QuickFIX/J message, interpreted using the given data dictionary.
        Parameters:
        inDataDictionary - a quickfix.DataDictionary value
        inFieldMap - a quickfix.FieldMap value
        inMsgType - a String value
    • Method Detail

      • analyzeFields

        static void analyzeFields​(quickfix.DataDictionary nameQDict,
                                  quickfix.DataDictionary scopeQDict,
                                  quickfix.FieldMap qMap,
                                  String msgType,
                                  Iterator<?> qFields,
                                  List<AnalyzedField> list)
        Analyzes the given QuickFIX/J fields that are part of the given field map, and appends the results of the analysis to the given list. The map is part of (or same as) the message with the given type. One data dictionary is used to translate field tags and enumerated values (the name dictionary); another (the scope dictionary) is used for scope-dependent lookups such as required flags and subgroup analysis.
        Parameters:
        nameQDict - The name dictionary.
        scopeQDict - The scope dictionary.
        qMap - The field map.
        msgType - The message type.
        qFields - The fields.
        list - The results' list.
      • printFields

        static void printFields​(PrintStream stream,
                                String prefix,
                                List<AnalyzedField> list)
        Prints the given field list onto the given stream. Each line printed is preceded by the given prefix.
        Parameters:
        stream - The stream.
        prefix - The prefix.
        list - The field list.
      • printSection

        private void printSection​(PrintStream stream,
                                  I18NBoundMessage title,
                                  List<AnalyzedField> list)
        Prints the given section title and fields of the receiver onto the given stream. Nothing is printed if the section contains no fields.
        Parameters:
        stream - The stream.
        title - The section title.
        list - The section fields.
      • getHeader

        public List<AnalyzedField> getHeader()
        Returns the analyzed fields that comprise the receiver's header.
        Returns:
        The fields.
      • getBody

        public List<AnalyzedField> getBody()
        Returns the analyzed fields that comprise the receiver's body.
        Returns:
        The fields.
      • getTrailer

        public List<AnalyzedField> getTrailer()
        Returns the analyzed fields that comprise the receiver's trailer.
        Returns:
        The fields.
      • getValidationException

        public Exception getValidationException()
        Returns the receiver's validation exception.
        Returns:
        The exception. It is null if the receiver is valid.
      • print

        public void print​(PrintStream stream)
        Prints the receiver onto the given stream.
        Parameters:
        stream - The stream.