Class IdleElement
java.lang.Object
org.jivesoftware.smackx.last_interaction.element.IdleElement
- All Implemented Interfaces:
Element,ExtensionElement,NamedElement,XmlElement,XmlLangElement
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new IdleElement with the current date as date of last user interaction.IdleElement(Date since) Create a new IdleElement. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddToPresence(Presence presence) Add an Idle element with current date to the presence.static IdleElementfromPresence(Presence presence) Return the IdleElement from a presence.Returns the root element name.Returns the root element XML namespace.getSince()Return the value of last user interaction.toXML(XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
Field Details
-
NAMESPACE
- See Also:
-
ELEMENT
- See Also:
-
QNAME
-
ATTR_SINCE
- See Also:
-
-
Constructor Details
-
IdleElement
public IdleElement()Create a new IdleElement with the current date as date of last user interaction. -
IdleElement
Create a new IdleElement.- Parameters:
since- date of last user interaction
-
-
Method Details
-
getSince
Return the value of last user interaction.- Returns:
- date of last interaction
-
addToPresence
Add an Idle element with current date to the presence.- Parameters:
presence- presence
-
fromPresence
Return the IdleElement from a presence. Returns null, if no IdleElement found.- Parameters:
presence- presence- Returns:
- idleElement from presence or null
-
getNamespace
Returns the root element XML namespace.- Specified by:
getNamespacein interfaceXmlElement- Returns:
- the namespace.
-
getElementName
Returns the root element name.- Specified by:
getElementNamein interfaceNamedElement- Returns:
- the element name.
-
toXML
-