Interface PacketInterceptor

All Known Implementing Classes:

public interface PacketInterceptor

Provides a mechanism to intercept and modify packets that are going to be sent to the server. PacketInterceptors are added to the Connection 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.

Gaston Dombiak
See Also:
Connection.addPacketInterceptor(PacketInterceptor, org.jivesoftware.smack.filter.PacketFilter)

Method Summary
 void interceptPacket(Packet packet)
          Process the packet that is about to be sent to the server.

Method Detail


void interceptPacket(Packet packet)
Process the packet that is about to be sent to the server. The intercepted packet can be modified by the interceptor.

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.


Copyright © 2003-2007 Jive Software.