public interface QBRosterListener
Modifier and Type | Method and Description |
---|---|
void |
entriesAdded(java.util.Collection<java.lang.Integer> userIds)
Called when roster entries are added.
|
void |
entriesDeleted(java.util.Collection<java.lang.Integer> userIds)
Called when a roster entries are removed.
|
void |
entriesUpdated(java.util.Collection<java.lang.Integer> userIds)
Called when a roster entries are updated.
|
void |
presenceChanged(QBPresence presence)
Called when the presence of a roster entry is changed.
|
void entriesDeleted(java.util.Collection<java.lang.Integer> userIds)
userIds
- collection of users identifiers that have been removedvoid entriesAdded(java.util.Collection<java.lang.Integer> userIds)
userIds
- collection of users identifiers that have been added to the roster.void entriesUpdated(java.util.Collection<java.lang.Integer> userIds)
userIds
- collection of users identifiers that have been updated in the roster.void presenceChanged(QBPresence presence)
To get the current "best presence" for a user after the presence update, query the roster:
String user = presence.getFrom(); QBPresence bestPresence = roster.getPresence(user);That will return the presence value for the user with the highest priority and availability. Note that this listener is triggered for presence (mode) changes only (e.g presence of types available and unavailable. Subscription-related presence packets will not cause this method to be called.
presence
- the presence that changed.QBRoster.getPresence(int)