Package com.epam.fix.message
Class MessageStructure
java.lang.Object
com.epam.fix.message.MessageStructure
User: Aliaksei_Kurnosau
Date: 6/1/12
Time: 11:52 PM
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(MessageStructure struct) Append fields to the end of current structure.boolean
containsTagId
(int tag) boolean
int
getLength
(int index) int
getSize()
int
getTagId
(int index) com.epam.fix.message.ValueType
getType
(int index) int
hashCode()
int
indexOf
(int tagId) int
indexOfTag
(int tag) void
merge
(MessageStructure struct) void
reserve
(int tagId, int length) Specifies tagId and size of the tag value.void
reserve
(int position, int tagId, int length) Specifies tagId and size of the tag value.void
reserveLong
(int tagId, int length) void
reserveLong
(int position, int tagId, int length) void
reserveString
(int tagId) void
reserveString
(int tagId, int length) void
reserveString
(int position, int tagId, int length) void
setLength
(int tagId, int length) Change the length for specific tag.void
setLength
(int tagId, int occurance, int length) Change the length for specific tag.void
setLengthAtIndex
(int tagIndex, int length) void
setType
(int tagId, int occurance, com.epam.fix.message.ValueType type) void
setType
(int tagId, com.epam.fix.message.ValueType type) void
setTypeAtIndex
(int tagIndex, com.epam.fix.message.ValueType type)
-
Field Details
-
VARIABLE_LENGTH
public static final int VARIABLE_LENGTHSpecial value for defining the size of field with variable value length- See Also:
-
tagIds
-
lengths
-
types
-
-
Constructor Details
-
MessageStructure
public MessageStructure()
-
-
Method Details
-
reserve
public void reserve(int tagId, int length) Specifies tagId and size of the tag value. All tags should be reserved in order like in generated message. Use MessageStructure.VARIABLE_LENGTH to define the tag value that could be increased dynamically for concrete parameter. Keep in mind, this will slow performance and spawn new Objects in runtime. Reserved field will be added to the end of the structure.- Parameters:
tagId
- tagIdlength
- required amount of bytes for value or MessageStructure.VARIABLE_LENGTH.
-
reserveString
public void reserveString(int tagId) -
reserveString
public void reserveString(int tagId, int length) -
reserveLong
public void reserveLong(int tagId, int length) -
reserve
public void reserve(int position, int tagId, int length) Specifies tagId and size of the tag value. Reserved field will be inserted at specified position.- Parameters:
position
- position to insent the tagtagId
- tagIdlength
- required amount of bytes for value or MessageStructure.VARIABLE_LENGTH.- See Also:
-
reserveString
public void reserveString(int position, int tagId, int length) -
reserveLong
public void reserveLong(int position, int tagId, int length) -
getTagId
public int getTagId(int index) -
getLength
public int getLength(int index) -
getType
public com.epam.fix.message.ValueType getType(int index) -
getSize
public int getSize() -
containsTagId
public boolean containsTagId(int tag) -
indexOfTag
public int indexOfTag(int tag) -
append
Append fields to the end of current structure.- Parameters:
struct
-
-
merge
-
indexOf
public int indexOf(int tagId) -
setLength
public void setLength(int tagId, int length) Change the length for specific tag.- Parameters:
tagId
-length
- required amount of bytes for value or MessageStructure.VARIABLE_LENGTH.
-
setLength
public void setLength(int tagId, int occurance, int length) Change the length for specific tag.- Parameters:
tagId
-occurance
-length
- required amount of bytes for value or MessageStructure.VARIABLE_LENGTH.
-
setLengthAtIndex
public void setLengthAtIndex(int tagIndex, int length) -
setType
public void setType(int tagId, com.epam.fix.message.ValueType type) -
setType
public void setType(int tagId, int occurance, com.epam.fix.message.ValueType type) -
setTypeAtIndex
public void setTypeAtIndex(int tagIndex, com.epam.fix.message.ValueType type) -
equals
-
hashCode
public int hashCode()
-