java.lang.Cloneable
AbstractConnectionConfiguration
, KeyValueConfiguration
, ManagedConfiguration
, PropertyConfiguration
public interface ConnectionConfiguration
extends java.lang.Cloneable
ConnectionConfiguration
allows you to configure any specific options used in
communication with the server. This interface is similar to a collection of String, boolean,
and Integer values.
Existing implementation classes for this interface also implements user-friendly
set of typified setter and getter methods for known PSDK connection configuration
properties.ClientConnectionOptions
and ClientADDPOptions
.
PSDK provides two implementation classes for the connection configuration purposes:
PropertyConfiguration
and KeyValueConfiguration
.
Usage sample may look like:
PropertyConfiguration config = new PropertyConfiguration();
config.setUseAddp(true);
config.setAddpClientTimeout(11);
config.setAddpServerTimeout(12);
config.setAddpTrace("both");
And sample of lower level configuration creation:
Properties props = new Properties();
props.setProperty("protocol", "addp");
props.setProperty("addp-timeout", "11");
props.setProperty("addp-remote-timeout", "12");
props.setProperty("addp-trace", "both");
PropertyConfiguration config = new PropertyConfiguration(props);
Modifier and Type | Method | Description |
---|---|---|
ConnectionConfiguration |
clone() |
|
boolean |
getBoolean(java.lang.String name) |
Gets boolean parameter value from the configuration.
|
boolean |
getBoolean(java.lang.String name,
boolean defaultValue) |
Gets boolean parameter value from the configuration.
|
java.lang.Integer |
getInteger(java.lang.String name) |
Gets integer parameter value from the configuration.
|
java.lang.Integer |
getInteger(java.lang.String name,
java.lang.Integer defaultValue) |
Gets integer parameter value from the configuration.
|
java.lang.String |
getOption(java.lang.String name) |
Gets string parameter value from the configuration.
|
java.lang.String |
getOption(java.lang.String name,
java.lang.String defaultValue) |
Gets string parameter value from the configuration.
|
void |
setBoolean(java.lang.String name,
boolean value) |
Sets boolean parameter in the configuration.
|
void |
setInteger(java.lang.String name,
java.lang.Integer value) |
Sets integer parameter in the configuration.
|
void |
setOption(java.lang.String name,
java.lang.String value) |
Sets string parameter in the configuration.
|
java.lang.String getOption(java.lang.String name)
null
.name
- name (key) of the parameterjava.lang.String getOption(java.lang.String name, java.lang.String defaultValue)
name
- name (key) of the parameterdefaultValue
- value to return if parameter is not foundvoid setOption(java.lang.String name, java.lang.String value)
name
- name (key) of the parametervalue
- string value to setboolean getBoolean(java.lang.String name)
false
.name
- name (key) of the parameterboolean getBoolean(java.lang.String name, boolean defaultValue)
name
- name (key) of the parameterdefaultValue
- value to return if parameter is not foundvoid setBoolean(java.lang.String name, boolean value)
name
- name (key) of the parametervalue
- boolean value to setjava.lang.Integer getInteger(java.lang.String name)
0
.name
- name (key) of the parameterjava.lang.Integer getInteger(java.lang.String name, java.lang.Integer defaultValue)
name
- name (key) of the parameterdefaultValue
- value to return if parameter is not foundvoid setInteger(java.lang.String name, java.lang.Integer value)
name
- name (key) of the parametervalue
- integer value to setConnectionConfiguration clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.