I’‘m writing a plugin that intercepts messages that have an extension and does things with them. (Vague enough description for you?) However, I would like my plugin to have exclusive control of the packets - i.e. I’'d rather not have any other plugins or other parts of Spark deal with them.
For example: The messages coming in are of type NORMAL, have an extension, and some text in the body. The broadcast plugin picks up these packets and shows the broadcast alert window. But, NORMAL messages never make it to the ChatManager, and any MessageListener or MessageFilter I’‘ve set up don’‘t see these messages. I’'d like my plugin to grab the packets before the broadcast plugin, and somehow mark the packets as “handled” to the rest of the system.
It appears there are a few different points in the Packet/Message processing cycle where they can be listened for. The broadcast plugin (and some others provided by Jive) attach listeners to the XMPP Connection. Then there are MessageFilters and MessageListeners that attach to the ChatManager. And the Workspace seems to get a crack at some packets, too.
Anyway, I don’‘t think I’‘m being very clear. I’'m trying to get a handle on the processing flow of a packet that comes into Spark. Can anyone provide help. A flow diagram would be super.