public final class StanzaTypeFilter extends Object implements StanzaFilter
Modifier and Type | Field and Description |
---|---|
static StanzaTypeFilter |
IQ |
static StanzaTypeFilter |
MESSAGE |
static StanzaTypeFilter |
PRESENCE |
Constructor and Description |
---|
StanzaTypeFilter(Class<? extends Stanza> packetType)
Creates a new stanza(/packet) type filter that will filter for packets that are the
same type as packetType.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Stanza packet)
Tests whether or not the specified stanza should pass the filter.
|
String |
toString() |
public static final StanzaTypeFilter PRESENCE
public static final StanzaTypeFilter MESSAGE
public static final StanzaTypeFilter IQ
public StanzaTypeFilter(Class<? extends Stanza> packetType)
packetType
- the Class type.public boolean accept(Stanza packet)
StanzaFilter
accept
in interface StanzaFilter
packet
- the stanza(/packet) to test.