mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 05:52:06 +01:00
Add "rule of thumb" to StanzaFilter javadoc
This commit is contained in:
parent
24267c532d
commit
c0b1fee700
1 changed files with 5 additions and 0 deletions
|
@ -41,6 +41,11 @@ import org.jivesoftware.smack.packet.Stanza;
|
|||
* // Create a new stanza collector using the filter we created.
|
||||
* StanzaCollector myCollector = connection.createStanzaCollector(myFilter);
|
||||
* </pre>
|
||||
* <p>
|
||||
* As a rule of thumb: If you have a predicate method, that is, a method which takes a single Stanza as argument, is pure
|
||||
* (side effect free) and returns only a boolean, then it is a good indicator that the logic should be put into a
|
||||
* {@link StanzaFilter} (and be referenced in {@link org.jivesoftware.smack.StanzaListener}).
|
||||
* </p>
|
||||
*
|
||||
* @see org.jivesoftware.smack.StanzaCollector
|
||||
* @see org.jivesoftware.smack.StanzaListener
|
||||
|
|
Loading…
Reference in a new issue