powered by Jive Software

Sending Data Object to & from a plugin

Hi All,

I am working on an openfire plugin. I need to pass some Data Objects from my Smack client to my Plugin code. I figured out that I can register my plugin as a component and give it some sub-domain. This way I can send the packets from my Smack client to my plugin code.

I used org.jivesoftware.smack.packet.Message’s setProperty method to send a Data Object. It worked fine. Now the problem is how can I extract this java Object at the Plugin side. I checked the org.xmpp.packet.Message class but could not find a straight forward method to get the Java Object form the message.

Please let me know how I can resolve this problem? Also, after processing I need to send the Java Object back to my Smack client from the plugin application.

Best Regards,


You could use getChildElement(String name, String namespace). How to work with an “Element”, check dom4j API