1 20 21 package org.jivesoftware.smack.filter; 22 23 import org.jivesoftware.smack.packet.Packet; 24 25 30 public class PacketIDFilter implements PacketFilter { 31 32 private String packetID; 33 34 39 public PacketIDFilter(String packetID) { 40 if (packetID == null) { 41 throw new IllegalArgumentException ("Packet ID cannot be null."); 42 } 43 this.packetID = packetID; 44 } 45 46 public boolean accept(Packet packet) { 47 return packetID.equals(packet.getPacketID()); 48 } 49 } 50 | Popular Tags |