Package org.jivesoftware.smack.filter
Class StanzaExtensionFilter
- java.lang.Object
-
- org.jivesoftware.smack.filter.StanzaExtensionFilter
-
- All Implemented Interfaces:
StanzaFilter
,Predicate<Stanza>
- Direct Known Subclasses:
ChatMarkersFilter
,EligibleForChatMarkerFilter
,EventExtensionFilter
public class StanzaExtensionFilter extends java.lang.Object implements StanzaFilter
Filters for stanzas with a particular type of stanza extension.
-
-
Constructor Summary
Constructors Constructor Description StanzaExtensionFilter(java.lang.String namespace)
Creates a new stanza extension filter.StanzaExtensionFilter(java.lang.String elementName, java.lang.String namespace)
Creates a new stanza extension filter.StanzaExtensionFilter(ExtensionElement packetExtension)
Creates a new stanza extension filter for the given stanza extension.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(Stanza packet)
Tests whether or not the specified stanza should pass the filter.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.filter.StanzaFilter
asPredicate, test
-
-
-
-
Constructor Detail
-
StanzaExtensionFilter
public StanzaExtensionFilter(java.lang.String elementName, java.lang.String namespace)
Creates a new stanza extension filter. Stanzas will pass the filter if they have a stanza extension that matches the specified element name and namespace.- Parameters:
elementName
- the XML element name of the stanza extension.namespace
- the XML namespace of the stanza extension.
-
StanzaExtensionFilter
public StanzaExtensionFilter(java.lang.String namespace)
Creates a new stanza extension filter. Stanzas will pass the filter if they have a stanza extension that matches the specified namespace.- Parameters:
namespace
- the XML namespace of the stanza extension.
-
StanzaExtensionFilter
public StanzaExtensionFilter(ExtensionElement packetExtension)
Creates a new stanza extension filter for the given stanza extension.- Parameters:
packetExtension
- TODO javadoc me please
-
-
Method Detail
-
accept
public boolean accept(Stanza packet)
Description copied from interface:StanzaFilter
Tests whether or not the specified stanza should pass the filter.- Specified by:
accept
in interfaceStanzaFilter
- Parameters:
packet
- the stanza to test.- Returns:
- true if and only if
stanza
passes the filter.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-