1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-27 00:32:07 +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:
Matt Tucker 2006-05-30 21:53:50 +00:00 committed by matt
parent ed0f4a8a65
commit f7e4817f12
2 changed files with 13 additions and 4 deletions

View file

@ -440,7 +440,15 @@ public class Roster {
* when you are not subscribed to the user's presence updates.<p> * 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 * 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. * @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"). * "domain/resource", "user@domain" or "user@domain/resource").
@ -552,7 +560,7 @@ public class Roster {
*/ */
private void fireRosterChangedEvent(Collection addedEntries, Collection updatedEntries, private void fireRosterChangedEvent(Collection addedEntries, Collection updatedEntries,
Collection deletedEntries) { Collection deletedEntries) {
RosterListener [] listeners = null; RosterListener [] listeners;
synchronized (rosterListeners) { synchronized (rosterListeners) {
listeners = new RosterListener[rosterListeners.size()]; listeners = new RosterListener[rosterListeners.size()];
rosterListeners.toArray(listeners); rosterListeners.toArray(listeners);
@ -574,7 +582,7 @@ public class Roster {
* Fires roster presence changed event to roster listeners. * Fires roster presence changed event to roster listeners.
*/ */
private void fireRosterPresenceEvent(String user) { private void fireRosterPresenceEvent(String user) {
RosterListener [] listeners = null; RosterListener [] listeners;
synchronized (rosterListeners) { synchronized (rosterListeners) {
listeners = new RosterListener[rosterListeners.size()]; listeners = new RosterListener[rosterListeners.size()];
rosterListeners.toArray(listeners); rosterListeners.toArray(listeners);

View file

@ -25,7 +25,8 @@ import java.util.Collection;
/** /**
* A listener that is fired any time a roster is changed or the presence of * A listener that is fired any time a roster is changed or the presence of
* a user in the roster is changed. * a user in the roster is changed.
* *
* @see Roster#addRosterListener(RosterListener)
* @author Matt Tucker * @author Matt Tucker
*/ */
public interface RosterListener { public interface RosterListener {