powered by Jive Software

Best way to monitor presence in external component?



I am new to XMPP, Whack, and Openfire and have been able to get Openfire and a sample external component up and running pretty quickly, nice job on the library, I have found it very straight forward and easy to use so far.

I started with the Weather component sample and modified it with my business logic. What I need it to do is the following:

  1. At startup, retrieve list of all clients currently connected to the server

  2. Monitor any presence changes from all clients as they connect to the server including newly registered

I was able to hard code a presence subscribe request packet and send it to my test client, have that client manually accept the request and then from that point forward my component receives all presence changes from that client. Great! However, how can I have my component be notified of new clients so that it can send out these presence subscribe requests? And how can it retrieve its current roster so that it does not send redundant subscribe requests? If I send a get roster message to the server I get an empty reply even after I appear to have clients in my roster?

I am also deveoping a custom client so I also have full control over any functionality in the client to make this work, i.e. replace the manual accept step mentioned above to automatically accept subscription requests from this component. I only plan on supporting this custom client for use with this component.

Thanks in advance for any advice,

-Kevin King


Did you ever work out how to do this. Seems like I’ve gone down the same path as you. I just want to have an external component get presence info for users so it can put that info into other objects. I could use the presence plugin which does exactly what I want, but I was looking for a standard way to achieve it.