I am attempting to populate a comboBox with the names of the rooms that are running on a Jabber Server.
So first I need to grab the Services that are running.
Collection servicesList = MultiUserChat.getServiceNames(conn); // conn = XMPP
I can then iterate over the collection to obtain a list of services.
I then need to find out the rooms hosted on the Service so
String service = (String)servicesIter.next();
Collection roomsList = MultiUserChat.getHostedRooms(conn, service);
I now run into my problem, I want to create new MUC’'s with the roomNames and then add these rooms to my comboBox but I cant seem to actually get at the room name.
I’‘ve tried to iterate over the Collection of hostedRooms but if I try and use whats inside I always run into a ClassCastException (Obviously my casting is wrong but I’'m all out of ideas )
I was wondering if anybody had a good solution to what I am trying to do or could point me in the right direction.