Package com.epam.fix.message
Class AbstractFIXFieldList
java.lang.Object
com.epam.fix.message.IndexedStorage
com.epam.fix.message.ExtendedIndexedStorage
com.epam.fix.message.HPExtendedIndexedStorage
com.epam.fix.message.AbstractFIXFieldList
- Direct Known Subclasses:
FIXFieldListAdapter
public abstract class AbstractFIXFieldList
extends HPExtendedIndexedStorage
implements Iterable<FIXField>
Created with IntelliJ IDEA.
User: wed
Date: 19.10.12
Time: 17:55
To change this template use File | Settings | File Templates.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.epam.fix.message.IndexedStorage
IndexedStorage.MISSING_TAG_HANDLING
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected boolean
protected boolean
protected boolean
protected com.epam.fix.message.AbstractFIXFieldList.TagValueIterator
protected long
static final int
Fields inherited from class com.epam.fix.message.ExtendedIndexedStorage
NOT_AN_INT_VALUE_ERROR
Fields inherited from class com.epam.fix.message.IndexedStorage
FIELD_SEPARATOR, NOTFOUND
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates an empty message that is engine owned TBD: protect(hide) the constructor from user access.protected
AbstractFIXFieldList
(boolean isUserOwned) Creates an empty message TBD: make with default modificator - all oter should use newInstanceFromPoolprotected
AbstractFIXFieldList
(FIXFieldList message) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionfinal int
final boolean
addAll
(FIXFieldList list) final int
Calculates body length for collection.final int
Calculates checksum.protected boolean
canCopyInPlace
(int index, int oldLen, int newLen) protected boolean
canCopyInPlaceNumber
(int index, int oldLen, int newLen) void
clear()
void
clearUid()
final FIXFieldList
deepCopyTo
(FIXFieldList cloned) boolean
final int
getTagIndex
(int tag) final int
getTagLength
(int tag) final int
getTagNumAtIndex
(int index) long
getUid()
int
hashCode()
void
initUid()
boolean
isEmpty()
final boolean
final boolean
final boolean
final boolean
boolean
protected abstract FIXFieldList
notifyInvalidMessage
(int rgTag, int rgFirstTag) final boolean
removeTag
(int tag) Removes a fix field with specified tag from collection.void
setUid
(long uid) final List<FIXFieldList>
split
(int tag) Utility method that splits current message into the repeating groups based on first mandatory tag in the repeating group (always first tag in the repeating group).protected void
final byte[]
Writes field list to array of bytes.final int
toByteArrayAndReturnNextPosition
(byte[] dst, int offset) Writes the list of field to theorigBuffer
, and returns the next index.final String
static String
toPrintableString
(String msg) Deprecated.final String
toString()
Converts collection of fix fields to string.Methods inherited from class com.epam.fix.message.HPExtendedIndexedStorage
getTagValueAsLocalMktTime, getTagValueAsLocalMktTime, getTagValueAsLocalMktTimeAtIndex, getTagValueAsTimeOnly, getTagValueAsTimeOnly, getTagValueAsTimeOnlyAtIndex, getTagValueAsTimestamp, getTagValueAsTimestamp, getTagValueAsTimestampAtIndex, getTagValueAsTZTimeOnly, getTagValueAsTZTimeOnly, getTagValueAsTZTimeOnlyAtIndex, getTagValueAsTZTimestamp, getTagValueAsTZTimestamp, getTagValueAsTZTimestampAtIndex, set, set, set, set, set, set, set, set, setAtIndex, setAtIndex, setAtIndex, setAtIndex
Methods inherited from class com.epam.fix.message.ExtendedIndexedStorage
addTag, addTag, addTag, addTagAtIndex, addTagAtIndex, addTagAtIndex, getBytes, getMsgSeqNumber, getMsgType, getMsgType, getMsgVersion, getTagValueAsBigDecimal, getTagValueAsBigDecimal, getTagValueAsBool, getTagValueAsBool, getTagValueAsByte, getTagValueAsByte, getTagValueAsByte, getTagValueAsByteAtIndex, getTagValueAsBytes, getTagValueAsBytes, getTagValueAsBytes, getTagValueAsBytes, getTagValueAsDateOnly, getTagValueAsDateOnly, getTagValueAsDateOnlyAtIndex, getTagValueAsDouble, getTagValueAsDouble, getTagValueAsInt, getTagValueAsInt, getTagValueAsIntAtIndex, getTagValueAsLocalMktTime, getTagValueAsLocalMktTime, getTagValueAsLocalMktTimeAtIndex, getTagValueAsLong, getTagValueAsLong, getTagValueAsMonthYear, getTagValueAsMonthYear, getTagValueAsMonthYearAtIndex, getTagValueAsReusableString, getTagValueAsReusableString, getTagValueAsString, getTagValueAsString, getTagValueAsStringBuff, getTagValueAsStringBuff, getTagValueAsTenor, getTagValueAsTenor, getTagValueAsTenorAtIndex, getTagValueAsTimeOnly, getTagValueAsTimeOnly, getTagValueAsTimeOnlyAtIndex, getTagValueAsTimestamp, getTagValueAsTimestamp, getTagValueAsTimestampAtIndex, getTagValueAsTZTimeOnly, getTagValueAsTZTimeOnly, getTagValueAsTZTimeOnlyAtIndex, getTagValueAsTZTimestamp, getTagValueAsTZTimestamp, getTagValueAsTZTimestampAtIndex, hasTagValue, isTagValueEqual, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setAtIndex, setAtIndex, setAtIndex, setAtIndex, setAtIndex, setAtIndex, setAtIndex, setAtIndex, setAtIndex, setAtIndex, setAtIndex, setAtIndex, setAtIndex
Methods inherited from class com.epam.fix.message.IndexedStorage
addRepeatingGroup, addRepeatingGroup, addRepeatingGroup, addRepeatingGroup, addRepeatingGroupAtIndex, addRepeatingGroupAtIndex, addRepeatingGroupAtIndex, addRepeatingGroupAtIndex, addTag, addTag, addTag, addTag, addTag, addTag, addTag, addTag, addTag, addTag, addTag, addTag, addTag, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndex, addTagAtIndexForRg, canCopyInPlaceWithLengthReducing, clearUnserializableTags, copyRepeatingGroup, copyRepeatingGroup, copyRepeatingGroup, copyRepeatingGroup, deepCopy, ensureCapacityAndEnlarge, ensureCapacityAndEnlarge, fillSubStorage, findOrPrepareToAdd, findOrPrepareToAdd, genericMessageToByteArrayAndReturnNextPosition, getFieldIndexData, getFIXVersion, getIndexCapacity, getNumOfGroup, getOrAddRepeatingGroup, getOrAddRepeatingGroup, getOrAddRepeatingGroupAtIndex, getOrAddRepeatingGroupAtIndex, getRawLength, getRepeatingGroup, getRepeatingGroup, getRepeatingGroupAtIndex, getRepeatingGroupAtIndex, getSize, getStorage, getStorageType, getTag, getTag, getTagAtIndex, getTagIdAtIndex, getTagIndex, getTagIndexBetween, getTagIndexStartingFrom, getTagValueAsBigDecimalAtIndex, getTagValueAsBoolAtIndex, getTagValueAsByteAtIndex, getTagValueAsBytesAtIndex, getTagValueAsBytesAtIndex, getTagValueAsDoubleAtIndex, getTagValueAsLongAtIndex, getTagValueAsReusableStringAtIndex, getTagValueAsStringAtIndex, getTagValueAsStringBuffAtIndex, getTagValueAtIndex, getTagValueLength, getTagValueLength, getTagValueLengthAtIndex, getTagValueOffsetAtIndex, invalidateRepeatingGroupIndex, isAllTagsInOneBuffer, isRepeatingGroupExists, isTagExists, isTagExists, mapPreparedTagInOrigStorage, mapTagInOrigStorage, markUnserializableTag, onEnlarge, preparedToByteArrayAndReturnNextPosition, preparedToByteArrayAndReturnNextPosition2, removeRepeatingGroup, removeRepeatingGroupAtIndex, removeTag, removeTagAtIndex, removeTagAtIndex, reserveTagAtIndex, reserveTagAtIndex, reserveTagAtIndexForRg, setOriginalBuffer, toByteArrayAndReturnNextPosition, transferDataToArena, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValue, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex, updateValueAtIndex
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Field Details
-
UNINITIALIZED_UID
public static final int UNINITIALIZED_UID- See Also:
-
uid
protected long uid -
tagValueIterator
protected com.epam.fix.message.AbstractFIXFieldList.TagValueIterator tagValueIterator -
forceCloneOnSend
protected boolean forceCloneOnSend -
isFree
protected boolean isFree -
isPreparedMessage
protected boolean isPreparedMessage -
isMessageIncomplete
protected boolean isMessageIncomplete
-
-
Constructor Details
-
AbstractFIXFieldList
protected AbstractFIXFieldList()Creates an empty message that is engine owned TBD: protect(hide) the constructor from user access. May bee need to have default constructor for user and special - for internal usage TBD: make with default modificator - all oter should use newInstanceFromPool- See Also:
-
setIsUserOwned(boolean)
-
AbstractFIXFieldList
protected AbstractFIXFieldList(boolean isUserOwned) Creates an empty message TBD: make with default modificator - all oter should use newInstanceFromPool- See Also:
-
setIsUserOwned(boolean)
-
AbstractFIXFieldList
Deprecated.CreatesFIXFieldList
containing the elements of the specified collection.- Parameters:
message
- - the collection whose fields are to be placed into this list
-
-
Method Details
-
isUserOwned
public boolean isUserOwned()- Returns:
- See Also:
-
setIsUserOwned(boolean)
-
isPreparedMessage
public final boolean isPreparedMessage() -
isMessageIncomplete
public final boolean isMessageIncomplete() -
isOriginatingFromPool
public final boolean isOriginatingFromPool() -
makeStandalone
-
switchToStandalone
protected void switchToStandalone() -
add
-
addAll
-
clear
public void clear()- Overrides:
clear
in classIndexedStorage
-
deepCopyTo
-
canCopyInPlace
protected boolean canCopyInPlace(int index, int oldLen, int newLen) - Overrides:
canCopyInPlace
in classIndexedStorage
-
canCopyInPlaceNumber
protected boolean canCopyInPlaceNumber(int index, int oldLen, int newLen) - Overrides:
canCopyInPlaceNumber
in classIndexedStorage
-
getTagNumAtIndex
public final int getTagNumAtIndex(int index) -
getTagLength
- Throws:
FieldNotFoundException
-
calculateBodyLength
public final int calculateBodyLength()Calculates body length for collection.- Returns:
- body length
-
calculateChecksum
public final int calculateChecksum()Calculates checksum.- Returns:
- checksum
-
toString
Converts collection of fix fields to string. -
toPrintableString
-
toPrintableString
Deprecated. -
toByteArray
public final byte[] toByteArray()Writes field list to array of bytes.- Returns:
- byte origBuffer
-
isMessageBufferContinuous
public final boolean isMessageBufferContinuous() -
toByteArrayAndReturnNextPosition
public final int toByteArrayAndReturnNextPosition(byte[] dst, int offset) Writes the list of field to theorigBuffer
, and returns the next index. TheSOH
symbol is added after each field.- Parameters:
dst
- the origBufferoffset
- the offset in origBuffer
-
split
Utility method that splits current message into the repeating groups based on first mandatory tag in the repeating group (always first tag in the repeating group).- Parameters:
tag
- the tag number- Returns:
- List of repeating groups (each one is separate FIXFieldList)
-
notifyInvalidMessage
-
getTagIndex
public final int getTagIndex(int tag) - Overrides:
getTagIndex
in classIndexedStorage
-
removeTag
public final boolean removeTag(int tag) Removes a fix field with specified tag from collection. The method removes the first occurrence of the specified tag.- Overrides:
removeTag
in classIndexedStorage
- Parameters:
tag
- the fix tag.- Returns:
true
if the element was removed.
-
isEmpty
public boolean isEmpty() -
equals
- Overrides:
equals
in classIndexedStorage
-
hashCode
public int hashCode()- Overrides:
hashCode
in classIndexedStorage
-
getUid
public long getUid() -
setUid
public void setUid(long uid) -
initUid
public void initUid() -
clearUid
public void clearUid() -
getTagValueIterator
-