Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ public enum Tags {
ClOrdID(11),
EncryptMethod(98),
EndSeqNo(16),
GapFill(123),
HeartBtInt(108),
MsgSeqNum(34),
MsgType(35),
NewSeqNo(36),
OrderQty(38),
OrdType(40),
OrigSendingTime(122),
Expand All @@ -44,6 +46,7 @@ public enum Tags {
Symbol(55),
TargetCompID(56),
TestReqID(112),
TimeInForce(59),
TransactTime(60),
RawDataLength(95),
RawData(96),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
import static com.lmax.nanofix.fields.Tags.ClOrdID;
import static com.lmax.nanofix.fields.Tags.EncryptMethod;
import static com.lmax.nanofix.fields.Tags.EndSeqNo;
import static com.lmax.nanofix.fields.Tags.GapFill;
import static com.lmax.nanofix.fields.Tags.HeartBtInt;
import static com.lmax.nanofix.fields.Tags.MsgSeqNum;
import static com.lmax.nanofix.fields.Tags.NewSeqNo;
import static com.lmax.nanofix.fields.Tags.OrdType;
import static com.lmax.nanofix.fields.Tags.OrderQty;
import static com.lmax.nanofix.fields.Tags.OrigSendingTime;
Expand All @@ -52,6 +54,7 @@
import static com.lmax.nanofix.fields.Tags.Symbol;
import static com.lmax.nanofix.fields.Tags.TargetCompID;
import static com.lmax.nanofix.fields.Tags.TestReqID;
import static com.lmax.nanofix.fields.Tags.TimeInForce;
import static com.lmax.nanofix.fields.Tags.TransactTime;
import static com.lmax.nanofix.fields.Tags.Username;

Expand Down Expand Up @@ -92,7 +95,7 @@ public FixMessageBuilder(final String version) {
* @param messageLengthOverride The value of the (9) message length tag.
* @return FixMessageBuilder
*/
public FixMessageBuilder overrideMessageLength(final String messageLengthOverride) {
public FixMessageBuilder overrideMessageLength(String messageLengthOverride) {
this.messageLengthOverride = messageLengthOverride;
return this;
}
Expand All @@ -109,20 +112,17 @@ public FixMessageBuilder overrideChecksum(final String checksumOverride) {
}

public FixMessageBuilder messageType(final String type) {
if (MsgType.knownMsgType(type)) {
throw new RuntimeException("Please use the MsgType enumeration");
}
return addTag(Tags.MsgType.getTag(), type);
}

public FixMessageBuilder account(final String account) {
return addTag(Tags.Account.getTag(), account);
}

public FixMessageBuilder messageType(final MsgType type) {
return addTag(Tags.MsgType.getTag(), type.getCode());
}

public FixMessageBuilder account(final String account) {
return addTag(Tags.Account.getTag(), account);
}

public FixMessageBuilder senderCompID(final String senderCompID) {
return addTag(SenderCompID.getTag(), senderCompID);
}
Expand Down Expand Up @@ -244,6 +244,17 @@ public FixMessageBuilder origSendingTime(final ZonedDateTime origSendingTime) {
return addTag(OrigSendingTime.getTag(), com.lmax.nanofix.FixUtil.DATE_TIME_FORMATTER.format(origSendingTime));
}

public FixMessageBuilder timeInForce(final String tag) {
return addTag(TimeInForce.getTag(), tag);
}

public FixMessageBuilder newSeqNo(final int newSequenceNum) {
return addTag(NewSeqNo.getTag(), Integer.toString(newSequenceNum));
}

public FixMessageBuilder gapFill(final String value) {
return addTag(GapFill.getTag(), value);
}

public FixMessageBuilder append(final int tag, final String value) {
return addTag(tag, value);
Expand Down
Loading