org.jivesoftware.smack.filter
Class PacketIDFilter
java.lang.Object
org.jivesoftware.smack.filter.PacketIDFilter
- All Implemented Interfaces:
- PacketFilter
public class PacketIDFilter
- extends java.lang.Object
- implements PacketFilter
Filters for packets with a particular packet ID.
- Author:
- Matt Tucker
|
Constructor Summary |
PacketIDFilter(java.lang.String packetID)
Creates a new packet ID filter using the specified packet ID. |
|
Method Summary |
boolean |
accept(Packet packet)
Tests whether or not the specified packet should pass the filter. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PacketIDFilter
public PacketIDFilter(java.lang.String packetID)
- Creates a new packet ID filter using the specified packet ID.
- Parameters:
packetID - the packet ID to filter for.
accept
public boolean accept(Packet packet)
- Description copied from interface:
PacketFilter
- Tests whether or not the specified packet should pass the filter.
- Specified by:
accept in interface PacketFilter
- Parameters:
packet - the packet to test.
- Returns:
- true if and only if packet passes the filter.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object