1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 06:12:05 +01:00

Merge pull request #309 from vanitasvitae/rosterListenerDoc

Add missing Roster documentation
This commit is contained in:
Florian Schmaus 2019-04-06 15:19:59 +02:00 committed by GitHub
commit af0fb7543c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -560,7 +560,8 @@ public final class Roster extends Manager {
} }
/** /**
* Add a roster loaded listener. * Add a roster loaded listener. Roster loaded listeners are invoked once the {@link Roster}
* was successfully loaded.
* *
* @param rosterLoadedListener the listener to add. * @param rosterLoadedListener the listener to add.
* @return true if the listener was not already added. * @return true if the listener was not already added.
@ -587,6 +588,20 @@ public final class Roster extends Manager {
} }
} }
/**
* Add a {@link PresenceEventListener}. Such a listener will be fired whenever certain
* presence events happen.<p>
* Among those events are:
* <ul>
* <li> 'available' presence received
* <li> 'unavailable' presence received
* <li> 'error' presence received
* <li> 'subscribed' presence received
* <li> 'unsubscribed' presence received
* </ul>
* @param presenceEventListener listener to add.
* @return true if the listener was not already added.
*/
public boolean addPresenceEventListener(PresenceEventListener presenceEventListener) { public boolean addPresenceEventListener(PresenceEventListener presenceEventListener) {
return presenceEventListeners.add(presenceEventListener); return presenceEventListeners.add(presenceEventListener);
} }