[QFJ-61] Extend SessionState to track whether a Logout has been received Created: 04/Sep/06  Updated: 04/Sep/06  Resolved: 04/Sep/06

Status: Closed
Project: QuickFIX/J
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0.3

Type: Improvement Priority: Default
Reporter: Jörg Thönnes Assignee: Steve Bate
Resolution: Fixed Votes: 0
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" ); ... }
Generated at Sat Nov 23 13:13:02 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.