Package org.marketcetera.util.quickfix
Class AnalyzedMessage
- java.lang.Object
-
- org.marketcetera.util.quickfix.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
-
-
Field Summary
Fields Modifier and Type Field Description private List<AnalyzedField>mBodyprivate List<AnalyzedField>mHeaderprivate List<AnalyzedField>mTrailerprivate ExceptionmValidationException
-
Constructor Summary
Constructors Constructor Description 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.AnalyzedMessage(quickfix.DataDictionary qDict, quickfix.Message qMsg)Creates a new analyzed message for the given QuickFIX/J message, interpreted using the given data dictionary.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static voidanalyzeFields(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.List<AnalyzedField>getBody()Returns the analyzed fields that comprise the receiver's body.List<AnalyzedField>getHeader()Returns the analyzed fields that comprise the receiver's header.List<AnalyzedField>getTrailer()Returns the analyzed fields that comprise the receiver's trailer.ExceptiongetValidationException()Returns the receiver's validation exception.voidprint(PrintStream stream)Prints the receiver onto the given stream.(package private) static voidprintFields(PrintStream stream, String prefix, List<AnalyzedField> list)Prints the given field list onto the given stream.private voidprintSection(PrintStream stream, I18NBoundMessage title, List<AnalyzedField> list)Prints the given section title and fields of the receiver onto the given stream.StringtoString()
-
-
-
Field Detail
-
mHeader
private final List<AnalyzedField> mHeader
-
mBody
private final List<AnalyzedField> mBody
-
mTrailer
private final List<AnalyzedField> mTrailer
-
mValidationException
private Exception mValidationException
-
-
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- aquickfix.DataDictionaryvalueinFieldMap- aquickfix.FieldMapvalueinMsgType- aStringvalue
-
-
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.
-
-