Class FlexibleStanzaTypeFilter<S extends Stanza>

java.lang.Object
org.jivesoftware.smack.filter.FlexibleStanzaTypeFilter<S>
All Implemented Interfaces:
Predicate<Stanza>, StanzaFilter
Direct Known Subclasses:
IQTypeFilter, MessageTypeFilter, MessageWithBodiesFilter, MessageWithSubjectFilter, MessageWithThreadFilter, PresenceTypeFilter, ThreadFilter

public abstract class FlexibleStanzaTypeFilter<S extends Stanza> extends Object implements StanzaFilter
Filters for stanzas of a particular type and allows a custom method to further filter the packets.
  • Field Details

    • stanzaType

      protected final Class<S extends Stanza> stanzaType
  • Constructor Details

    • FlexibleStanzaTypeFilter

      public FlexibleStanzaTypeFilter(Class<S> packetType)
    • FlexibleStanzaTypeFilter

      public FlexibleStanzaTypeFilter()
  • Method Details

    • accept

      public final 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.
    • acceptSpecific

      protected abstract boolean acceptSpecific(S packet)
    • toString

      public String toString()
      Overrides:
      toString in class Object