private void installConnectionListeners ( final XMPPConnection connection ) { if ( connection != null ) { connectionListener = new AbstractConnectionClosedListener ( ) { @ Override public void connectionTerminated ( ) { unregisterInstanceFor ( connection ) ; } } ; connection . addConnectionListener ( connectionListener ) ; } }
Configure a session setting some action listeners ...