public interface PacketListener
processPacket(Stanza) method will be called. This is the
opposite approach to the functionality provided by a PacketCollector
which lets you block while waiting for results.
Additionally you are able to intercept Packets that are going to be send and
make modifications to them. You can register a PacketListener as interceptor
by using XMPPConnection.addPacketInterceptor(PacketListener,
org.jivesoftware.smack.filter.PacketFilter)
| Modifier and Type | Method and Description |
|---|---|
void |
processPacket(Stanza packet)
Process the next packet sent to this packet listener.
|
void processPacket(Stanza packet) throws SmackException.NotConnectedException
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.SmackException.NotConnectedException