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:
IoTFieldsExtensionFilter,IQTypeFilter,MamResultFilter,MessageTypeFilter,MessageWithBodiesFilter,MessageWithSubjectFilter,MessageWithThreadFilter,PresenceTypeFilter,SetActiveListFilter,SetDefaultListFilter,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 Summary
Fields Modifier and Type Field Description protected Class<S>stanzaType
-
Constructor Summary
Constructors Constructor Description FlexibleStanzaTypeFilter()FlexibleStanzaTypeFilter(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)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
-
-
-
-
Field Detail
-
stanzaType
protected final Class<S extends Stanza> stanzaType
-
-
Constructor Detail
-
FlexibleStanzaTypeFilter
public FlexibleStanzaTypeFilter(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)
-
-