public class IdleElement extends java.lang.Object implements ExtensionElement
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_SINCE |
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
Constructor and Description |
---|
IdleElement()
Create a new IdleElement with the current date as date of last user interaction.
|
IdleElement(java.util.Date since)
Create a new IdleElement.
|
Modifier and Type | Method and Description |
---|---|
static void |
addToPresence(Presence presence)
Add an Idle element with current date to the presence.
|
static IdleElement |
fromPresence(Presence presence)
Return the IdleElement from a presence.
|
java.lang.String |
getElementName()
Returns the root element name.
|
java.lang.String |
getNamespace()
Returns the root element XML namespace.
|
java.util.Date |
getSince()
Return the value of last user interaction.
|
XmlStringBuilder |
toXML()
Returns the XML representation of this Element.
|
public static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT
public static final java.lang.String ATTR_SINCE
public IdleElement()
public IdleElement(java.util.Date since)
since
- date of last user interactionpublic java.util.Date getSince()
public static void addToPresence(Presence presence)
presence
- presencepublic static IdleElement fromPresence(Presence presence)
presence
- presencepublic java.lang.String getNamespace()
getNamespace
in interface ExtensionElement
public java.lang.String getElementName()
getElementName
in interface NamedElement
public XmlStringBuilder toXML()