|
Clearspace API (1.10.16) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XMPPListener
A XMPPListener gets notified anytime a XMPP event is fired. Concrete implementations of this class must have a zero argument constructor.
IMManager| Method Summary | |
|---|---|
void |
componentStarted()
The XMPP component started, which means there is an active connection to an XMPP server. |
void |
componentStopped()
The XMPP component stopped, which means there is no connection to an XMPP server. |
void |
presenceReceived(org.xmpp.packet.Presence presence,
org.xmpp.packet.Presence oldPresence)
A presence update was received for an XMPP user. |
| Method Detail |
|---|
void componentStarted()
void componentStopped()
void presenceReceived(org.xmpp.packet.Presence presence,
org.xmpp.packet.Presence oldPresence)
JID from = presence.getFrom(); User user = imManager.getUserForJID(from);Use the
Presence.isAvailable() method to determine if the user
is currently online or offline. The oldPresence value
can be used to determine if the user has newly signed on or off. For example,
if the user was previously "away" and then updates their status to "do not disturb",
then a presence update will be received and the oldPresence will show
the the user as previously "away".
Note that all users should be considered offline if the componentStopped()
event is triggered -- in that case, explicit offline events will not be generated.
presence - the presence packet received.oldPresence - the previous presence value for the XMPP address, or
null if there was no previous value (for example, when the user
is newly coming online).
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||