powered by Jive Software

XMPP and SMACK Class Compatibility

My question is: will the Jive XMPP version of Packet and Message stay compatible with the Jive SMACK Packet and Message classes? Is it okay to mix the two? What is the recommended approach to using these two set of nearly identical classes?

I expected to find that the Jive Messenger Server and the SMACK Classes would both use the same implementation of Packet/Message.

Server side: I’'ve created a plugin that reads incoming XMPP Messages (org.xmpp.packet.Message).

Client side: I’'m creating SMACK Messages (org.jivesoftware.smack.packet.Message) and sending them to the server.

Good question, I think at some point they’'ll be meld into one library, but the current desire is to keep the two separate because the XMPP packet classes are heavier than the Smack packets (Matt/Gato am I missing th point here?)

Noah

Thanks for the reply.

Are there any XMPP Packet to SMACK Packet convertors available?

What I’‘m finding is that I have created some client-side SMACK-based classes, which when I try to use in my plug-in fail because the classes are slightly different. I’'m going to convert the XMPP packets on the server-side to SMACK packets and then continue processing.

Currently no. You’‘re best bet might be converting to raw xml and constructing a new converted packet. It’'s ugly, but should work.

Noah

bluestars:

I don’'t know about any other classes but one class in particular I have found useful inside of smack has been the JID class. I use it to prep and escape JIDs entered by the user to make sure they are kosher. Plus, the API is simpler and cleaner, I think at least, to use than StringUtils when you are looking to extract particular parts of the JID.

Alex