Class IQReplyFilter
- All Implemented Interfaces:
StanzaFilter,Predicate<Stanza>
- Direct Known Subclasses:
IQResultReplyFilter
Such a stanza must have the same stanza id and must be an IQ stanza 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:
- It matches the
toaddress of the request. - The
toaddress of the request was empty and thefromaddress matches either the bare jid of the server or the (bare or full jid) of the client. - To
towas our bare address and thefromis 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 Summary
ConstructorsConstructorDescriptionIQReplyFilter(IQ iqPacket, XMPPConnection conn) Filters for packets which are a valid reply to an IQ request. -
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
-
Constructor Details
-
IQReplyFilter
Filters for packets which are a valid reply to an IQ request.Such a stanza must have the same stanza id and must be an IQ stanza of type
RESULTorERROR. Moreover, it is necessary to check thefromaddress to ignore forged replies.We accept a
fromaddress if one of the following is true:- It matches the
toaddress of the request. - The
toaddress of the request was empty and thefromaddress matches either the bare jid of the server or the (bare or full jid) of the client. - To
towas our bare address and thefromis 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.
- Parameters:
iqPacket- An IQ request. Filter for replies to this packet.conn- connection.
- It matches the
-
-
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
-