com.genesyslab.ail.applicationblocks.connector
Class ApplicationParameters

java.lang.Object
  extended bycom.genesyslab.ail.applicationblocks.connector.ApplicationParameters

public class ApplicationParameters
extends java.lang.Object

This class is a container for the AIL parameters of the connector. These parameters are needed for connection to the Genesys framework. See Connector.


Nested Class Summary
static class ApplicationParameters.ApplicationType
          Constants for types of application.
 
Constructor Summary
ApplicationParameters()
           
 
Method Summary
 java.lang.String getApplicationName()
          Gets the application name of the connection to the Configuration Layer.
 ApplicationParameters.ApplicationType getApplicationType()
          Gets the application type of the connection to the Configuration Layer.
 java.lang.String getBackupHost()
          Gets the backup host of the connection to the Configuration Layer.
 int getBackupPort()
          Gets the backup port of the connection to the Configuration Layer.
 java.lang.String getDefaultPassword()
          Gets the password of the connection to the Configuration Layer.
 java.lang.String getDefaultUsername()
          Gets the username of the connection to the Configuration Layer.
 java.lang.String getPrimaryHost()
          Gets the primary host of the connection to the Configuration Layer.
 int getPrimaryPort()
          Gets the primary port of the connection to the Configuration Layer.
 int getReconnectionAttempts()
          Gets the reconnection attemps for all back-end servers.
 int getReconnectionPeriod()
          Gets the reconnection period for all back-end servers.
 int getTimeout()
          Gets the timeout for all back-end servers.
 void init(java.lang.String primaryHost, int primaryPort, java.lang.String backupHost, int backupPort, java.lang.String defaultUsername, java.lang.String defaultPassword, java.lang.String applicationName, ApplicationParameters.ApplicationType applicationType, int reconnectionPeriod, int reconnectionAttempts, int timeout)
          Sets the parameters for the connection to the Configuration Layer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationParameters

public ApplicationParameters()
Method Detail

getPrimaryHost

public java.lang.String getPrimaryHost()
Gets the primary host of the connection to the Configuration Layer.

Returns:
String primary host.

getPrimaryPort

public int getPrimaryPort()
Gets the primary port of the connection to the Configuration Layer.

Returns:
int primary port.

getBackupHost

public java.lang.String getBackupHost()
Gets the backup host of the connection to the Configuration Layer.

Returns:
String backup host.

getBackupPort

public int getBackupPort()
Gets the backup port of the connection to the Configuration Layer.

Returns:
int backup port.

getDefaultUsername

public java.lang.String getDefaultUsername()
Gets the username of the connection to the Configuration Layer.

Returns:
String default username.

getDefaultPassword

public java.lang.String getDefaultPassword()
Gets the password of the connection to the Configuration Layer.

Returns:
String default password.

getApplicationType

public ApplicationParameters.ApplicationType getApplicationType()
Gets the application type of the connection to the Configuration Layer.

Returns:
ApplicationParameters.ApplicationType application type.

getApplicationName

public java.lang.String getApplicationName()
Gets the application name of the connection to the Configuration Layer.

Returns:
String application name.

getReconnectionPeriod

public int getReconnectionPeriod()
Gets the reconnection period for all back-end servers.

Returns:
int reconnection period.

getReconnectionAttempts

public int getReconnectionAttempts()
Gets the reconnection attemps for all back-end servers.

Returns:
int reconnection attemps.

getTimeout

public int getTimeout()
Gets the timeout for all back-end servers.

Returns:
int timeout.

init

public void init(java.lang.String primaryHost,
                 int primaryPort,
                 java.lang.String backupHost,
                 int backupPort,
                 java.lang.String defaultUsername,
                 java.lang.String defaultPassword,
                 java.lang.String applicationName,
                 ApplicationParameters.ApplicationType applicationType,
                 int reconnectionPeriod,
                 int reconnectionAttempts,
                 int timeout)
Sets the parameters for the connection to the Configuration Layer.

Parameters:
primaryHost - primary host of the Configuration Layer.
primaryPort - primary port of the Configuration Layer.
backupHost - backup host of the Configuration Layer.
backupPort - backup port of the Configuration Layer.
defaultUsername - username for Configuration Layer.
defaultPassword - password for the Configuration Layer.
applicationName - application name to be connected.
applicationType - application type.
reconnectionPeriod - reconnection period (in seconds) for checking the connections to the servers. This ping allows keeping the connections alive. The default value is 300 (five minutes); it should be greater than the timeout.
reconnectionAttempts - reconnection attempts (in seconds) for all back-end service connections. In the event of a connection loss, the application will attempt to reconnect until this number is reached or until the library is stopped.
timeout - the timeout (in seconds) for the requests to the servers. When a request to a server doesn't get an answer by this delay, it will throw a timeout exception. The default value is 30 (seconds); it should be lower than the period.