Smack

org.jivesoftware.smackx.workgroup.packet
Class QueueUpdate

java.lang.Object
  extended by org.jivesoftware.smackx.workgroup.packet.QueueUpdate
All Implemented Interfaces:
PacketExtension

public class QueueUpdate
extends Object
implements PacketExtension

An IQ packet that encapsulates both types of workgroup queue status notifications -- position updates, and estimated time left in the queue updates.


Nested Class Summary
static class QueueUpdate.Provider
           
 
Field Summary
static String ELEMENT_NAME
          Element name of the packet extension.
static String NAMESPACE
          Namespace of the packet extension.
 
Constructor Summary
QueueUpdate(int position, int remainingTime)
           
 
Method Summary
 String getElementName()
          Returns the root element name.
 String getNamespace()
          Returns the root element XML namespace.
 int getPosition()
          Returns the user's position in the workgroup queue, or -1 if the value isn't set on this packet.
 int getRemaingTime()
          Returns the user's estimated time left in the workgroup queue, or -1 if the value isn't set on this packet.
 String toXML()
          Returns the XML representation of the PacketExtension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT_NAME

public static final String ELEMENT_NAME
Element name of the packet extension.

See Also:
Constant Field Values

NAMESPACE

public static final String NAMESPACE
Namespace of the packet extension.

See Also:
Constant Field Values
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 String toXML()
Description copied from interface: PacketExtension
Returns the XML representation of the PacketExtension.

Specified by:
toXML in interface PacketExtension
Returns:
the packet extension as XML.

getElementName

public String getElementName()
Description copied from interface: PacketExtension
Returns the root element name.

Specified by:
getElementName in interface PacketExtension
Returns:
the element name.

getNamespace

public String getNamespace()
Description copied from interface: PacketExtension
Returns the root element XML namespace.

Specified by:
getNamespace in interface PacketExtension
Returns:
the namespace.

Smack

Copyright © 2003-2007 Jive Software.