|
Openfire 3.5.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PresenceManager
The presence manager tracks on a global basis who's online. The presence monitor watches and reports on what users are present on the server, and in other jabber domains that it knows about. The presence manager does not know about invisible users (they are invisible).
Field Summary | |
---|---|
static int |
SORT_ONLINE_TIME
Sort by online time. |
static int |
SORT_USERNAME
Sort by username. |
Method Summary | |
---|---|
boolean |
canProbePresence(JID prober,
String probee)
Returns true if the the prober is allowed to see the presence of the probee. |
long |
getLastActivity(User user)
Returns the number of milliseconds since the user went offline or -1 if such information is not available or if the user is online. |
String |
getLastPresenceStatus(User user)
Returns the status sent by the user in his last unavailable presence or null if the user is online or never set such information. |
Presence |
getPresence(User user)
Returns the user's current presence, or null if the user is unavailable. |
Collection<Presence> |
getPresences(String username)
Returns all presences for the user, or null if the user is unavailable. |
void |
handleProbe(Presence packet)
Handle a presence probe sent by a remote server. |
boolean |
isAvailable(User user)
Returns the availability of the user. |
void |
probePresence(JID prober,
JID probee)
Probes the presence of the given XMPPAddress and attempts to send it to the given user. |
void |
sendUnavailableFromSessions(JID recipientJID,
JID userJID)
Sends unavailable presence from all of the user's available resources to the remote user. |
void |
userAvailable(Presence presence)
Notification message saying that the sender of the given presence just became available. |
void |
userUnavailable(Presence presence)
Notification message saying that the sender of the given presence just became unavailable. |
Field Detail |
---|
static final int SORT_USERNAME
static final int SORT_ONLINE_TIME
Method Detail |
---|
boolean isAvailable(User user)
Returns the availability of the user.
user
- the user who's availability is in question
Presence getPresence(User user)
user
- the user.
Collection<Presence> getPresences(String username)
username
- the name of the user.
void probePresence(JID prober, JID probee)
prober
- The user requesting the probeprobee
- The XMPPAddress whos presence we would like sent have have probedvoid handleProbe(Presence packet) throws UnauthorizedException
packet
- the received probe presence from a remote server.
UnauthorizedException
boolean canProbePresence(JID prober, String probee) throws UserNotFoundException
prober
- the user that is trying to probe the presence of another user.probee
- the username of the uset that is being probed.
UserNotFoundException
- If the probee does not exist in the local server or the prober
is not present in the roster of the probee.void sendUnavailableFromSessions(JID recipientJID, JID userJID)
recipientJID
- JID of the remote user that will receive the unavailable presences.userJID
- JID of the local user.void userAvailable(Presence presence)
presence
- the presence sent by the available user.void userUnavailable(Presence presence)
presence
- the presence sent by the unavailable user.String getLastPresenceStatus(User user)
user
- the user to return his last status information
long getLastActivity(User user)
user
- the user to return his information.
|
Openfire 3.5.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |