public interface PresenceManager
Modifier and Type | Field and Description |
---|---|
static int |
SORT_ONLINE_TIME
Sort by online time.
|
static int |
SORT_USERNAME
Sort by username.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canProbePresence(org.xmpp.packet.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.
|
org.xmpp.packet.Presence |
getPresence(User user)
Returns the user's current presence, or null if the user is unavailable.
|
Collection<org.xmpp.packet.Presence> |
getPresences(String username)
Returns all presences for the user, or null if the user is unavailable.
|
void |
handleProbe(org.xmpp.packet.Presence packet)
Handle a presence probe sent by a remote server.
|
boolean |
isAvailable(User user)
Returns the availability of the user.
|
void |
probePresence(org.xmpp.packet.JID prober,
org.xmpp.packet.JID probee)
Probes the presence of the given XMPPAddress and attempts to send it to the given user.
|
void |
sendUnavailableFromSessions(org.xmpp.packet.JID recipientJID,
org.xmpp.packet.JID userJID)
Sends unavailable presence from all of the user's available resources to the remote user.
|
void |
userAvailable(org.xmpp.packet.Presence presence)
Notification message saying that the sender of the given presence just became available.
|
void |
userUnavailable(org.xmpp.packet.Presence presence)
Notification message saying that the sender of the given presence just became unavailable.
|
static final int SORT_USERNAME
static final int SORT_ONLINE_TIME
boolean isAvailable(User user)
Returns the availability of the user.
user
- the user who's availability is in questionorg.xmpp.packet.Presence getPresence(User user)
user
- the user.Collection<org.xmpp.packet.Presence> getPresences(String username)
username
- the name of the user.void probePresence(org.xmpp.packet.JID prober, org.xmpp.packet.JID probee)
prober
- The user requesting the probeprobee
- The XMPPAddress whos presence we would like sent have have probedvoid handleProbe(org.xmpp.packet.Presence packet) throws UnauthorizedException
packet
- the received probe presence from a remote server.UnauthorizedException
boolean canProbePresence(org.xmpp.packet.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(org.xmpp.packet.JID recipientJID, org.xmpp.packet.JID userJID)
recipientJID
- JID of the remote user that will receive the unavailable presences.userJID
- JID of the local user.void userAvailable(org.xmpp.packet.Presence presence)
presence
- the presence sent by the available user.void userUnavailable(org.xmpp.packet.Presence presence)
presence
- the presence sent by the unavailable user.String getLastPresenceStatus(User user)
user
- the user to return his last status informationlong getLastActivity(User user)
user
- the user to return his information.Copyright © 2003-2008 Jive Software.