quickfix
Class DefaultMessageFactory

java.lang.Object
  extended by quickfix.DefaultMessageFactory
All Implemented Interfaces:
MessageFactory

public class DefaultMessageFactory
extends java.lang.Object
implements MessageFactory

The default factory for creating FIX message instances. Create subclasses of this factory for generating custom messages using nonstandard message types.


Constructor Summary
DefaultMessageFactory()
           
 
Method Summary
 Message create(java.lang.String beginString, java.lang.String msgType)
          Creates a message for a specified type and FIX version
 Group create(java.lang.String beginString, java.lang.String msgType, int correspondingFieldID)
          Creates a group for the specified parent message type and for the fields with the corresponding field ID Example: to create a MarketDataRequest.NoMDEntryTypes you need to call create(MsgType.MARKET_DATA_REQUEST, NoMDEntryTypes.FIELD) Function returns null if the group cannot be created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessageFactory

public DefaultMessageFactory()
Method Detail

create

public Message create(java.lang.String beginString,
                      java.lang.String msgType)
Description copied from interface: MessageFactory
Creates a message for a specified type and FIX version

Specified by:
create in interface MessageFactory
Parameters:
beginString - the FIX version (for example, "FIX.4.2")
msgType - the FIX message type (for example, "D" for an order)
Returns:
a message instance

create

public Group create(java.lang.String beginString,
                    java.lang.String msgType,
                    int correspondingFieldID)
Description copied from interface: MessageFactory
Creates a group for the specified parent message type and for the fields with the corresponding field ID Example: to create a MarketDataRequest.NoMDEntryTypes you need to call create(MsgType.MARKET_DATA_REQUEST, NoMDEntryTypes.FIELD) Function returns null if the group cannot be created.

Specified by:
create in interface MessageFactory
Parameters:
beginString - the FIX version (for example, "FIX.4.2")
msgType - Message type of the enclosing message
correspondingFieldID - the fieldID of the field in the group
Returns:
group, or null if the group can't be created.