Record Class FixSession.Config

java.lang.Object
java.lang.Record
com.quantfinlib.fix.FixSession.Config
Enclosing class:
FixSession

public static record FixSession.Config(String senderCompId, String targetCompId, int heartbeatSeconds, String username, String password, boolean resetOnLogon) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    Config(String senderCompId, String targetCompId, int heartbeatSeconds)
     
    Config(String senderCompId, String targetCompId, int heartbeatSeconds, String username, String password)
     
    Config(String senderCompId, String targetCompId, int heartbeatSeconds, String username, String password, boolean resetOnLogon)
    Creates an instance of a Config record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the heartbeatSeconds record component.
    Returns the value of the password record component.
    boolean
    Returns the value of the resetOnLogon record component.
    Returns the value of the senderCompId record component.
    Returns the value of the targetCompId record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the username record component.
    withCredentials(String username, String password)
    Adds Username(553)/Password(554) to the initiator's Logon.
    Initiator sends ResetSeqNumFlag(141)=Y on Logon and restarts BOTH sequence counters at 1 (persisted) — the standard clean-slate reconnect when the two sides' stores have diverged beyond repair.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Config

      public Config(String senderCompId, String targetCompId, int heartbeatSeconds, String username, String password, boolean resetOnLogon)
      Creates an instance of a Config record class.
      Parameters:
      senderCompId - the value for the senderCompId record component
      targetCompId - the value for the targetCompId record component
      heartbeatSeconds - the value for the heartbeatSeconds record component
      username - the value for the username record component
      password - the value for the password record component
      resetOnLogon - the value for the resetOnLogon record component
    • Config

      public Config(String senderCompId, String targetCompId, int heartbeatSeconds)
    • Config

      public Config(String senderCompId, String targetCompId, int heartbeatSeconds, String username, String password)
  • Method Details

    • withCredentials

      public FixSession.Config withCredentials(String username, String password)
      Adds Username(553)/Password(554) to the initiator's Logon.
    • withResetOnLogon

      public FixSession.Config withResetOnLogon()
      Initiator sends ResetSeqNumFlag(141)=Y on Logon and restarts BOTH sequence counters at 1 (persisted) — the standard clean-slate reconnect when the two sides' stores have diverged beyond repair. The peer, per FIX 4.4, resets its own counters and confirms with 141=Y; any store history is abandoned, so messages sent before the reset are no longer recoverable by ResendRequest.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • senderCompId

      public String senderCompId()
      Returns the value of the senderCompId record component.
      Returns:
      the value of the senderCompId record component
    • targetCompId

      public String targetCompId()
      Returns the value of the targetCompId record component.
      Returns:
      the value of the targetCompId record component
    • heartbeatSeconds

      public int heartbeatSeconds()
      Returns the value of the heartbeatSeconds record component.
      Returns:
      the value of the heartbeatSeconds record component
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • password

      public String password()
      Returns the value of the password record component.
      Returns:
      the value of the password record component
    • resetOnLogon

      public boolean resetOnLogon()
      Returns the value of the resetOnLogon record component.
      Returns:
      the value of the resetOnLogon record component