Smack

org.jivesoftware.smack.filter
Class PacketIDFilter

java.lang.Object
  extended by org.jivesoftware.smack.filter.PacketIDFilter
All Implemented Interfaces:
PacketFilter

public class PacketIDFilter
extends Object
implements PacketFilter

Filters for packets with a particular packet ID.

Author:
Matt Tucker

Constructor Summary
PacketIDFilter(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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PacketIDFilter

public PacketIDFilter(String packetID)
Creates a new packet ID filter using the specified packet ID.

Parameters:
packetID - the packet ID to filter for.
Method Detail

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 String toString()
Overrides:
toString in class Object

Smack

Copyright © 2003-2007 Jive Software.