Thanks for the info. I actually started reviewing the specifications for the protocol just before you recommended it, but I have now reached a point where I have a few more questions.
As nearly as I can tell, IQ msgs should be the preferred way of extending the protocol to accommodate custom messages. But when I look at all the use cases in the specs, it appears that it is always the client sending a get or set request to the server and the server responding. Is it kosher to have the server send unsolicited messages to clients? I can see what appears to be code to accommodate this case in XMPPConnection (i.e. it appears to check for a pending IQ with the same id and invokes the callback if one is found, but if not it creates and dispatches an IQEvent). I assumed this was to allow the server to send an IQ that was not the ‘‘result’’ of some client inquiry, but I also noticed that although handleIQ() appears to dispatch the event, IQEvent is not one of the events published in the list of events for XMPPConnection. Can I register a handler on the XIFF client for unsolicited IQ messages from the server?
Basically, what I would like to do is extend the protocol so that e.g. a user with moderator privileges could click a button to enable or disable a feature, show or hide a button, etc. on the client UI of all users in a particular room. I can see how I can write an extension in XIFF and a plugin in OpenFire to allow the moderator client to send this request and the plugin to process it, but I need to not only have the plugin respond to the sender, but also send some control (IQ) message to the room so that each client in that room will receive it. Can I just send the IQ msg to the room itself and it will be distributed all occupants? If I read the spec correctly, a chat message sent to the room is reflected to all the occupants, but I can’‘t find for sure whether this is also true for IQ messages. Do the IQ messages have to be sent directly to a user? If so, what API’'s on the server side would be relevant to allow me to iterate over the room occupants and send each of them this control message?
Oh well, I’'ll let you digest this one first before I ask anything else. Any help or suggestion is appreciated.