Configuration Platform SDK 7.6 API Reference

com.genesyslab.platform.commons.connection
Class AbstractConnectionConfiguration

java.lang.Object
  extended bycom.genesyslab.platform.commons.connection.AbstractConnectionConfiguration
All Implemented Interfaces:
ConnectionConfiguration
Direct Known Subclasses:
KeyValueConfiguration, PropertyConfiguration

public abstract class AbstractConnectionConfiguration
extends java.lang.Object
implements ConnectionConfiguration

AbstractConnectionConfiguration is an abstract class which implements common methods assuming that real container can hold only string values. It is used in all concrete implementations such as KeyValueConfiguration or PropertyConfiguration.

See Also:
KeyValueConfiguration, PropertyConfiguration

Constructor Summary
AbstractConnectionConfiguration()
           
 
Method Summary
 boolean getBoolean(java.lang.String name)
          Returns boolean.
 boolean getBoolean(java.lang.String name, boolean defaultValue)
          Returns boolean.
 java.lang.Integer getInteger(java.lang.String name)
          Get integer parameter from the config.
 java.lang.Integer getInteger(java.lang.String name, java.lang.Integer defaultValue)
          Get integer parameter from the config.
 java.lang.String getOption(java.lang.String name)
          Get string parameter from the configuration.
 void setBoolean(java.lang.String name, boolean value)
          Set boolean parameter into config.
 void setInteger(java.lang.String name, java.lang.Integer value)
          Set integer parameter into config.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.genesyslab.platform.commons.connection.ConnectionConfiguration
getOption, setOption
 

Constructor Detail

AbstractConnectionConfiguration

public AbstractConnectionConfiguration()
Method Detail

getOption

public java.lang.String getOption(java.lang.String name)
Get string parameter from the configuration. Default value is null.

Specified by:
getOption in interface ConnectionConfiguration
Parameters:
name - name (key) of the parameter
Returns:
value of the parameter or null if parameter is not found

getBoolean

public boolean getBoolean(java.lang.String name)
Returns boolean. Values that are considered 'true' are case insensitive: Their opposites (false, no, off) are false markers disregarding default value. All other values (incl. absence of value) are considered 'false'.

Specified by:
getBoolean in interface ConnectionConfiguration
Parameters:
name - name of an option
Returns:
boolean value of option

getBoolean

public boolean getBoolean(java.lang.String name,
                          boolean defaultValue)
Returns boolean. Values that are considered 'true' are case insensitive: Their opposites (false, no, off) are false markers disregarding default value. All other values (incl. absence of value) are considered 'false'.

Specified by:
getBoolean in interface ConnectionConfiguration
Parameters:
name - name of an option
defaultValue - value returned when there is no such option or option could not be parsed.
Returns:
boolean value of option

getInteger

public java.lang.Integer getInteger(java.lang.String name)
Get integer parameter from the config. Default value is 0.

Specified by:
getInteger in interface ConnectionConfiguration
Parameters:
name - name (key) of the parameter
Returns:
value of the parameter or 0 if parameter is not found

getInteger

public java.lang.Integer getInteger(java.lang.String name,
                                    java.lang.Integer defaultValue)
Get integer parameter from the config.

Specified by:
getInteger in interface ConnectionConfiguration
Parameters:
name - name (key) of the parameter
defaultValue - value to return if parameter is not found
Returns:
value of the parameter

setBoolean

public void setBoolean(java.lang.String name,
                       boolean value)
Set boolean parameter into config.

Specified by:
setBoolean in interface ConnectionConfiguration
Parameters:
name - name (key) of the parameter
value - bool value to set

setInteger

public void setInteger(java.lang.String name,
                       java.lang.Integer value)
Set integer parameter into config.

Specified by:
setInteger in interface ConnectionConfiguration
Parameters:
name - name (key) of the parameter
value - int value to set

Configuration Platform SDK 7.6 API Reference

Send comments on this topic.
Copyright © 2006–2008 Genesys Telecommunication Laboratories, Inc. All rights reserved.