Package tigase.workgroupqueues.scheduler
Interface Controller
- All Known Implementing Classes:
DefaultController
Controller interface to rule them all and call Scheduler.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add new agent.void
Add user to waiting queue.createRoomInstance
(Queue queue, User user) Creates instance ofRoom
instance.getAddAgentToRoomActions
(Queue queue, User user, Agent agent, Room room) ReturnQueue
by JabberID.int
getQueueUserPosition
(User user) Returns position of user in his queue.int
getQueueUserWaitingTime
(User user) Estimated waiting time to handle user.getRoomCreateActions
(Queue queue, User user, Room room) Returns collection ofActions
to create room in MUC Component.void
offerAccepted
(Offer offer) Offer is accepted.void
offerRejected
(Offer offer) Offer is rejected and it will return to waiting queue.void
removeAgent
(Agent agent) Remove agent (because agent is no longe available for Workgroup Queues Component).void
removeUser
(User user) Remove user/void
Sends all notifications to all users and all agents.void
updateAgent
(Agent agent) Update status of agent.void
updateUser
(User user) Update status of user.
-
Method Details
-
addAgent
Add new agent.- Parameters:
agent
- agent to add.
-
addUser
Add user to waiting queue.- Parameters:
user
- user to add.
-
createRoomInstance
Creates instance ofRoom
instance. Do not creates Room on MUC Component!- Parameters:
queue
- queue.user
- user.- Returns:
- instance of
Room
class. - Throws:
TigaseStringprepException
- when invalid JID is processed somewhere.
-
getAddAgentToRoomActions
Collection<ISequenceAction> getAddAgentToRoomActions(Queue queue, User user, Agent agent, Room room) Returns collection ofActions
to addAgent
to room in MUC Component. Actions must be exevuted inSequencer
.- Parameters:
queue
- queue.user
- user.agent
- agent.room
- room.- Returns:
- collections of
Actions
.
-
getQueue
ReturnQueue
by JabberID.- Parameters:
jid
- JID of workgroup queue.- Returns:
- queue or
null
if queue doesn't exists.
-
getQueueUserPosition
Returns position of user in his queue.- Parameters:
user
- user- Returns:
- position in queue.
-
getQueueUserWaitingTime
Estimated waiting time to handle user.- Parameters:
user
- user.- Returns:
- time in seconds.
-
getRoomCreateActions
Returns collection ofActions
to create room in MUC Component. Actions must be executed inSequencer
.- Parameters:
queue
- queueuser
- userroom
- room- Returns:
- collections of
Actions
.
-
offerAccepted
Offer is accepted. Agent should be invited, room created, etc.- Parameters:
offer
- offer to be accepted.
-
offerRejected
Offer is rejected and it will return to waiting queue.- Parameters:
offer
- offer to be rejected.
-
removeAgent
Remove agent (because agent is no longe available for Workgroup Queues Component).- Parameters:
agent
- agent to be removed.
-
removeUser
Remove user/- Parameters:
user
- user to be removed.
-
sendNotifications
void sendNotifications()Sends all notifications to all users and all agents. -
updateAgent
Update status of agent.- Parameters:
agent
- agent.
-
updateUser
Update status of user.- Parameters:
user
- user.
-