public class LastActivity extends IQ
XMPPConnection con = new XMPPConnection("jabber.org"); con.login("john", "doe"); LastActivity activity = LastActivity.getLastActivity(con, "xray@jabber.org");
Modifier and Type | Class and Description |
---|---|
static class |
LastActivity.Provider
The IQ Provider for LastActivity.
|
Modifier and Type | Field and Description |
---|---|
long |
lastActivity |
java.lang.String |
message |
ID_NOT_AVAILABLE
Constructor and Description |
---|
LastActivity() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getChildElementXML()
Returns the sub-element XML section of the IQ packet, or null if there
isn't one.
|
long |
getIdleTime()
Returns number of seconds that have passed since the user last logged out.
|
static LastActivity |
getLastActivity(XMPPConnection con,
java.lang.String jid)
Retrieve the last activity of a particular jid.
|
java.lang.String |
getStatusMessage()
Returns the status message of the last unavailable presence received from the user.
|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo
public java.lang.String getChildElementXML()
IQ
Extensions of this class must override this method.
getChildElementXML
in class IQ
public long getIdleTime()
public java.lang.String getStatusMessage()
public static LastActivity getLastActivity(XMPPConnection con, java.lang.String jid) throws XMPPException
con
- the current XMPPConnection.jid
- the JID of the user.XMPPException
- thrown if a server error has occured.Copyright © 2003 Jive Software.