public class IQReplyFilter extends java.lang.Object implements StanzaFilter
Such a stanza(/packet) must have the same stanza(/packet) id and must be an IQ stanza(/packet) of type
RESULT or ERROR. Moreover, it is necessary to check
the from address to ignore forged replies.
We accept a from address if one of the following is true:
to address of the request.
to address of the request was empty and the
from address matches either the bare jid of the server or the
(bare or full jid) of the client.
to was our bare address and the from is empty.
For a discussion of the issues, see the thread "Spoofing of iq ids and misbehaving servers" from 2014-01 on the jdev@jabber.org mailing list and following discussion in February and March.
| Constructor and Description |
|---|
IQReplyFilter(IQ iqPacket,
XMPPConnection conn)
Filters for packets which are a valid reply to an IQ request.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Stanza packet)
Tests whether or not the specified stanza should pass the filter.
|
java.lang.String |
toString() |
public IQReplyFilter(IQ iqPacket, XMPPConnection conn)
Such a stanza(/packet) must have the same stanza(/packet) id and must be an IQ stanza(/packet) of type
RESULT or ERROR. Moreover, it is necessary to check
the from address to ignore forged replies.
We accept a from address if one of the following is true:
to address of the request.
to address of the request was empty and the
from address matches either the bare jid of the server or the
(bare or full jid) of the client.
to was our bare address and the from is empty.
For a discussion of the issues, see the thread "Spoofing of iq ids and misbehaving servers" from 2014-01 on the jdev@jabber.org mailing list and following discussion in February and March.
iqPacket - An IQ request. Filter for replies to this packet.public boolean accept(Stanza packet)
StanzaFilteraccept in interface StanzaFilterpacket - the stanza(/packet) to test.public java.lang.String toString()
toString in class java.lang.Object