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 booleanprotected booleanprotected booleanprotected booleanprotected com.epam.fix.message.AbstractFIXFieldList.TagValueIteratorprotected longstatic final intFields inherited from class com.epam.fix.message.ExtendedIndexedStorage
NOT_AN_INT_VALUE_ERRORFields inherited from class com.epam.fix.message.IndexedStorage
FIELD_SEPARATOR, NOTFOUND -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates an empty message that is engine owned TBD: protect(hide) the constructor from user access.protectedAbstractFIXFieldList(boolean isUserOwned) Creates an empty message TBD: make with default modificator - all oter should use newInstanceFromPoolprotectedAbstractFIXFieldList(FIXFieldList message) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionfinal intfinal booleanaddAll(FIXFieldList list) final intCalculates body length for collection.final intCalculates checksum.protected booleancanCopyInPlace(int index, int oldLen, int newLen) protected booleancanCopyInPlaceNumber(int index, int oldLen, int newLen) voidclear()voidclearUid()final FIXFieldListdeepCopyTo(FIXFieldList cloned) booleanfinal intgetTagIndex(int tag) final intgetTagLength(int tag) final intgetTagNumAtIndex(int index) longgetUid()inthashCode()voidinitUid()booleanisEmpty()final booleanfinal booleanfinal booleanfinal booleanbooleanprotected abstract FIXFieldListnotifyInvalidMessage(int rgTag, int rgFirstTag) final booleanremoveTag(int tag) Removes a fix field with specified tag from collection.voidsetUid(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 voidfinal byte[]Writes field list to array of bytes.final inttoByteArrayAndReturnNextPosition(byte[] dst, int offset) Writes the list of field to theorigBuffer, and returns the next index.final Stringstatic StringtoPrintableString(String msg) Deprecated.final StringtoString()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, setAtIndexMethods 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, setAtIndexMethods 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, updateValueAtIndexMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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.CreatesFIXFieldListcontaining 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:
clearin classIndexedStorage
-
deepCopyTo
-
canCopyInPlace
protected boolean canCopyInPlace(int index, int oldLen, int newLen) - Overrides:
canCopyInPlacein classIndexedStorage
-
canCopyInPlaceNumber
protected boolean canCopyInPlaceNumber(int index, int oldLen, int newLen) - Overrides:
canCopyInPlaceNumberin 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. TheSOHsymbol 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:
getTagIndexin 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:
removeTagin classIndexedStorage- Parameters:
tag- the fix tag.- Returns:
trueif the element was removed.
-
isEmpty
public boolean isEmpty() -
equals
- Overrides:
equalsin classIndexedStorage
-
hashCode
public int hashCode()- Overrides:
hashCodein classIndexedStorage
-
getUid
public long getUid() -
setUid
public void setUid(long uid) -
initUid
public void initUid() -
clearUid
public void clearUid() -
getTagValueIterator
-