Package org.jivesoftware.smack.filter
Class FlexibleStanzaTypeFilter<S extends Stanza>
- java.lang.Object
-
- org.jivesoftware.smack.filter.FlexibleStanzaTypeFilter<S>
-
- All Implemented Interfaces:
StanzaFilter,Predicate<Stanza>
- Direct Known Subclasses:
IQTypeFilter,MessageTypeFilter,MessageWithBodiesFilter,MessageWithSubjectFilter,MessageWithThreadFilter,PresenceTypeFilter,ThreadFilter
public abstract class FlexibleStanzaTypeFilter<S extends Stanza> extends java.lang.Object implements StanzaFilter
Filters for stanzas of a particular type and allows a custom method to further filter the packets.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<S>stanzaType
-
Constructor Summary
Constructors Constructor Description FlexibleStanzaTypeFilter()FlexibleStanzaTypeFilter(java.lang.Class<S> packetType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanaccept(Stanza packet)Tests whether or not the specified stanza should pass the filter.protected abstract booleanacceptSpecific(S packet)java.lang.StringtoString()-
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
-
FlexibleStanzaTypeFilter
public FlexibleStanzaTypeFilter(java.lang.Class<S> packetType)
-
FlexibleStanzaTypeFilter
public FlexibleStanzaTypeFilter()
-
-
Method Detail
-
accept
public final boolean accept(Stanza packet)
Description copied from interface:StanzaFilterTests whether or not the specified stanza should pass the filter.- Specified by:
acceptin interfaceStanzaFilter- Parameters:
packet- the stanza to test.- Returns:
- true if and only if
stanzapasses the filter.
-
acceptSpecific
protected abstract boolean acceptSpecific(S packet)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-