Class SimpleFixMessageBuilder
java.lang.Object
com.github.hypfvieh.util.SimpleFixMessageBuilder
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.
- Since:
- 1.0.6 - 2019-02-22
- Author:
- hypfvieh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the new message and returns it as String.createBasicMessage(String _fixVersion, String _msgType) Creates a basic FIX message containing only dummy header and trailer with the specified FIX version and message type.setUtcTimestamp(int _tag) setUtcTimestamp(int _tag, ZonedDateTime _zonedDateTime) Set/add tag value to FIX message to be created.Set/add tag value to FIX message to be created.
-
Constructor Details
-
SimpleFixMessageBuilder
public SimpleFixMessageBuilder()
-
-
Method Details
-
setValue
Set/add tag value to FIX message to be created. Will overwrite existing tags depending on the provided boolean _overwrite.- Parameters:
_tag- tag number_value- value_overwrite- true to overwrite existing tag, false otherwise- Returns:
- this
-
setValue
Set/add tag value to FIX message to be created. Will always overwrite existing tags, do not use this for creating repeating group entries!- Parameters:
_tag- tag number_value- value- Returns:
- this
-
setUtcTimestamp
-
setUtcTimestamp
-
createBasicMessage
Creates a basic FIX message containing only dummy header and trailer with the specified FIX version and message type.- Parameters:
_fixVersion- FIX version to use (null is not allowed)_msgType- message type to set (null is not allowed)- Returns:
- this
-
build
Builds the new message and returns it as String.- Returns:
- String, maybe empty, never null
-