Package tigase.workgroupqueues.scheduler

# Class Queue

java.lang.Object
tigase.workgroupqueues.scheduler.Queue

public class Queue extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `Queue.Status`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Queue(BareJID jid, String mucDomain)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addAgent(Agent agent)`
  `void`
  `addOffer(Offer offer)`
  `void`
  `addUser(User user)`
  `boolean`
  `equals(Object o)`
  `Agent`
  `getAgent(JID jid)`
  `Collection<Agent>`
  `getAgents()`
  `int`
  `getAvailableAgents()`
  Return the total number of agents available in the workgroup.
  `int`
  `getAverageWaitingTime()`
  `int`
  `getCurrentChats()`
  Returns current total number of chats being handled by agents in the workgroup.
  `BareJID`
  `getJid()`
  `int`
  `getMaxChats()`
  Returns maximum number of simultaneous conversations that can be handled by agents in the workgroup.
  `String`
  `getMucDomain()`
  `Collection<Offer>`
  `getOffers()`
  `Date`
  `getOldestTime()`
  Returns date and time when the oldest member of the queue joined.
  `QueueStats`
  `getStats()`
  `Queue.Status`
  `getStatus()`
  `User`
  `getUser(JID jid)`
  `Collection<User>`
  `getUsers()`
  `int`
  `hashCode()`
  `void`
  `removeAgent(Agent agent)`
  `Offer`
  `removeOffer(Queue queue, JID userJID, Agent agent)`
  `void`
  `removeUser(User user)`
  `void`
  `setStatus(Queue.Status status)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Queue

    public Queue(BareJID jid, String mucDomain)

- ## Method Details

  - ### addAgent

    public void addAgent(Agent agent)

  - ### addOffer

    public void addOffer(Offer offer)

  - ### addUser

    public void addUser(User user)

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### getAgent

    public Agent getAgent(JID jid)

  - ### getAgents

    public Collection<Agent> getAgents()

  - ### getAvailableAgents

    public int getAvailableAgents()
    Return the total number of agents available in the workgroup.
    Returns:
      number of agents.

  - ### getAverageWaitingTime

    public int getAverageWaitingTime()

  - ### getCurrentChats

    public int getCurrentChats()
    Returns current total number of chats being handled by agents in the workgroup.
    Returns:
      number of chats.

  - ### getJid

    public BareJID getJid()

  - ### getMaxChats

    public int getMaxChats()
    Returns maximum number of simultaneous conversations that can be handled by agents in the workgroup.
    Returns:
      maximum number of simultaneous conversations.

  - ### getMucDomain

    public String getMucDomain()

  - ### getOffers

    public Collection<Offer> getOffers()

  - ### getOldestTime

    public Date getOldestTime()
    Returns date and time when the oldest member of the queue joined.
    Returns:
      join time of oldest member.

  - ### getStats

    public QueueStats getStats()

  - ### getStatus

    public Queue.Status getStatus()

  - ### setStatus

    public void setStatus(Queue.Status status)

  - ### getUser

    public User getUser(JID jid)

  - ### getUsers

    public Collection<User> getUsers()

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### removeAgent

    public void removeAgent(Agent agent)

  - ### removeOffer

    public Offer removeOffer(Queue queue, JID userJID, Agent agent)

  - ### removeUser

    public void removeUser(User user)

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`