powered by Jive Software

Help:listener for user login logoff enents!

hi everyone:

I’‘m developing a plugin. But now this plugin need a listener for user login logogg events. I’‘ve search for it in javadoc, but i can’'t found it.

please tell me how can i do it! Maybe somebody can give me a example!

thank you very much!

Hi Pathfinder,

There doesn’'t appear to be a user login/logoff event that you can listen for.

The UserEventListener interface only exposes 3 types of event, created/modified/deleting. Thats a nice change request, perhaps.

Meanwhile you will have to code this up yourself, by either writing a packet interceptor or going directly into the JM code finding out where these packets are handled. Logoff could be interesting, esp if the client doesn’'t logoff correctly or his session just dies, you might never get a logoff message.

Hope that helps,

Conor.

I’‘m going to call this “session events” and I’‘ve entered the feature request as JM-347. If I have time to get it into the 2.2.0 release, I’'ll add it. Or, if anyone else is interested in working on this, please let me know.

Regards,

Matt

Thanks for the feedback.

I have created a SessionEventListener and a SessionEventDispatcher, i will post it here later.