org.jivesoftware.smack.filter
Class PacketExtensionFilter
java.lang.Object
org.jivesoftware.smack.filter.PacketExtensionFilter
- All Implemented Interfaces:
- PacketFilter
public class PacketExtensionFilter
- extends Object
- implements PacketFilter
Filters for packets with a particular type of packet extension.
- Author:
- Matt Tucker
Method Summary |
boolean |
accept(Packet packet)
Tests whether or not the specified packet should pass the filter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PacketExtensionFilter
public PacketExtensionFilter(String elementName,
String namespace)
- Creates a new packet extension filter. Packets will pass the filter if
they have a packet extension that matches the specified element name
and namespace.
- Parameters:
elementName
- the XML element name of the packet extension.namespace
- the XML namespace of the packet extension.
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.
Copyright © 2003 Jive Software.