I needed to know the number of messages that an user have (offline messages) and may request some of them only.
I’‘ve to implement a plugin to get the number of offline messages that an user have… but I don’'t know where to begun… For example, where does Jive Messenger store the offline messages (I soppose in a db, but how can I get that db?..)
Offline messages can be accessed via the OfflineMessageStore class located in the org.jivesoftware.messenger package; to get the number of offline messages for a given user you can just do somethink like:
OfflineMessageStore oms = XMPPServer.getInstance().getOfflineMessageStore()
int numOfMsgs = oms.getMessages("bob").size();
To add to Ryan’'s tip, one way to expose this type of functionality at the protocol level would be to implement JEP-0013 – http://www.jabber.org/jeps/jep-0013.html.