com.genesyslab.ail.applicationblocks.server
Class HaServer

java.lang.Object
  extended bycom.genesyslab.ail.applicationblocks.server.HaServer

public class HaServer
extends java.lang.Object

Implements a clustered server handling agents aimed to test HA.

To test HA, run several processes simultaneously, and initialize each of then initialized with different set of agents.

For instance, the server1 instance runs with agent_1000.. agent_1009; the server2 instance runs with agent_1010.. agent_1019.

Then, test the following script: On server1, make a request "call 1000 1001": you can see agent_1000 and agent_1001 events in the server1 window. On server2, make a request "answ 1001", and a few seconds later "rel 1001": agent_1001 events are in server2 window now.

Note: This sample uses the agentId as sessionId.

Version:
1.0

Field Summary
static AgentService agentService
           
static com.genesyslab.ail.AilFactory ailFactory
           
static com.genesyslab.HA.cache.HaCachedSessionService haService
           
 
Constructor Summary
HaServer(java.lang.String iniFilename)
          Constructs the main object
 
Method Summary
 void doRequest(java.lang.String request)
          Parses and processes a request (here, the keyboard is sending the message.)
static void main(java.lang.String[] argv)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ailFactory

public static com.genesyslab.ail.AilFactory ailFactory

agentService

public static AgentService agentService

haService

public static com.genesyslab.HA.cache.HaCachedSessionService haService
Constructor Detail

HaServer

public HaServer(java.lang.String iniFilename)
Constructs the main object

Parameters:
iniFilename - the path to the .ini file which contains configuration parameters.
Method Detail

doRequest

public void doRequest(java.lang.String request)
Parses and processes a request (here, the keyboard is sending the message.)

Parameters:
request - the message to be processed.

main

public static void main(java.lang.String[] argv)