com.genesyslab.platform.commons.connection.configuration
Class KeyValueConfiguration
java.lang.Object
com.genesyslab.platform.commons.connection.configuration.AbstractConnectionConfiguration
com.genesyslab.platform.commons.connection.configuration.KeyValueConfiguration
- All Implemented Interfaces:
- ClientADDPOptions, ClientConnectionOptions, ConnectionConfiguration, java.lang.Cloneable
public class KeyValueConfiguration
- extends AbstractConnectionConfiguration
The implementation of ConnectionConfiguration interface, which contains all values
in KeyValueCollection
. It can be instantiated with any KeyValueCollection instance.
Method Summary |
KeyValueConfiguration |
clone()
|
protected KeyValuePair |
findOption(java.lang.String name)
|
java.lang.Integer |
getInteger(java.lang.String name,
java.lang.Integer defaultValue)
Gets integer parameter from the config. |
java.lang.String |
getOption(java.lang.String name,
java.lang.String defaultValue)
Gets string parameter from the configuration. |
void |
setInteger(java.lang.String name,
java.lang.Integer value)
Sets integer parameter into config. |
void |
setOption(java.lang.String name,
java.lang.String value)
Sets string parameter into config. |
java.lang.String |
toString()
|
Methods inherited from class com.genesyslab.platform.commons.connection.configuration.AbstractConnectionConfiguration |
getAddpClientTimeout, getAddpServerTimeout, getAddpTrace, getAddpTraceMode, getBoolean, getBoolean, getInteger, getIPVersion, getLocalBindingHost, getLocalBindingPort, getOption, getStringsEncoding, getTLSVersion, isIPv6Enabled, isTLSEnabled, isUseAddp, setAddpClientTimeout, setAddpServerTimeout, setAddpTrace, setAddpTraceMode, setBoolean, setIPv6Enabled, setIPVersion, setLocalBindingHost, setLocalBindingPort, setStringsEncoding, setTLSEnabled, setTLSVersion, setUseAddp |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
KeyValueConfiguration
public KeyValueConfiguration(KeyValueCollection kvList)
- Creates object and set all configuration using given KeyValueCollection object.
Constructor will copy contents from given KeyValueCollection.
- Parameters:
kvList
- collection to build configuration on
getOption
public java.lang.String getOption(java.lang.String name,
java.lang.String defaultValue)
- Gets string parameter from the configuration.
- Parameters:
name
- name (key) of the parameterdefaultValue
- value to return if parameter is not found
- Returns:
- value of the parameter
getInteger
public java.lang.Integer getInteger(java.lang.String name,
java.lang.Integer defaultValue)
- Gets integer parameter from the config.
- Specified by:
getInteger
in interface ConnectionConfiguration
- Overrides:
getInteger
in class AbstractConnectionConfiguration
- Parameters:
name
- name (key) of the parameterdefaultValue
- value to return if parameter is not found
- Returns:
- value of the parameter
setOption
public void setOption(java.lang.String name,
java.lang.String value)
- Sets string parameter into config.
It will replace existing value, if pair with given name already exists.
- Parameters:
name
- name (key) of the parametervalue
- string value to set
setInteger
public void setInteger(java.lang.String name,
java.lang.Integer value)
- Sets integer parameter into config.
It will replace existing value, if pair with given name already exists.
- Specified by:
setInteger
in interface ConnectionConfiguration
- Overrides:
setInteger
in class AbstractConnectionConfiguration
- Parameters:
name
- name (key) of the parametervalue
- integer value to set
findOption
protected KeyValuePair findOption(java.lang.String name)
clone
public KeyValueConfiguration clone()
- Specified by:
clone
in interface ConnectionConfiguration
- Overrides:
clone
in class AbstractConnectionConfiguration
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.