@ EventThread public void endSession ( ) { _clmgr . clientSessionWillEnd ( this ) ; // queue up a request for our connection to be closed (if we have a connection, that is) Connection conn = getConnection ( ) ; if ( conn != null ) { // go ahead and clear out our connection now to prevent funniness setConnection ( null ) ; // have the connection manager close our connection when it is next convenient _conmgr . closeConnection ( conn ) ; } // if we don't have a client object, we failed to resolve in the first place, in which case // we have to cope as best we can if ( _clobj != null ) { // and clean up after ourselves try { sessionDidEnd ( ) ; } catch ( Exception e ) { log . warning ( "Choked in sessionDidEnd " + this + "." , e ) ; } // release (and destroy) our client object _clmgr . releaseClientObject ( _clobj . username ) ; // we only report that our session started if we managed to resolve our client object, // so we only report that it ended in the same circumstance _clmgr . clientSessionDidEnd ( this ) ; } // we always want to clear ourselves out of the client manager _clmgr . clearSession ( this ) ; // clear out the client object so that we know the session is over _clobj = null ; }
Forcibly terminates a client s session . This must be called from the dobjmgr thread .