Smack

org.jivesoftware.smackx.workgroup.agent
Class WorkgroupQueue

java.lang.Object
  extended by org.jivesoftware.smackx.workgroup.agent.WorkgroupQueue

public class WorkgroupQueue
extends Object

A queue in a workgroup, which is a pool of agents that are routed a specific type of chat request.

Author:
Matt Tucker

Nested Class Summary
static class WorkgroupQueue.Status
          Represents the status of the queue.
 
Method Summary
 int getAgentCount()
          Returns the count of the currently available agents in this queue.
 Iterator getAgents()
          Returns an Iterator the currently active agents (Agent instances) in this queue.
 int getAverageWaitTime()
          Returns the average amount of time users wait in this queue before being routed to an agent.
 int getCurrentChats()
          Returns the current number of active chat sessions in this queue.
 int getMaxChats()
          Returns the maximum number of simultaneous chats this queue can handle.
 String getName()
          Returns the name of this queue.
 Date getOldestEntry()
          Returns the date of the oldest request waiting in this queue.
 WorkgroupQueue.Status getStatus()
          Returns the status of this queue.
 int getUserCount()
          Returns the number of users in this queue that are waiting to be routed to an agent.
 Iterator getUsers()
          Returns an Iterator for the users in this queue that are waiting to be routed to an agent (QueueUser instances).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()
Returns the name of this queue.

Returns:
the name of this queue.

getStatus

public WorkgroupQueue.Status getStatus()
Returns the status of this queue.

Returns:
the status of this queue.

getUserCount

public int getUserCount()
Returns the number of users in this queue that are waiting to be routed to an agent.

Returns:
the number of users waiting in the queue.

getUsers

public Iterator getUsers()
Returns an Iterator for the users in this queue that are waiting to be routed to an agent (QueueUser instances).

Returns:
an Iterator for the users waiting in the queue.

getAverageWaitTime

public int getAverageWaitTime()
Returns the average amount of time users wait in this queue before being routed to an agent. If average wait time info isn't available, -1 will be returned.

Returns:
the average wait time in this queue.

getOldestEntry

public Date getOldestEntry()
Returns the date of the oldest request waiting in this queue. If there are no requests waiting to be routed, this method will return null.

Returns:
the date of the oldest request in this queue.

getAgentCount

public int getAgentCount()
Returns the count of the currently available agents in this queue.

Returns:
the number of active agents in this queue.

getAgents

public Iterator getAgents()
Returns an Iterator the currently active agents (Agent instances) in this queue.

Returns:
an Iterator for the active agents in this queue.

getMaxChats

public int getMaxChats()
Returns the maximum number of simultaneous chats this queue can handle.

Returns:
the max number of chats this queue can handle.

getCurrentChats

public int getCurrentChats()
Returns the current number of active chat sessions in this queue.

Returns:
the current number of active chat sessions in this queue.

Smack

Copyright © 2003 Jive Software.