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 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 boolean
accept(Stanza packet)
Tests whether or not the specified stanza should pass the filter.protected abstract boolean
acceptSpecific(S packet)
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
-
-
-
-
Field Detail
-
stanzaType
protected final java.lang.Class<S extends Stanza> stanzaType
-
-
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: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.
-
acceptSpecific
protected abstract boolean acceptSpecific(S packet)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-