// TBD: Due to the scheduler's behavior, this notification
// may happen out of order with respect to the
// 'notifyLoggedIn' callback. Also, this notification may
// also happen even though 'notifyLoggedIn' was not invoked.
// Are these behaviors okay? -- ann (3/19/07)
scheduleTask(new AbstractKernelRunnable("NotifyLoggedOut") {
public void run() {
identity.notifyLoggedOut();
} });
if (sessionService.removeUserLogin(identity, this)) {
deactivateIdentity();
}
if (getCurrentState() != State.DISCONNECTED) {
if (graceful) {
assert !closeConnection;
}
if (closeConnection) {
closeConnection();
}
}
if (sessionRefId != null) {
scheduleTask(
new AbstractKernelRunnable("NotifyListenerAndRemoveSession") {
public void run() {
ClientSessionImpl sessionImpl =
ClientSessionImpl.getSession(dataService, sessionRefId);
sessionImpl.notifyListenerAndRemoveSession(
dataService, graceful, true);