public abstract class AbstractFromToMatchesFilter extends Object implements StanzaFilter
Modifier | Constructor and Description |
---|---|
protected |
AbstractFromToMatchesFilter(Jid address,
boolean ignoreResourcepart)
Creates a filter matching on the address returned by
getAddressToCompare(Stanza) . |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Stanza stanza)
Tests whether or not the specified stanza should pass the filter.
|
protected abstract Jid |
getAddressToCompare(Stanza stanza) |
String |
toString() |
protected AbstractFromToMatchesFilter(Jid address, boolean ignoreResourcepart)
getAddressToCompare(Stanza)
. The address must be
the same as the filter address. The second parameter specifies whether the full or the bare addresses are
compared.address
- The address to filter for. If null
is given, then
getAddressToCompare(Stanza)
must also return null
to match.ignoreResourcepart
- public final boolean accept(Stanza stanza)
StanzaFilter
accept
in interface StanzaFilter
stanza
- the stanza to test.protected abstract Jid getAddressToCompare(Stanza stanza)