Seeing who is logged in to server

Hi all

At the moment i’'m trying to build a Jabber Client which will be used as part of an experiment for my Thesis.

So far I have been able to create connection to the server, create a chat with myself (so I receive all message I send) and listen for and display those messages.

I’'ve tried to create a chat with another user (i just log in to the server using the same client from another computer, and a different user name that I have set up as an adminstrator) but that does not work - most likely because i am trying to create a chat with a user that is not yet logged in (which is understandable)!

So i was wandering how i could retrieve a list of all those logged in to the server, so that i could then start a chat/multichat using that infomation?

I have heard talk about a ‘‘directory’’ but can’'t seem to find any reference to that in the API?

Any help would be absoluttely fantastic.

Dwarfer

i think that instaed of sending a message to some user you sould add a special user to your rooster (for example with spark or psi) and accept the request …

after that the status messages are pushed to your connection when you use smack … i think theres something like a roster manager that can tell you the status of any user on your roster…

generally in jabber/xmpp it is NOT possible to get someones status that has hot accepted you…

so setup a “normal” client … do some registrations and then “play” with your own implementation

Hi SmilingJ

Thanks for the answer. That was what i was originnaly doing. However I changed tack to joining a MUC room instead of working round the rosters. Thanks for the reply. I guess there is no way of seeing who is logged in and not to server.

Dwarf

Let us see if this works.

Set your subscription request to to automatically accept all

Now create a group on Openfire Server or LDAP server.

Add all the accounts to that group

Share that group to all users

Now all users should show in client in said group, unless they are offline.