Openfire broadcast plugin: how to know whether user is offline or online programatically by modifying plugin source code


Default broadcast plugin send message to offline and online user.For offline user i want to call web services. In broadcast source plugin code , i am able to know jabber id’s of members of group.

I want to know for all jabber id’s if they are online or offline. Is there any openfire class which tells presence of user.?

plugin code:

SessionResultFilter filter = SessionResultFilter





Collection sessions = SessionManager.getInstance()


if (sessions != null && sessions.size() > 0) {

for (ClientSession cs : sessions) {

ClientSession c = (ClientSession) cs;

c.getUsername();//there are online username