I’'ve used Smack in the following way:
The Java instance sends a message to a person on his list.
Only that person is allowed to send messages to the java instance.
This is done by:
PacketFilter filter = new AndFilter(new PacketTypeFilter(Message.class),
PacketListener myListener = this;
The void processPacket(Packet) function is called twice each time that person sends a message to the java instance.
I thought it could be the AndFilter that processes the packet for each filter, but when I use only one filter, the function is called twice too.