Class QueueUser


  • public class QueueUser
    extends java.lang.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.
    • Constructor Summary

      Constructors 
      Constructor Description
      QueueUser​(java.lang.String uid, int position, int time, java.util.Date joinedAt)
      Queue user.
    • Constructor Detail

      • QueueUser

        public QueueUser​(java.lang.String uid,
                         int position,
                         int time,
                         java.util.Date joinedAt)
        Queue user.
        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 java.lang.String getUserID()
        Get user id.
        Returns:
        the user jid of the customer in the queue
      • getQueuePosition

        public int getQueuePosition()
        Get queue position.
        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()
        Get the estimated remaining time.
        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 java.util.Date getQueueJoinTimestamp()
        Get queue join timestamp.
        Returns:
        the timestamp of when this customer entered the queue, or null if the server did not provide this information