Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.connection.configuration
Interface ConnectionConfiguration

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
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.
See 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);
 

See Also:
ClientConnectionOptions, ClientADDPOptions, PropertyConfiguration, KeyValueConfiguration

Method Summary
 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.
 

Method Detail

getOption

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

Parameters:
name - name (key) of the parameter
Returns:
value of the parameter or null if parameter is not found

getOption

java.lang.String getOption(java.lang.String name,
                           java.lang.String defaultValue)
Gets string parameter value from the configuration.

Parameters:
name - name (key) of the parameter
defaultValue - value to return if parameter is not found
Returns:
value of the parameter

setOption

void setOption(java.lang.String name,
               java.lang.String value)
Sets string parameter in the configuration.

Parameters:
name - name (key) of the parameter
value - string value to set

getBoolean

boolean getBoolean(java.lang.String name)
Gets boolean parameter value from the configuration. Default value is false.

Parameters:
name - name (key) of the parameter
Returns:
value of the parameter or false if parameter is not found

getBoolean

boolean getBoolean(java.lang.String name,
                   boolean defaultValue)
Gets boolean parameter value from the configuration.

Parameters:
name - name (key) of the parameter
defaultValue - value to return if parameter is not found
Returns:
value of the parameter

setBoolean

void setBoolean(java.lang.String name,
                boolean value)
Sets boolean parameter in the configuration.

Parameters:
name - name (key) of the parameter
value - boolean value to set

getInteger

java.lang.Integer getInteger(java.lang.String name)
Gets integer parameter value from the configuration. Default value is 0.

Parameters:
name - name (key) of the parameter
Returns:
value of the parameter or 0 if parameter is not found

getInteger

java.lang.Integer getInteger(java.lang.String name,
                             java.lang.Integer defaultValue)
Gets integer parameter value from the configuration.

Parameters:
name - name (key) of the parameter
defaultValue - value to return if parameter is not found
Returns:
value of the parameter

setInteger

void setInteger(java.lang.String name,
                java.lang.Integer value)
Sets integer parameter in the configuration.

Parameters:
name - name (key) of the parameter
value - integer value to set

clone

ConnectionConfiguration clone()
                              throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.