|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.JabberMessage
com.echomine.jabber.JabberJDOMMessage
com.echomine.jabber.AbstractJabberMessage
com.echomine.jabber.JabberIQMessage
com.echomine.jabber.msg.LastIQMessage
public class LastIQMessage
Supports the jabber:iq:last namespace. This is a message that will retrieve the "last" information data on servers and clients. For a server or service, this time represents the number of seconds since it started, or server uptime. For a user account, this time represents the number of seconds since the user was last available, or when they last logged out. For a connected client, if supported by that client, it represents the number of seconds since there was user activity, or idle-time.
Notice that for you to send a response message, you need to set the type as "result" and you can only set the time (idle time) and not the message since there is no point to set the message based on the current protocol specification.
Current Implementation: JEP-0012 Version 1.0
Field Summary |
---|
Fields inherited from class com.echomine.jabber.JabberIQMessage |
---|
TYPE_GET, TYPE_RESULT, TYPE_SET |
Fields inherited from class com.echomine.jabber.AbstractJabberMessage |
---|
TYPE_ERROR |
Fields inherited from class com.echomine.jabber.JabberMessage |
---|
messageID |
Constructor Summary | |
---|---|
LastIQMessage()
defaults to iq type get |
|
LastIQMessage(java.lang.String type)
this constructor is for messages with type. |
Method Summary | |
---|---|
java.lang.String |
getMessage()
retrieve the message (ie. |
int |
getMessageType()
the default message type is unknown. |
long |
getSeconds()
Retrieves how long ago a user logged out |
JabberMessage |
parse(JabberMessageParser parser,
Element msgTree)
parses the message. |
void |
setSeconds(long seconds)
sets the seconds since the "last" status. |
Methods inherited from class com.echomine.jabber.AbstractJabberMessage |
---|
getErrorMessage, getFrom, getTo, getType, isError, setErrorMessage, setFrom, setTo, setType |
Methods inherited from class com.echomine.jabber.JabberJDOMMessage |
---|
encode, getDOM, getXMLOutputter, setMessageID, toString |
Methods inherited from class com.echomine.jabber.JabberMessage |
---|
getMessageID, getReplyMessage, getTimeout, getXMessage, getXMessages, interrupt, isReplyRequired, isSendXMessages, isSynchronized, replyReceived, setReplyRequired, setSendXMessages, setSynchronized, setTimeout, setXMessage, setXMessages |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LastIQMessage(java.lang.String type)
public LastIQMessage()
Method Detail |
---|
public JabberMessage parse(JabberMessageParser parser, Element msgTree) throws ParseException
AbstractJabberMessage
parse
in interface JabberMessageParsable
parse
in class AbstractJabberMessage
ParseException
public long getSeconds()
public java.lang.String getMessage()
public void setSeconds(long seconds)
public int getMessageType()
JabberJDOMMessage
getMessageType
in class JabberIQMessage
JabberCode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |