Package tigase.workgroupqueues.scheduler
Class Queue
- java.lang.Object
-
- tigase.workgroupqueues.scheduler.Queue
-
public class Queue extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQueue.Status
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAgent(Agent agent)voidaddOffer(Offer offer)voidaddUser(User user)booleanequals(java.lang.Object o)AgentgetAgent(JID jid)java.util.Collection<Agent>getAgents()intgetAvailableAgents()Return the total number of agents available in the workgroup.intgetAverageWaitingTime()intgetCurrentChats()Returns current total number of chats being handled by agents in the workgroup.BareJIDgetJid()intgetMaxChats()Returns maximum number of simultaneous conversations that can be handled by agents in the workgroup.java.lang.StringgetMucDomain()java.util.Collection<Offer>getOffers()java.util.DategetOldestTime()Returns date and time when the oldest member of the queue joined.QueueStatsgetStats()Queue.StatusgetStatus()UsergetUser(JID jid)java.util.Collection<User>getUsers()inthashCode()voidremoveAgent(Agent agent)OfferremoveOffer(Queue queue, JID userJID, Agent agent)voidremoveUser(User user)voidsetStatus(Queue.Status status)java.lang.StringtoString()
-
-
-
Constructor Detail
-
Queue
public Queue(BareJID jid, java.lang.String mucDomain)
-
-
Method Detail
-
addAgent
public void addAgent(Agent agent)
-
addOffer
public void addOffer(Offer offer)
-
addUser
public void addUser(User user)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
getAgents
public java.util.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 java.lang.String getMucDomain()
-
getOffers
public java.util.Collection<Offer> getOffers()
-
getOldestTime
public java.util.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)
-
getUsers
public java.util.Collection<User> getUsers()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
removeAgent
public void removeAgent(Agent agent)
-
removeUser
public void removeUser(User user)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-