Hi
I want to create a plugin that listend on sessionClosed that would unregister a user from hist PubSub…
I do need help on how to match hist session with information that I can get from IoSession session.
{code}
public void sessionClosed(NextFilter nextFilter, IoSession session) throws Exception {
// Update list of sessions using this filter
session.toString();
try
{
SessionManager ss = XMPPServer.getInstance().getSessionManager();
JID j = new JID("bb@openfire.betware.com/bingo");
ClientSession clss = ss.getSession(j);
System.out.println(“CLOSED (” + clss.getHostAddress() + ") ");
System.out.println(“CLOSED (” +clss.toString() + ") ");
System.out.println(“CLOSED (” +clss.hashCode() );
System.out.println(“CLOSED (” +clss.getStreamID() );
} catch (Exception e)
{
e.printStackTrace();
}
sessions.remove(session);
if (enabled) {
// Print that a session was closed
System.out.println(“CLOSED (” + session.hashCode() + ") ");
}
super.sessionClosed(nextFilter, session);
}
{code}