org.jivesoftware.smack.filter
Class PacketTypeFilter
java.lang.Object
   org.jivesoftware.smack.filter.PacketTypeFilter
org.jivesoftware.smack.filter.PacketTypeFilter
- All Implemented Interfaces: 
- PacketFilter
- public class PacketTypeFilter 
- extends Object- implements PacketFilter
Filters for packets of a particular type. The type is given as a Class object, so
 example types would:
 
      - Message.class
      
- IQ.class
      
- Presence.class
 
- Author:
- Matt Tucker
| Constructor Summary | 
| PacketTypeFilter(Class packetType)Creates a new packet type filter that will filter for packets that are the
 same type as packetType.
 | 
 
 
 
PacketTypeFilter
public PacketTypeFilter(Class packetType)
- Creates a new packet type filter that will filter for packets that are the
 same type as packetType.
 
- Parameters:
- packetType- the Class type.
 
accept
public boolean accept(Packet packet)
- Description copied from interface: PacketFilter
- Tests whether or not the specified packet should pass the filter.
 
- 
- Specified by:
- acceptin interface- PacketFilter
 
- 
- Parameters:
- packet- the packet to test.
- Returns:
- true if and only if packet passes the filter.
 
toString
public String toString()
- 
- Overrides:
- toStringin class- Object
 
- 
 
Copyright © 2003-2007 Jive Software.