/** Template method to perform any work when destroying the connectoe */ protected void disposeConnector() { for (Iterator iterator = connCache.keySet().iterator(); iterator.hasNext(); ) { UMOEndpointURI uri = (UMOEndpointURI) iterator.next(); XMPPConnection conn = (XMPPConnection) connCache.remove(uri); conn.close(); } }
protected void doDisconnect() throws Exception { try { if (groupChat != null) { groupChat.leave(); } if (xmppConnection != null) { xmppConnection.close(); } } finally { xmppConnection = null; } }