Class AbstractFIXFieldList

All Implemented Interfaces:
Iterable<FIXField>
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.
  • 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 protected AbstractFIXFieldList(FIXFieldList message)
      Deprecated.
      Creates FIXFieldList 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

      protected abstract FIXFieldList makeStandalone()
    • switchToStandalone

      protected void switchToStandalone()
    • add

      public final int add(TagValue tagValue)
    • addAll

      public final boolean addAll(FIXFieldList list)
    • clear

      public void clear()
      Overrides:
      clear in class IndexedStorage
    • deepCopyTo

      public final FIXFieldList deepCopyTo(FIXFieldList cloned)
    • canCopyInPlace

      protected boolean canCopyInPlace(int index, int oldLen, int newLen)
      Overrides:
      canCopyInPlace in class IndexedStorage
    • canCopyInPlaceNumber

      protected boolean canCopyInPlaceNumber(int index, int oldLen, int newLen)
      Overrides:
      canCopyInPlaceNumber in class IndexedStorage
    • getTagNumAtIndex

      public final int getTagNumAtIndex(int index)
    • getTagLength

      public final int getTagLength(int tag) throws FieldNotFoundException
      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

      public final String toString()
      Converts collection of fix fields to string.
      Overrides:
      toString in class Object
    • toPrintableString

      public final String toPrintableString()
    • toPrintableString

      @Deprecated public static String toPrintableString(String msg)
      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 the origBuffer, and returns the next index. The SOH symbol is added after each field.
      Parameters:
      dst - the origBuffer
      offset - the offset in origBuffer
    • split

      public 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).
      Parameters:
      tag - the tag number
      Returns:
      List of repeating groups (each one is separate FIXFieldList)
    • notifyInvalidMessage

      protected abstract List<Map<Integer,FIXField>> notifyInvalidMessage(int rgTag, int rgFirstTag)
    • getTagIndex

      public final int getTagIndex(int tag)
      Overrides:
      getTagIndex in class IndexedStorage
    • 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 class IndexedStorage
      Parameters:
      tag - the fix tag.
      Returns:
      true if the element was removed.
    • isEmpty

      public boolean isEmpty()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class IndexedStorage
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class IndexedStorage
    • getUid

      public long getUid()
    • setUid

      public void setUid(long uid)
    • initUid

      public void initUid()
    • clearUid

      public void clearUid()
    • getTagValueIterator

      protected Iterator<TagValue> getTagValueIterator()