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