tigase.workgroupqueues.scheduler

## Class Agent

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

-     public class Agent
      extends Object

  Class to represent Agent. Single agent per Queue.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Agent.State`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Agent(JID jid, BareJID workgroupQueue)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addOffer(Offer offer)` Adds offer to agent.
    `void` | `addRoom(Room room)` Adds room to agent.
    `boolean` | `equals(Object o)`
    `int` | `getBusySlots()` Returns sum of handled chats in room and active offers.
    `JID` | `getJid()` Returns JID of agent.
    `Date` | `getLastUpdateSendTime()` Returns date and time of last sending status update to agent.
    `Integer` | `getMaxChats()` Returns max amount of chats to handle by this agent.
    `Collection<Offer>` | `getOffers()`
    `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(Date lastUpdateSendTime)`
    `void` | `setMaxChats(Integer maxChats)`
    `void` | `setState(Agent.State state)`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Agent

          public Agent(JID jid,
                       BareJID workgroupQueue)

  - ### 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(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`

Copyright © 2004–2021 "Tigase, Inc.". All rights reserved.