|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PacketListener
Provides a mechanism to listen for packets that pass a specified filter.
This allows event-style programming -- every time a new packet is found,
the processPacket(Packet)
method will be called. This is the
opposite approach to the functionality provided by a PacketCollector
which lets you block while waiting for results.
Connection.addPacketListener(PacketListener, org.jivesoftware.smack.filter.PacketFilter)
Method Summary | |
---|---|
void |
processPacket(Packet packet)
Process the next packet sent to this packet listener. |
Method Detail |
---|
void processPacket(Packet packet)
A single thread is responsible for invoking all listeners, so it's very important that implementations of this method not block for any extended period of time.
packet
- the packet to process.
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |