Klasse SimpleFixMessageBuilder

java.lang.Object
com.github.hypfvieh.util.SimpleFixMessageBuilder

public class SimpleFixMessageBuilder extends Object
Builder to create a FIX message without using any proprietary API. Handles header and trailer tags (including header hops) to create a properly sorted message. Does not support dictionaries, so be careful when dealing with repeating groups.
Seit:
1.0.6 - 2019-02-22
Autor:
hypfvieh
  • Konstruktordetails

    • SimpleFixMessageBuilder

      public SimpleFixMessageBuilder()
  • Methodendetails

    • setValue

      public SimpleFixMessageBuilder setValue(int _tag, Object _value, boolean _overwrite)
      Set/add tag value to FIX message to be created. Will overwrite existing tags depending on the provided boolean _overwrite.
      Parameter:
      _tag - tag number
      _value - value
      _overwrite - true to overwrite existing tag, false otherwise
      Gibt zurück:
      this
    • setValue

      public SimpleFixMessageBuilder setValue(int _tag, Object _value)
      Set/add tag value to FIX message to be created. Will always overwrite existing tags, do not use this for creating repeating group entries!
      Parameter:
      _tag - tag number
      _value - value
      Gibt zurück:
      this
    • setUtcTimestamp

      public SimpleFixMessageBuilder setUtcTimestamp(int _tag)
    • setUtcTimestamp

      public SimpleFixMessageBuilder setUtcTimestamp(int _tag, ZonedDateTime _zonedDateTime)
    • createBasicMessage

      public SimpleFixMessageBuilder createBasicMessage(String _fixVersion, String _msgType)
      Creates a basic FIX message containing only dummy header and trailer with the specified FIX version and message type.
      Parameter:
      _fixVersion - FIX version to use (null is not allowed)
      _msgType - message type to set (null is not allowed)
      Gibt zurück:
      this
    • build

      public String build()
      Builds the new message and returns it as String.
      Gibt zurück:
      String, maybe empty, never null