com.epam.fix.message
Class PreparedMessageUtil

java.lang.Object
  extended by com.epam.fix.message.PreparedMessageUtil

public class PreparedMessageUtil
extends Object

User: Aliaksei_Kurnosau Date: 6/12/12 Time: 9:37 AM


Field Summary
static int BODYLENGTH_FIELD_DEFAULT_MAX
           
static int BODYLENGTH_FIELD_LENGTH
           
static byte[] EMPTY_BYTES
           
protected static Log log
           
static int SEQNUM_FIELD_LENGTH
           
 
Constructor Summary
PreparedMessageUtil(SessionParameters sessionParameters)
          Default constructor with SessionParameters object.
 
Method Summary
static int getBytesLength(long num)
          returns size of serialized long in bytes
 FIXFieldList prepareMessage(byte[] msgType, MessageStructure userStructure)
          Builds FIXFieldList object with specified type, message structure and prefilled header information
 FIXFieldList prepareMessage(byte[] msgType, MessageStructure userStructure, boolean fromPool)
          Builds FIXFieldList object with specified type, message structure and prefilled header information
 FIXFieldList prepareMessage(FIXFieldList template, byte[] msgType, MessageStructure userStructure)
           
 FIXFieldList prepareMessage(FIXFieldList template, byte[] msgType, MessageStructure userStructure, boolean fromPool)
          Builds FIXFieldList object from exist template with specified message type, message structure and prefilled header and trailer.
 FIXFieldList prepareMessage(FIXFieldList message, MessageStructure userStructure)
          Builds FIXFieldList object from exist template.
 FIXFieldList prepareMessage(FIXFieldList message, MessageStructure userStructure, boolean fromPool)
          Builds FIXFieldList object from exist template.
 FIXFieldList prepareMessage(FIXFieldList template, String msgType, MessageStructure userStructure)
          Builds FIXFieldList object from exist template with specified message structure and prefilled header and trailer.
 FIXFieldList prepareMessage(FIXFieldList template, String msgType, MessageStructure userStructure, boolean fromPool)
          Builds FIXFieldList object from exist template with specified message structure and prefilled header and trailer.
 FIXFieldList prepareMessage(String msgTypeStr, MessageStructure userStructure)
          Builds FIXFieldList object with specified type, message structure and prefilled header information
 FIXFieldList prepareMessage(String msgTypeStr, MessageStructure userStructure, boolean fromPool)
          Builds FIXFieldList object with specified type, message structure and prefilled header information
 FIXFieldList prepareMessageFromString(byte[] message, byte[] type, MessageStructure structure)
          Builds FIXFieldList object from String object.
 FIXFieldList prepareMessageFromString(byte[] message, byte[] type, MessageStructure structure, boolean fromPool)
          Builds FIXFieldList object from String object.
 FIXFieldList prepareMessageFromString(byte[] message, MessageStructure structure)
          Builds FIXFieldList object from String object.
 FIXFieldList prepareMessageFromString(byte[] message, MessageStructure structure, boolean fromPool)
          Builds FIXFieldList object from String object.
 FIXFieldList prepareMessageFromString(byte[] message, String type, MessageStructure structure)
          Builds FIXFieldList object from String object.
 FIXFieldList prepareMessageFromString(byte[] message, String type, MessageStructure structure, boolean fromPool)
          Builds FIXFieldList object from String object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_BYTES

public static final byte[] EMPTY_BYTES

BODYLENGTH_FIELD_LENGTH

public static final int BODYLENGTH_FIELD_LENGTH
See Also:
Constant Field Values

BODYLENGTH_FIELD_DEFAULT_MAX

public static final int BODYLENGTH_FIELD_DEFAULT_MAX
See Also:
Constant Field Values

SEQNUM_FIELD_LENGTH

public static final int SEQNUM_FIELD_LENGTH
See Also:
Constant Field Values

log

protected static final Log log
Constructor Detail

PreparedMessageUtil

public PreparedMessageUtil(SessionParameters sessionParameters)
Default constructor with SessionParameters object. This parameters will be used for building new PreparedMessage objects.

Parameters:
sessionParameters - SessionParameters object
Method Detail

prepareMessage

public FIXFieldList prepareMessage(FIXFieldList message,
                                   MessageStructure userStructure)
                            throws PreparedMessageException
Builds FIXFieldList object from exist template. Instance is received from pool.

Parameters:
message -
userStructure -
Returns:
Throws:
PreparedMessageException

prepareMessage

public FIXFieldList prepareMessage(FIXFieldList message,
                                   MessageStructure userStructure,
                                   boolean fromPool)
                            throws PreparedMessageException
Builds FIXFieldList object from exist template.

Parameters:
message -
userStructure -
Returns:
Throws:
PreparedMessageException

prepareMessage

public FIXFieldList prepareMessage(String msgTypeStr,
                                   MessageStructure userStructure)
                            throws PreparedMessageException
Builds FIXFieldList object with specified type, message structure and prefilled header information

Parameters:
msgTypeStr - message type
userStructure - message structure
Returns:
FIXPrepapredMessageImpl object
Throws:
PreparedMessageException

prepareMessage

public FIXFieldList prepareMessage(String msgTypeStr,
                                   MessageStructure userStructure,
                                   boolean fromPool)
                            throws PreparedMessageException
Builds FIXFieldList object with specified type, message structure and prefilled header information

Parameters:
msgTypeStr - message type
userStructure - message structure
Returns:
FIXPrepapredMessageImpl object
Throws:
PreparedMessageException

prepareMessage

public FIXFieldList prepareMessage(byte[] msgType,
                                   MessageStructure userStructure)
                            throws PreparedMessageException
Builds FIXFieldList object with specified type, message structure and prefilled header information

Parameters:
msgType - message type
userStructure - message structure
Returns:
FIXPrepapredMessageImpl object
Throws:
PreparedMessageException

prepareMessage

public FIXFieldList prepareMessage(byte[] msgType,
                                   MessageStructure userStructure,
                                   boolean fromPool)
                            throws PreparedMessageException
Builds FIXFieldList object with specified type, message structure and prefilled header information

Parameters:
msgType - message type
userStructure - message structure
Returns:
FIXPrepapredMessageImpl object
Throws:
PreparedMessageException

prepareMessage

public FIXFieldList prepareMessage(FIXFieldList template,
                                   String msgType,
                                   MessageStructure userStructure)
                            throws PreparedMessageException
Builds FIXFieldList object from exist template with specified message structure and prefilled header and trailer.

Parameters:
template -
msgType -
userStructure -
Returns:
Throws:
PreparedMessageException

prepareMessage

public FIXFieldList prepareMessage(FIXFieldList template,
                                   String msgType,
                                   MessageStructure userStructure,
                                   boolean fromPool)
                            throws PreparedMessageException
Builds FIXFieldList object from exist template with specified message structure and prefilled header and trailer.

Parameters:
template -
msgType -
userStructure -
Returns:
Throws:
PreparedMessageException

prepareMessage

public FIXFieldList prepareMessage(FIXFieldList template,
                                   byte[] msgType,
                                   MessageStructure userStructure)
                            throws PreparedMessageException
Throws:
PreparedMessageException

prepareMessage

public FIXFieldList prepareMessage(FIXFieldList template,
                                   byte[] msgType,
                                   MessageStructure userStructure,
                                   boolean fromPool)
                            throws PreparedMessageException
Builds FIXFieldList object from exist template with specified message type, message structure and prefilled header and trailer.

Parameters:
template - FIXFieldList object
userStructure - template structure
msgType - type of the template
Returns:
FIXFieldList object
Throws:
PreparedMessageException - exception

prepareMessageFromString

public FIXFieldList prepareMessageFromString(byte[] message,
                                             MessageStructure structure)
                                      throws PreparedMessageException
Builds FIXFieldList object from String object.

Parameters:
message -
structure -
Returns:
Throws:
PreparedMessageException

prepareMessageFromString

public FIXFieldList prepareMessageFromString(byte[] message,
                                             MessageStructure structure,
                                             boolean fromPool)
                                      throws PreparedMessageException
Builds FIXFieldList object from String object.

Parameters:
message -
structure -
Returns:
Throws:
PreparedMessageException

prepareMessageFromString

public FIXFieldList prepareMessageFromString(byte[] message,
                                             String type,
                                             MessageStructure structure)
                                      throws PreparedMessageException
Builds FIXFieldList object from String object.

Parameters:
message - message string
structure - message structure object
type - message type
Returns:
FIXFieldList object
Throws:
PreparedMessageException - exception

prepareMessageFromString

public FIXFieldList prepareMessageFromString(byte[] message,
                                             String type,
                                             MessageStructure structure,
                                             boolean fromPool)
                                      throws PreparedMessageException
Builds FIXFieldList object from String object.

Parameters:
message - message string
structure - message structure object
type - message type
Returns:
FIXFieldList object
Throws:
PreparedMessageException - exception

prepareMessageFromString

public FIXFieldList prepareMessageFromString(byte[] message,
                                             byte[] type,
                                             MessageStructure structure)
                                      throws PreparedMessageException
Builds FIXFieldList object from String object.

Parameters:
message -
type -
structure -
Returns:
Throws:
PreparedMessageException

prepareMessageFromString

public FIXFieldList prepareMessageFromString(byte[] message,
                                             byte[] type,
                                             MessageStructure structure,
                                             boolean fromPool)
                                      throws PreparedMessageException
Builds FIXFieldList object from String object.

Parameters:
message -
type -
structure -
Returns:
Throws:
PreparedMessageException

getBytesLength

public static int getBytesLength(long num)
returns size of serialized long in bytes

Parameters:
num - number
Returns:
number of bytes


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.