The class declaration should look like this (assuming you are implementing just the packet processor):
public class Message extends XMPPProcessor implements XMPPProcessorIfc
The first thing to create is the plugin ID like above.
A plugin informs about it’s ID using following code:
private static final String ID = "message"; public String id() { return ID; }
As mentioned before this plugin receives only this kind of packets for processing which it is interested in. In this example, the plugin is interested only in packets with <message/> elements and only if they are in "jabber:client" namespace. To indicate all supported elements and namespaces we have to add 2 more methods:
public String[] supElements() { return new String[] {"message"}; } public String[] supNamespaces() { return new String[] {"jabber:client"}; }