// ISessionListener interface methods
/*
* Since we depend upon the Connection class associated with the ISession,
* we need to keep a reference to the ISession we are associated with.
* However, this session could be closed, at which time we want to give up
* our reference so that it can be garbage collected.
*/
/*
* Since we depend upon the Informix-specific IfmxConnection class, we need
* to keep a reference to the ISession we are associated with. However,
* this session could be closed, at which time we want to give up our
* reference so that it can be garbage collected.
*/
/**
* @see net.sourceforge.squirrel_sql.client.session.event.ISessionListener#allSessionsClosed()
*/
public void allSessionsClosed() {
_session.getApplication().getSessionManager().removeSessionListener(this );
_session = null;
}
/**
* @see net.sourceforge.squirrel_sql.client.session.event.ISessionListener#sessionClosed(net.sourceforge.squirrel_sql.client.session.event.SessionEvent)
*/
public void sessionClosed(SessionEvent evt) {
if (evt.getSession() == _session) {
_session.getApplication().getSessionManager().removeSessionListener(this );
_session = null;
}
}
/**
* @see net.sourceforge.squirrel_sql.client.session.event.ISessionListener#sessionClosing(net.sourceforge.squirrel_sql.client.session.event.SessionEvent)
*/
public void sessionClosing(SessionEvent evt) {
if (evt.getSession() == _session) {
_session.getApplication().getSessionManager().removeSessionListener(this );
_session = null;
}
}
|