Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-61

Extend SessionState to track whether a Logout has been received

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.3
    • Component/s: None
    • Labels:
      None

      Description

      If the onLogout() callback is executed, it would be nice to know whether this was a normal logout,
      ie the other side sent a "Logout" (and we responded to it), or whether we sent a Logout and got an answer.

      I suggest to add the boolean variable receivedLogout with appropriate setter and getter methods to the SessionState:

      public boolean isLogoutReceived()
      public void setLogoutReceived(boolean logoutReceived)

      The flag is cleared initially and set in nextLogout() to indicate that a Logout has been received (or sent). In the method
      disconnect(), the flag is cleared after the call to the onLogout() callback.

      A delegate method isLogoutReceived() is added to the Session object to make the current state accessible from outside.

      Example usage:

      public void onLogout(SessionID sessionID)

      { String disconnectDescription = ( session.receivedLogout() ? "Regular" : "Unsolicited" ); ... }

        Attachments

          Activity

            People

            • Assignee:
              admin Steve Bate
              Reporter:
              jthoennes Jörg Thönnes
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: