org.jivesoftware.smackx.packet
Class LastActivity
java.lang.Object
   org.jivesoftware.smack.packet.Packet
org.jivesoftware.smack.packet.Packet
       org.jivesoftware.smack.packet.IQ
org.jivesoftware.smack.packet.IQ
           org.jivesoftware.smackx.packet.LastActivity
org.jivesoftware.smackx.packet.LastActivity
- public class LastActivity 
- extends IQ
A last activity IQ for retrieving information about the last activity associated with a Jabber ID.
 LastActivity (JEP-012) allows for retrieval of how long a particular user has been idle and the
 message the specified when doing so. Use LastActivityManager
 to get the last activity of a user.
- Author:
- Derek DeMoro
 
| Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | 
| IQ.Type | 
 
 
 
 
 
 
| Methods inherited from class org.jivesoftware.smack.packet.Packet | 
| addExtension, deleteProperty, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setProperty, setTo | 
 
 
lastActivity
public long lastActivity
message
public String message
LastActivity
public LastActivity()
getChildElementXML
public String getChildElementXML()
- Description copied from class: IQ
- Returns the sub-element XML section of the IQ packet, or null if there
 isn't one. Packet extensions must be included, if any are defined.
 Extensions of this class must override this method.
 
 
- 
- Specified by:
- getChildElementXMLin class- IQ
 
- 
- Returns:
- the child element section of the IQ XML.
 
setLastActivity
public void setLastActivity(long lastActivity)
- 
 
getIdleTime
public long getIdleTime()
- Returns number of seconds that have passed since the user last logged out.
 If the user is offline, 0 will be returned.
 
- 
- Returns:
- the number of seconds that have passed since the user last logged out.
 
getStatusMessage
public String getStatusMessage()
- Returns the status message of the last unavailable presence received from the user.
 
- 
- Returns:
- the status message of the last unavailable presence received from the user
 
getLastActivity
public static LastActivity getLastActivity(Connection con,
                                           String jid)
                                    throws XMPPException
- Deprecated. This method only retreives the lapsed time since the last logout of a particular jid. 
 Replaced by getLastActivity
 
- Retrieve the last activity of a particular jid.
 
- 
- Parameters:
- con- the current Connection.
- jid- the JID of the user.
- Returns:
- the LastActivity packet of the jid.
- Throws:
- XMPPException- thrown if a server error has occured.
 
Copyright © 2003-2007 Jive Software.