Class Agent

java.lang.Object
tigase.workgroupqueues.scheduler.Agent

public class Agent extends Object
Class to represent Agent. Single agent per Queue.
  • Constructor Details

    • Agent

      public Agent(JID jid, BareJID workgroupQueue)
  • Method Details

    • 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(Object o)
      Overrides:
      equals in class 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 Date getLastUpdateSendTime()
      Returns date and time of last sending status update to agent.
      Returns:
      date of last status.
    • setLastUpdateSendTime

      public void setLastUpdateSendTime(Date lastUpdateSendTime)
    • getMaxChats

      public 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(Integer maxChats)
    • getOffers

      public Collection<Offer> getOffers()
    • getRooms

      public 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 class 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 String toString()
      Overrides:
      toString in class Object