com.genesyslab.ail.applicationblocks.server
Class AgentService

java.lang.Object
  extended bycom.genesyslab.ail.applicationblocks.server.AgentService
All Implemented Interfaces:
com.genesyslab.HA.HaSessionRecover

public class AgentService
extends java.lang.Object
implements com.genesyslab.HA.HaSessionRecover

Implements the session recover handler.


Constructor Summary
AgentService()
           
 
Method Summary
 void addListener(com.genesyslab.ail.Agent agent)
          Adds an agent listener, to send events to the EventService of the HA server.
 java.lang.Object[] getCachedSessionValue(java.lang.String domain, java.lang.String serviceName, java.lang.String id)
          Find session attributes.
 java.util.Map login(com.genesyslab.ail.Agent agent, com.genesyslab.ail.Place place, java.lang.String loginId, java.lang.String password, java.lang.String queue, com.genesyslab.ail.Dn.Workmode workmode, java.util.Map reasons)
          Performs a voice 'login' action for an agent and saves the 'login' parameters to the HA database.
 java.util.Map loginMultimedia(com.genesyslab.ail.Agent agent, com.genesyslab.ail.Place place, java.util.Collection mediaList, java.lang.String reason, java.lang.String reasonDescription)
          Performs a 'login' action on an agent's media and saves the 'login' parameters to the HA database.
 java.util.Map logout(com.genesyslab.ail.Agent agent, java.lang.String queue, java.util.Map reasons)
          Performs a voice 'logout' action for an agent and removes the 'login' parameters from the HA database.
 java.util.Map logoutMultimedia(com.genesyslab.ail.Agent agent, java.util.Collection mediaList, java.lang.String reason, java.lang.String reasonDescription)
          Performs a 'logout' action on an agent's media and removes the 'login' parameters from the HA database.
 java.util.Map notReady(com.genesyslab.ail.Agent agent, java.lang.String queue, com.genesyslab.ail.Dn.Workmode workmode, java.util.Map reasons)
          Performs a voice 'not ready' action for an agent and removes the 'ready' parameters from the HA database.
 java.util.Map notReadyMultimedia(com.genesyslab.ail.Agent agent, java.util.Collection mediaList, java.lang.String reason, java.lang.String reasonDescription)
          Performs a 'not ready' action on an agent's media, and removes the ready parameters from the HA database.
 java.util.Map ready(com.genesyslab.ail.Agent agent, java.lang.String queue, com.genesyslab.ail.Dn.Workmode workmode, java.util.Map reasons)
          Performs a voice 'ready' action for an agent and saves the 'ready' parameters to the HA database.
 java.util.Map readyMultimedia(com.genesyslab.ail.Agent agent, java.util.Collection mediaList, java.lang.String reason, java.lang.String reasonDescription)
          Performs a 'ready' action on an agent's media and saves the 'ready' parameters to the HA database.
 void removeFromCachedSession(java.lang.String domain, java.lang.String serviceName, java.lang.String id)
          Removes data from cached session.
 void removeListener(com.genesyslab.ail.Agent agent)
          Removes an agent listener from the agent listener list.
 void saveToCachedSession(java.lang.String domain, java.lang.String serviceName, java.lang.String id, java.lang.Object obj)
          Saves data to the cached session.
 void sessionRecover(java.util.Map attributes, java.lang.String sid)
          Recovers from one session.
 void undoSessionRecover(java.util.Map attributes, java.lang.String sid)
          Undoes the last recover from session
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentService

public AgentService()
Method Detail

saveToCachedSession

public void saveToCachedSession(java.lang.String domain,
                                java.lang.String serviceName,
                                java.lang.String id,
                                java.lang.Object obj)
Saves data to the cached session.


removeFromCachedSession

public void removeFromCachedSession(java.lang.String domain,
                                    java.lang.String serviceName,
                                    java.lang.String id)
Removes data from cached session.


getCachedSessionValue

public java.lang.Object[] getCachedSessionValue(java.lang.String domain,
                                                java.lang.String serviceName,
                                                java.lang.String id)
Find session attributes.


undoSessionRecover

public void undoSessionRecover(java.util.Map attributes,
                               java.lang.String sid)
Undoes the last recover from session

Specified by:
undoSessionRecover in interface com.genesyslab.HA.HaSessionRecover

sessionRecover

public void sessionRecover(java.util.Map attributes,
                           java.lang.String sid)
Recovers from one session.

Specified by:
sessionRecover in interface com.genesyslab.HA.HaSessionRecover

addListener

public void addListener(com.genesyslab.ail.Agent agent)
Adds an agent listener, to send events to the EventService of the HA server.


removeListener

public void removeListener(com.genesyslab.ail.Agent agent)
Removes an agent listener from the agent listener list.


login

public java.util.Map login(com.genesyslab.ail.Agent agent,
                           com.genesyslab.ail.Place place,
                           java.lang.String loginId,
                           java.lang.String password,
                           java.lang.String queue,
                           com.genesyslab.ail.Dn.Workmode workmode,
                           java.util.Map reasons)
Performs a voice 'login' action for an agent and saves the 'login' parameters to the HA database.


logout

public java.util.Map logout(com.genesyslab.ail.Agent agent,
                            java.lang.String queue,
                            java.util.Map reasons)
Performs a voice 'logout' action for an agent and removes the 'login' parameters from the HA database.


ready

public java.util.Map ready(com.genesyslab.ail.Agent agent,
                           java.lang.String queue,
                           com.genesyslab.ail.Dn.Workmode workmode,
                           java.util.Map reasons)
Performs a voice 'ready' action for an agent and saves the 'ready' parameters to the HA database.


notReady

public java.util.Map notReady(com.genesyslab.ail.Agent agent,
                              java.lang.String queue,
                              com.genesyslab.ail.Dn.Workmode workmode,
                              java.util.Map reasons)
Performs a voice 'not ready' action for an agent and removes the 'ready' parameters from the HA database.


loginMultimedia

public java.util.Map loginMultimedia(com.genesyslab.ail.Agent agent,
                                     com.genesyslab.ail.Place place,
                                     java.util.Collection mediaList,
                                     java.lang.String reason,
                                     java.lang.String reasonDescription)
Performs a 'login' action on an agent's media and saves the 'login' parameters to the HA database.


logoutMultimedia

public java.util.Map logoutMultimedia(com.genesyslab.ail.Agent agent,
                                      java.util.Collection mediaList,
                                      java.lang.String reason,
                                      java.lang.String reasonDescription)
Performs a 'logout' action on an agent's media and removes the 'login' parameters from the HA database.


readyMultimedia

public java.util.Map readyMultimedia(com.genesyslab.ail.Agent agent,
                                     java.util.Collection mediaList,
                                     java.lang.String reason,
                                     java.lang.String reasonDescription)
Performs a 'ready' action on an agent's media and saves the 'ready' parameters to the HA database.


notReadyMultimedia

public java.util.Map notReadyMultimedia(com.genesyslab.ail.Agent agent,
                                        java.util.Collection mediaList,
                                        java.lang.String reason,
                                        java.lang.String reasonDescription)
Performs a 'not ready' action on an agent's media, and removes the ready parameters from the HA database.