mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 14:02:06 +01:00
Javadoc work.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3930 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
ed0f4a8a65
commit
f7e4817f12
2 changed files with 13 additions and 4 deletions
|
@ -440,7 +440,15 @@ public class Roster {
|
|||
* when you are not subscribed to the user's presence updates.<p>
|
||||
*
|
||||
* If the user has several presences (one for each resource) then answer the presence
|
||||
* with the highest priority.
|
||||
* with the highest priority.<p>
|
||||
*
|
||||
* Note that presence information is received asynchronously. So, just after logging
|
||||
* in to the server, presence values for users in the roster might be <tt>null</tt>
|
||||
* even if they are actually online. In other words, the value returned by this
|
||||
* method should only be treated as a snapshot in time, and may not accurately reflect
|
||||
* other user's presence instant by instant. If you need to track presence over time,
|
||||
* such as when showing a visual representation of the roster, consider using a
|
||||
* {@link RosterListener}.
|
||||
*
|
||||
* @param user a fully qualified xmpp ID. The address could be in any valid format (e.g.
|
||||
* "domain/resource", "user@domain" or "user@domain/resource").
|
||||
|
@ -552,7 +560,7 @@ public class Roster {
|
|||
*/
|
||||
private void fireRosterChangedEvent(Collection addedEntries, Collection updatedEntries,
|
||||
Collection deletedEntries) {
|
||||
RosterListener [] listeners = null;
|
||||
RosterListener [] listeners;
|
||||
synchronized (rosterListeners) {
|
||||
listeners = new RosterListener[rosterListeners.size()];
|
||||
rosterListeners.toArray(listeners);
|
||||
|
@ -574,7 +582,7 @@ public class Roster {
|
|||
* Fires roster presence changed event to roster listeners.
|
||||
*/
|
||||
private void fireRosterPresenceEvent(String user) {
|
||||
RosterListener [] listeners = null;
|
||||
RosterListener [] listeners;
|
||||
synchronized (rosterListeners) {
|
||||
listeners = new RosterListener[rosterListeners.size()];
|
||||
rosterListeners.toArray(listeners);
|
||||
|
|
|
@ -25,7 +25,8 @@ import java.util.Collection;
|
|||
/**
|
||||
* A listener that is fired any time a roster is changed or the presence of
|
||||
* a user in the roster is changed.
|
||||
*
|
||||
*
|
||||
* @see Roster#addRosterListener(RosterListener)
|
||||
* @author Matt Tucker
|
||||
*/
|
||||
public interface RosterListener {
|
||||
|
|
Loading…
Reference in a new issue