Class QueueUpdate
- java.lang.Object
-
- org.jivesoftware.smackx.workgroup.packet.QueueUpdate
-
- All Implemented Interfaces:
Element,ExtensionElement,FullyQualifiedElement,NamedElement,XmlLangElement
public class QueueUpdate extends java.lang.Object implements ExtensionElement
An IQ stanza that encapsulates both types of workgroup queue status notifications -- position updates, and estimated time left in the queue updates.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQueueUpdate.Provider
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringELEMENT_NAMEElement name of the stanza extension.static java.lang.StringNAMESPACENamespace of the stanza extension.static javax.xml.namespace.QNameQNAME
-
Constructor Summary
Constructors Constructor Description QueueUpdate(int position, int remainingTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetElementName()Returns the root element name.java.lang.StringgetNamespace()Returns the root element XML namespace.intgetPosition()Returns the user's position in the workgroup queue, or -1 if the value isn't set on this packet.intgetRemaingTime()Returns the user's estimated time left in the workgroup queue, or -1 if the value isn't set on this packet.java.lang.StringtoXML(XmlEnvironment enclosingNamespace)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
Field Detail
-
ELEMENT_NAME
public static final java.lang.String ELEMENT_NAME
Element name of the stanza extension.- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
Namespace of the stanza extension.- See Also:
- Constant Field Values
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
-
Constructor Detail
-
QueueUpdate
public QueueUpdate(int position, int remainingTime)
-
-
Method Detail
-
getPosition
public int getPosition()
Returns the user's position in the workgroup queue, or -1 if the value isn't set on this packet.- Returns:
- the position in the workgroup queue.
-
getRemaingTime
public int getRemaingTime()
Returns the user's estimated time left in the workgroup queue, or -1 if the value isn't set on this packet.- Returns:
- the estimated time left in the workgroup queue.
-
toXML
public java.lang.String toXML(XmlEnvironment enclosingNamespace)
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElementReturns the root element name.- Specified by:
getElementNamein interfaceNamedElement- Returns:
- the element name.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElementReturns the root element XML namespace.- Specified by:
getNamespacein interfaceFullyQualifiedElement- Returns:
- the namespace.
-
-