powered by Jive Software

getAllRoms Muc

Hi community,

How I can get all rooms exist in openfire with java?

Thanks.

Send a service discovery items request to Openfire’s MUC service (which is by default conference.yourdomain)

See http://xmpp.org/extensions/xep-0045.html#disco-rooms

With Smack it is done with MultiUserChat.getHostedRooms() I think.

I not need see all " MultiUserChat.getHostedRooms()"

I use :

jR = MultiUserChat.getJoinedRooms(connection, user);

But not work when user is disconnect, only work when user is online, How I can fix this problem ?

You asked for all rooms in Openfire.

Maybe ask your question in the Smack Users forum.

Nevertheless here are my thoughts:

If the user is offline, he’s not in any room.

From a XMPP perspective you can only ask for all occupants in a room (i.e. people who are currently online and IN the room).

http://xmpp.org/extensions/xep-0045.html#disco-roomitems

Iteresting, mm… how I can get roms with owned specific?

example :

If I need see all the rooms, the program is to slow, example

Rom1, … Rom1000 - > for = 1 sec

Rom1, … Rom10000 - > for = 2 sec aprox.

Rom1…Rom10000000000000000 - > for = x secounds is to slow run all roms,

MultiUserChat.getHostedRooms(connection,“rooms user specific” “conference.”+connection.getServiceName());

I think I can get it, the owner user, but I don’t know how

My rooms are persist (is fundamental)

Please be clear about your problem. I don’t understand it.

Querying for 1000 rooms in 1 sec is not that slow imo. (XML (de-)serializing, roundtrip to server, Java object creation).

WTF you are doing? Why would you need 10000000000000000 (public) rooms?

And especially, why would you want to query all of them?