mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-14 15:01:07 +01:00
Replace PacketInterceptor with PacketListener
both serve the same purpose: As callback for Packets. There is no need to have both, so remace PacketInterceptor and let PacketListener take its place. Some classes like ChatStateManager can now use MessageListener as interceptor callback, which is more convenient.
This commit is contained in:
parent
fd7b747987
commit
63d52f6eaa
8 changed files with 57 additions and 95 deletions
|
|
@ -22,7 +22,6 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
|
|||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.ConnectionCreationListener;
|
||||
import org.jivesoftware.smack.Manager;
|
||||
import org.jivesoftware.smack.PacketInterceptor;
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.XMPPConnectionRegistry;
|
||||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
|
|
@ -344,8 +343,8 @@ public class EntityCapsManager extends Manager {
|
|||
// Intercept presence packages and add caps data when intended.
|
||||
// XEP-0115 specifies that a client SHOULD include entity capabilities
|
||||
// with every presence notification it sends.
|
||||
PacketInterceptor packetInterceptor = new PacketInterceptor() {
|
||||
public void interceptPacket(Packet packet) {
|
||||
PacketListener packetInterceptor = new PacketListener() {
|
||||
public void processPacket(Packet packet) {
|
||||
if (!entityCapsEnabled)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue