Smack

org.jivesoftware.smackx.workgroup
Class QueueUser

java.lang.Object
  extended by org.jivesoftware.smackx.workgroup.QueueUser

public class QueueUser
extends Object

An immutable class which wraps up customer-in-queue data return from the server; depending on the type of information dispatched from the server, not all information will be available in any given instance.

Author:
loki der quaeler

Constructor Summary
QueueUser(String uid, int position, int time, Date joinedAt)
           
 
Method Summary
 int getEstimatedRemainingTime()
           
 Date getQueueJoinTimestamp()
           
 int getQueuePosition()
           
 String getUserID()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueueUser

public QueueUser(String uid,
                 int position,
                 int time,
                 Date joinedAt)
Parameters:
uid - the user jid of the customer in the queue
position - the position customer sits in the queue
time - the estimate of how much longer the customer will be in the queue in seconds
joinedAt - the timestamp of when the customer entered the queue
Method Detail

getUserID

public String getUserID()
Returns:
the user jid of the customer in the queue

getQueuePosition

public int getQueuePosition()
Returns:
the position in the queue at which the customer sits, or -1 if the update which this instance embodies is only a time update instead

getEstimatedRemainingTime

public int getEstimatedRemainingTime()
Returns:
the estimated time remaining of the customer in the queue in seconds, or -1 if if the update which this instance embodies is only a position update instead

getQueueJoinTimestamp

public Date getQueueJoinTimestamp()
Returns:
the timestamp of when this customer entered the queue, or null if the server did not provide this information

Smack

Copyright © 2003-2007 Jive Software.