quickfix
Class Message

java.lang.Object
  extended by quickfix.FieldMap
      extended by quickfix.Message
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Message, Message, Message, Message, Message, Message, Message

public class Message
extends FieldMap

Represents a FIX message.

See Also:
Serialized Form

Nested Class Summary
static class Message.Header
           
static class Message.Trailer
           
 
Field Summary
protected  Message.Header header
           
protected  Message.Trailer trailer
           
 
Constructor Summary
  Message()
           
protected Message(int[] fieldOrder)
           
  Message(java.lang.String string)
           
  Message(java.lang.String string, boolean validate)
           
  Message(java.lang.String string, DataDictionary dd)
           
  Message(java.lang.String string, DataDictionary dd, boolean validate)
           
 
Method Summary
 int bodyLength()
           
 void clear()
           
 java.lang.Object clone()
           
 void fromString(java.lang.String messageData, DataDictionary dd, boolean doValidation)
           
 void fromString(java.lang.String messageData, DataDictionary sessionDictionary, DataDictionary applicationDictionary, boolean doValidation)
           
 FieldException getException()
           
 Message.Header getHeader()
           
 Message.Trailer getTrailer()
           
 void headerAddGroup(Group group)
           
 Group headerGetGroup(int num, Group group)
           
 boolean headerHasGroup(Group group)
           
 boolean headerHasGroup(int field)
           
 boolean headerHasGroup(int num, Group group)
           
 boolean headerHasGroup(int num, int field)
           
 void headerRemoveGroup(Group group)
           
 void headerReplaceGroup(int num, Group group)
           
static MsgType identifyType(java.lang.String message)
          Returns the msg type specified in a FIX message string.
static boolean InitializeXML(java.lang.String url)
           
 boolean isAdmin()
           
 boolean isApp()
           
 boolean isEmpty()
           
 void pushBack(StringField field)
           
 void reverseRoute(Message.Header header)
           
 java.lang.String toString()
           
 java.lang.String toXML()
          Converts the message into a simple XML format.
 java.lang.String toXML(DataDictionary dataDictionary)
          Converts the message into a simple XML format.
 void trailerAddGroup(Group group)
           
 Group trailerGetGroup(int num, Group group)
           
 boolean trailerHasGroup(Group group)
           
 boolean trailerHasGroup(int field)
           
 boolean trailerHasGroup(int num, Group group)
           
 boolean trailerHasGroup(int num, int field)
           
 void trailerRemoveGroup(Group group)
           
 void trailerReplaceGroup(int num, Group group)
           
 
Methods inherited from class quickfix.FieldMap
addGroup, calculateString, getBoolean, getChar, getComponent, getDecimal, getDouble, getField, getField, getField, getField, getField, getField, getField, getField, getField, getField, getFieldOrder, getGroup, getGroupCount, getGroups, getInt, getString, getUtcDateOnly, getUtcTimeOnly, getUtcTimeStamp, groupKeyIterator, hasGroup, hasGroup, hasGroup, hasGroup, initializeFrom, isSetField, isSetField, iterator, removeField, removeGroup, removeGroup, removeGroup, removeGroup, replaceGroup, setBoolean, setBytes, setChar, setComponent, setDecimal, setDecimal, setDouble, setDouble, setField, setField, setField, setField, setField, setField, setField, setField, setField, setField, setField, setFields, setGroupCount, setGroups, setGroups, setInt, setString, setUtcDateOnly, setUtcTimeOnly, setUtcTimeOnly, setUtcTimeStamp, setUtcTimeStamp
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

header

protected Message.Header header

trailer

protected Message.Trailer trailer
Constructor Detail

Message

public Message()

Message

protected Message(int[] fieldOrder)

Message

public Message(java.lang.String string)
        throws InvalidMessage
Throws:
InvalidMessage

Message

public Message(java.lang.String string,
               boolean validate)
        throws InvalidMessage
Throws:
InvalidMessage

Message

public Message(java.lang.String string,
               DataDictionary dd)
        throws InvalidMessage
Throws:
InvalidMessage

Message

public Message(java.lang.String string,
               DataDictionary dd,
               boolean validate)
        throws InvalidMessage
Throws:
InvalidMessage
Method Detail

InitializeXML

public static boolean InitializeXML(java.lang.String url)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

bodyLength

public int bodyLength()

headerAddGroup

public void headerAddGroup(Group group)

headerReplaceGroup

public void headerReplaceGroup(int num,
                               Group group)

headerGetGroup

public Group headerGetGroup(int num,
                            Group group)
                     throws FieldNotFound
Throws:
FieldNotFound

headerRemoveGroup

public void headerRemoveGroup(Group group)

headerHasGroup

public boolean headerHasGroup(int field)

headerHasGroup

public boolean headerHasGroup(int num,
                              int field)

headerHasGroup

public boolean headerHasGroup(int num,
                              Group group)

headerHasGroup

public boolean headerHasGroup(Group group)

trailerAddGroup

public void trailerAddGroup(Group group)

trailerGetGroup

public Group trailerGetGroup(int num,
                             Group group)
                      throws FieldNotFound
Throws:
FieldNotFound

trailerReplaceGroup

public void trailerReplaceGroup(int num,
                                Group group)

trailerRemoveGroup

public void trailerRemoveGroup(Group group)

trailerHasGroup

public boolean trailerHasGroup(int field)

trailerHasGroup

public boolean trailerHasGroup(int num,
                               int field)

trailerHasGroup

public boolean trailerHasGroup(int num,
                               Group group)

trailerHasGroup

public boolean trailerHasGroup(Group group)

toXML

public java.lang.String toXML()
Converts the message into a simple XML format. This format is probably not sufficient for production use, but it more intended for diagnostics and debugging. THIS IS NOT FIXML. To get names instead of tag number, use toXML(DataDictionary) instead.

Returns:
an XML representation of the message.
See Also:
toXML(DataDictionary)

toXML

public java.lang.String toXML(DataDictionary dataDictionary)
Converts the message into a simple XML format. This format is probably not sufficient for production use, but it more intended for diagnostics and debugging. THIS IS NOT FIXML.

Parameters:
dataDictionary -
Returns:
the XML representation of the message

getHeader

public final Message.Header getHeader()

getTrailer

public final Message.Trailer getTrailer()

isAdmin

public boolean isAdmin()

isApp

public boolean isApp()

isEmpty

public boolean isEmpty()
Overrides:
isEmpty in class FieldMap

clear

public void clear()
Overrides:
clear in class FieldMap

reverseRoute

public void reverseRoute(Message.Header header)
                  throws FieldNotFound
Throws:
FieldNotFound

fromString

public void fromString(java.lang.String messageData,
                       DataDictionary dd,
                       boolean doValidation)
                throws InvalidMessage
Throws:
InvalidMessage

fromString

public void fromString(java.lang.String messageData,
                       DataDictionary sessionDictionary,
                       DataDictionary applicationDictionary,
                       boolean doValidation)
                throws InvalidMessage
Throws:
InvalidMessage

pushBack

public void pushBack(StringField field)

getException

public FieldException getException()

identifyType

public static MsgType identifyType(java.lang.String message)
                            throws MessageParseError
Returns the msg type specified in a FIX message string.

Parameters:
message - the FIX message string
Returns:
the message type
Throws:
MessageParseError - (QF JNI compatibility)