Package org.jivesoftware.smack.filter
Class StanzaTypeFilter
java.lang.Object
org.jivesoftware.smack.filter.StanzaTypeFilter
- All Implemented Interfaces:
StanzaFilter,Predicate<Stanza>
Filters for Stanzas of a particular type. The type is given as a Class object, so
example types would:
Message.classIQ.classPresence.class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StanzaTypeFilterstatic final StanzaTypeFilterstatic final StanzaTypeFilter -
Constructor Summary
ConstructorsConstructorDescriptionStanzaTypeFilter(Class<? extends Stanza> packetType) Creates a new stanza type filter that will filter for packets that are the same type aspacketType. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jivesoftware.smack.filter.StanzaFilter
asPredicate, test
-
Field Details
-
PRESENCE
-
MESSAGE
-
IQ
-
-
Constructor Details
-
StanzaTypeFilter
Creates a new stanza type filter that will filter for packets that are the same type aspacketType.- Parameters:
packetType- the Class type.
-
-
Method Details
-
accept
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.
-
toString
-