com.genesyslab.omsdk.mil.applicationblocks.haserver
Class HaServer

java.lang.Object
  extended bycom.genesyslab.omsdk.mil.applicationblocks.haserver.HaServer

public class HaServer
extends java.lang.Object

Sample application to show how to create high available open media server using HaProxy/ehcache and LCA features.


Method Summary
 void doRequest(MediaEvent incoming)
          This is a sample method showing how to handle media events, user requests, etc.
static void main(java.lang.String[] argv)
          Main method entry point can be used for HAServer application test execution.
It reads .properties file PROP_FILENAME = "HAServer.properties" and uses got values for application start.
Following options are recognized in this configuration file:
- config.host - Primary configuration server host name (or address)
- config.port - Primary configuration server port
- config.backup.host - Backup configuration server host name (or address)
- config.backup.port - Backup configuration server port
- config.application - CME application name
- config.reconnection.period - Configuration layer reconnection period, ms
- config.reconnection.attempts - Configuration layer reconnection attempts number
- config.ehcacheXmlFile - Name of ehcache xml configuration file
 void run()
          This is a sample method showing how to handle media events, user requests, etc.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doRequest

public void doRequest(MediaEvent incoming)
               throws MILUnsupportedOperationException,
                      MILRequestFailedException
This is a sample method showing how to handle media events, user requests, etc. and keep session information consistent in HA session service storage.

Parameters:
incoming - MediaEvent is a some media event (ICQ incoming message, for example)
Throws:
MILUnsupportedOperationException - can be thrown in case of wrong request; also (in this case) reason can be a wrong run mode - only primary server instance should handle operations
MILRequestFailedException

run

public void run()
         throws java.lang.InterruptedException
This is a sample method showing how to handle media events, user requests, etc. and keep session information consistent in HA session service storage.

Throws:
java.lang.InterruptedException

main

public static void main(java.lang.String[] argv)
Main method entry point can be used for HAServer application test execution.
It reads .properties file PROP_FILENAME = "HAServer.properties" and uses got values for application start.
Following options are recognized in this configuration file:
- config.host - Primary configuration server host name (or address)
- config.port - Primary configuration server port
- config.backup.host - Backup configuration server host name (or address)
- config.backup.port - Backup configuration server port
- config.application - CME application name
- config.reconnection.period - Configuration layer reconnection period, ms
- config.reconnection.attempts - Configuration layer reconnection attempts number
- config.ehcacheXmlFile - Name of ehcache xml configuration file