public interface PacketInterceptor
XMPPConnection
together with a PacketFilter
so that only
certain packets are intercepted and processed by the interceptor.
This allows event-style programming -- every time a new packet is found,
the interceptPacket(Packet)
method will be called.
Modifier and Type | Method and Description |
---|---|
void |
interceptPacket(Packet packet)
Process the packet that is about to be sent to the server.
|
void interceptPacket(Packet packet)
Interceptors are invoked using the same thread that requested the packet to be sent, so it's very important that implementations of this method not block for any extended period of time.
packet
- the packet to is going to be sent to the server.