Package com.epam.fix.message
Class PreparedMessageUtil
java.lang.Object
com.epam.fix.message.PreparedMessageUtil
User: Aliaksei_Kurnosau
Date: 6/12/12
Time: 9:37 AM
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final byte[]
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionPreparedMessageUtil
(SessionParameters sessionParameters) Default constructor with SessionParameters object. -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getBytesLength
(long num) returns size of serialized long in bytesprepareMessage
(byte[] msgType, MessageStructure userStructure) Builds FIXFieldList object with specified type, message structure and prefilled header informationprepareMessage
(byte[] msgType, MessageStructure userStructure, boolean fromPool) Builds FIXFieldList object with specified type, message structure and prefilled header informationprepareMessage
(FIXFieldList template, byte[] msgType, MessageStructure userStructure) 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.prepareMessage
(FIXFieldList message, MessageStructure userStructure) Builds FIXFieldList object from exist template.prepareMessage
(FIXFieldList message, MessageStructure userStructure, boolean fromPool) Builds FIXFieldList object from exist template.prepareMessage
(FIXFieldList template, String msgType, MessageStructure userStructure) Builds FIXFieldList object from exist template with specified message structure and prefilled header and trailer.prepareMessage
(FIXFieldList template, String msgType, MessageStructure userStructure, boolean fromPool) Builds FIXFieldList object from exist template with specified message structure and prefilled header and trailer.prepareMessage
(String msgTypeStr, MessageStructure userStructure) Builds FIXFieldList object with specified type, message structure and prefilled header informationprepareMessage
(String msgTypeStr, MessageStructure userStructure, boolean fromPool) Builds FIXFieldList object with specified type, message structure and prefilled header informationprepareMessageFromString
(byte[] message, byte[] type, MessageStructure structure) Builds FIXFieldList object from String object.prepareMessageFromString
(byte[] message, byte[] type, MessageStructure structure, boolean fromPool) Builds FIXFieldList object from String object.prepareMessageFromString
(byte[] message, MessageStructure structure) Builds FIXFieldList object from String object.prepareMessageFromString
(byte[] message, MessageStructure structure, boolean fromPool) Builds FIXFieldList object from String object.prepareMessageFromString
(byte[] message, String type, MessageStructure structure) Builds FIXFieldList object from String object.prepareMessageFromString
(byte[] message, String type, MessageStructure structure, boolean fromPool) Builds FIXFieldList object from String object.
-
Field Details
-
EMPTY_BYTES
public static final byte[] EMPTY_BYTES -
BODYLENGTH_FIELD_LENGTH
public static final int BODYLENGTH_FIELD_LENGTH- See Also:
-
BODYLENGTH_FIELD_DEFAULT_MAX
public static final int BODYLENGTH_FIELD_DEFAULT_MAX- See Also:
-
SEQNUM_FIELD_LENGTH
public static final int SEQNUM_FIELD_LENGTH- See Also:
-
-
Constructor Details
-
PreparedMessageUtil
Default constructor with SessionParameters object. These parameters will be used for building new PreparedMessage objects.- Parameters:
sessionParameters
- SessionParameters object
-
-
Method Details
-
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
- FIXFieldList messageuserStructure
- user message structure- 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 typeuserStructure
- 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 typeuserStructure
- 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 typeuserStructure
- 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 typeuserStructure
- 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 objectuserStructure
- template structuremsgType
- 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 stringstructure
- message structure objecttype
- 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 stringstructure
- message structure objecttype
- 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
-