Class StanzaExtensionFilter

java.lang.Object
org.jivesoftware.smack.filter.StanzaExtensionFilter
All Implemented Interfaces:
Predicate<Stanza>, StanzaFilter

public class StanzaExtensionFilter extends Object implements StanzaFilter
Filters for stanzas with a particular type of stanza extension.
  • Constructor Details

    • StanzaExtensionFilter

      public StanzaExtensionFilter(String elementName, 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(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 Details

    • 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 interface StanzaFilter
      Parameters:
      packet - the stanza to test.
      Returns:
      true if and only if stanza passes the filter.
    • toString

      public String toString()
      Overrides:
      toString in class Object