Smack

org.jivesoftware.smack.filter
Class PacketExtensionFilter

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

public class PacketExtensionFilter
extends java.lang.Object
implements PacketFilter

Filters for packets with a particular type of packet extension.

Author:
Matt Tucker

Constructor Summary
PacketExtensionFilter(java.lang.String namespace)
          Creates a new packet extension filter.
PacketExtensionFilter(java.lang.String elementName, java.lang.String namespace)
          Creates a new packet extension filter.
 
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
 

Constructor Detail

PacketExtensionFilter

public PacketExtensionFilter(java.lang.String elementName,
                             java.lang.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.

PacketExtensionFilter

public PacketExtensionFilter(java.lang.String namespace)
Creates a new packet extension filter. Packets will pass the filter if they have a packet extension that matches the specified namespace.

Parameters:
namespace - the XML namespace of the packet extension.
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.

Smack

Copyright © 2003-2007 Jive Software.