public class LastActivity extends IQ
LastActivityManager
to get the last activity of a user.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 |
DEFAULT_LANGUAGE, 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(Connection con,
java.lang.String jid)
Deprecated.
This method only retreives the lapsed time since the last logout of a particular jid.
Replaced by
getLastActivity |
java.lang.String |
getStatusMessage()
Returns the status message of the last unavailable presence received from the user.
|
void |
setLastActivity(long lastActivity) |
createErrorResponse, createResultIQ, getType, setType, toXML
addExtension, deleteProperty, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setProperty, setTo
public java.lang.String getChildElementXML()
IQ
Extensions of this class must override this method.
getChildElementXML
in class IQ
public void setLastActivity(long lastActivity)
public long getIdleTime()
public java.lang.String getStatusMessage()
public static LastActivity getLastActivity(Connection con, java.lang.String jid) throws XMPPException
getLastActivity
con
- the current Connection.jid
- the JID of the user.XMPPException
- thrown if a server error has occured.Copyright © 2003-2007 Jive Software.