Package tigase.workgroupqueues.scheduler
Interface Controller
-
- All Known Implementing Classes:
DefaultController
@Bean(name="Controller", active=true) public interface Controller
Controller interface to rule them all and call Scheduler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAgent(Agent agent)Add new agent.voidaddUser(User user)Add user to waiting queue.RoomcreateRoomInstance(Queue queue, User user)Creates instance ofRoominstance.java.util.Collection<ISequenceAction>getAddAgentToRoomActions(Queue queue, User user, Agent agent, Room room)QueuegetQueue(BareJID jid)ReturnQueueby JabberID.intgetQueueUserPosition(User user)Returns position of user in his queue.intgetQueueUserWaitingTime(User user)Estimated waiting time to handle user.java.util.Collection<ISequenceAction>getRoomCreateActions(Queue queue, User user, Room room)Returns collection ofActionsto create room in MUC Component.voidofferAccepted(Offer offer)Offer is accepted.voidofferRejected(Offer offer)Offer is rejected and it will return to waiting queue.voidremoveAgent(Agent agent)Remove agent (because agent is no longe available for Workgroup Queues Component).voidremoveUser(User user)Remove user/voidsendNotifications()Sends all notifications to all users and all agents.voidupdateAgent(Agent agent)Update status of agent.voidupdateUser(User user)Update status of user.
-
-
-
Method Detail
-
addAgent
void addAgent(Agent agent)
Add new agent.- Parameters:
agent- agent to add.
-
addUser
void addUser(User user)
Add user to waiting queue.- Parameters:
user- user to add.
-
createRoomInstance
Room createRoomInstance(Queue queue, User user) throws TigaseStringprepException
Creates instance ofRoominstance. Do not creates Room on MUC Component!- Parameters:
queue- queue.user- user.- Returns:
- instance of
Roomclass. - Throws:
TigaseStringprepException- when invalid JID is processed somewhere.
-
getAddAgentToRoomActions
java.util.Collection<ISequenceAction> getAddAgentToRoomActions(Queue queue, User user, Agent agent, Room room)
Returns collection ofActionsto addAgentto room in MUC Component. Actions must be exevuted inSequencer.- Parameters:
queue- queue.user- user.agent- agent.room- room.- Returns:
- collections of
Actions.
-
getQueue
Queue getQueue(BareJID jid)
ReturnQueueby JabberID.- Parameters:
jid- JID of workgroup queue.- Returns:
- queue or
nullif queue doesn't exists.
-
getQueueUserPosition
int getQueueUserPosition(User user)
Returns position of user in his queue.- Parameters:
user- user- Returns:
- position in queue.
-
getQueueUserWaitingTime
int getQueueUserWaitingTime(User user)
Estimated waiting time to handle user.- Parameters:
user- user.- Returns:
- time in seconds.
-
getRoomCreateActions
java.util.Collection<ISequenceAction> getRoomCreateActions(Queue queue, User user, Room room)
Returns collection ofActionsto create room in MUC Component. Actions must be executed inSequencer.- Parameters:
queue- queueuser- userroom- room- Returns:
- collections of
Actions.
-
offerAccepted
void offerAccepted(Offer offer)
Offer is accepted. Agent should be invited, room created, etc.- Parameters:
offer- offer to be accepted.
-
offerRejected
void offerRejected(Offer offer)
Offer is rejected and it will return to waiting queue.- Parameters:
offer- offer to be rejected.
-
removeAgent
void removeAgent(Agent agent)
Remove agent (because agent is no longe available for Workgroup Queues Component).- Parameters:
agent- agent to be removed.
-
removeUser
void removeUser(User user)
Remove user/- Parameters:
user- user to be removed.
-
sendNotifications
void sendNotifications()
Sends all notifications to all users and all agents.
-
updateAgent
void updateAgent(Agent agent)
Update status of agent.- Parameters:
agent- agent.
-
updateUser
void updateUser(User user)
Update status of user.- Parameters:
user- user.
-
-