Package tigase.workgroupqueues.scheduler
Class Agent
- java.lang.Object
-
- tigase.workgroupqueues.scheduler.Agent
-
public class Agent extends java.lang.Object
Class to represent Agent. Single agent per Queue.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Agent.State
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOffer(Offer offer)
Adds offer to agent.void
addRoom(Room room)
Adds room to agent.boolean
equals(java.lang.Object o)
int
getBusySlots()
Returns sum of handled chats in room and active offers.JID
getJid()
Returns JID of agent.java.util.Date
getLastUpdateSendTime()
Returns date and time of last sending status update to agent.java.lang.Integer
getMaxChats()
Returns max amount of chats to handle by this agent.java.util.Collection<Offer>
getOffers()
java.util.Collection<Room>
getRooms()
Agent.State
getState()
Returns status of agent.BareJID
getWorkgroupQueue()
int
hashCode()
boolean
isAgentStatusUpdateRequested()
void
removeOffer(Offer offer)
void
removeRoom(Room room)
void
setAgentStatusUpdateRequested(boolean agentStatusUpdateRequested)
void
setLastUpdateSendTime(java.util.Date lastUpdateSendTime)
void
setMaxChats(java.lang.Integer maxChats)
void
setState(Agent.State state)
java.lang.String
toString()
-
-
-
Method Detail
-
addOffer
public void addOffer(Offer offer)
Adds offer to agent.- Parameters:
offer
- offer to add.
-
addRoom
public void addRoom(Room room)
Adds room to agent.- Parameters:
room
- room to add.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
getBusySlots
public int getBusySlots()
Returns sum of handled chats in room and active offers.- Returns:
- sum of handled chats.
-
getJid
public JID getJid()
Returns JID of agent.- Returns:
- agents JID.
-
getLastUpdateSendTime
public java.util.Date getLastUpdateSendTime()
Returns date and time of last sending status update to agent.- Returns:
- date of last status.
-
setLastUpdateSendTime
public void setLastUpdateSendTime(java.util.Date lastUpdateSendTime)
-
getMaxChats
public java.lang.Integer getMaxChats()
Returns max amount of chats to handle by this agent.- Returns:
- maximum amount of chats allowed to handle by this agent.
-
setMaxChats
public void setMaxChats(java.lang.Integer maxChats)
-
getOffers
public java.util.Collection<Offer> getOffers()
-
getRooms
public java.util.Collection<Room> getRooms()
-
getState
public Agent.State getState()
Returns status of agent.- Returns:
- status of agent.
-
setState
public void setState(Agent.State state)
-
getWorkgroupQueue
public BareJID getWorkgroupQueue()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isAgentStatusUpdateRequested
public boolean isAgentStatusUpdateRequested()
-
setAgentStatusUpdateRequested
public void setAgentStatusUpdateRequested(boolean agentStatusUpdateRequested)
-
removeOffer
public void removeOffer(Offer offer)
-
removeRoom
public void removeRoom(Room room)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-