Creates a new connection parameters and fills it with values.
(optional) an object to be converted into key-value pairs to initialize this connection.
Adds 'sectionParams' to this ConfigParams object under the section named 'section'.
name of the section, under which 'sectionParams' is to be added. The keys of 'sectionParams' will be renamed to "(section).<key's name>", when added to this ConfigParams object.
ConfigParams that are to be added under the section named 'section'.
map of items to append to this StringValueMap.
Removes all values from this StringValueMap.
a clone of this object.
key of the item to retrieve from this StringValueMap.
the item stored by the given key.
key of the item to retrieve.
the item with the given key as an AnyValueArray object.
key of the item to retrieve.
value to use if the item with the given key cannot be converted into an AnyValueArray.
the item with the given key as an AnyValueArray object or 'defaultValue', if conversion is not possible.
key of the item to retrieve.
the item with the given key as a boolean (or false as the default).
key of the item to retrieve.
value to return if conversion is not possible.
the item with the given key as a boolean or the defaultValue (if conversion is not possible).
key of the item to retrieve.
the item with the given key as a Datetime (or null as the default).
key of the item to retrieve.
value to return if conversion is not possible.
the item with the given key as a Datetime or the defaultValue (if conversion is not possible).
key of the item to retrieve.
the item with the given key as a double (or 0 as the default).
key of the item to retrieve.
value to return if conversion is not possible.
the item with the given key as a double or the defaultValue (if conversion is not possible).
key of the item to retrieve.
the item with the given key as a float (or 0 as the default).
key of the item to retrieve.
value to return if conversion is not possible.
the item with the given key as a float or the defaultValue (if conversion is not possible).
key of the item to retrieve.
the item with the given key as an integer (or 0 as the default).
key of the item to retrieve.
value to return if conversion is not possible.
the item with the given key as an integer or the defaultValue (if conversion is not possible).
key of the item to retrieve.
the item with the given key as a long (or 0 as the default).
key of the item to retrieve.
value to return if conversion is not possible.
the item with the given key as a long or the defaultValue (if conversion is not possible).
key of the item to retrieve.
the item with the given key as an AnyValueMap object.
key of the item to retrieve.
value to use if the item with the given key cannot be converted into an AnyValueMap.
the item with the given key as an AnyValueMap object or 'defaultValue', if conversion is not possible.
key of the item to retrieve.
the item with the given key as a nullable AnyValueArray object (returns null if the item with the given key is null).
key of the item to retrieve.
the item with the given key as a nullable boolean.
key of the item to retrieve.
the item with the given key as a nullable Datetime.
key of the item to retrieve.
the item with the given key as a nullable double.
key of the item to retrieve.
the item with the given key as a nullable float.
key of the item to retrieve.
the item with the given key as a nullable integer.
key of the item to retrieve.
the item with the given key as a nullable long.
key of the item to retrieve.
the item with the given key as a nullable AnyValueMap object (returns null if the item with the given key is null).
key of the item to retrieve.
the item with the given key as a nullable string.
Converts the item with the given key into a nullable object of type 'type' using [[TypeConverter.toNullableType]] and returns it.
the TypeCode to be used in TypeConverter.toNullableType
key of the item to retrieve.
the item with the given key as a nullable object of type 'type'.
key of the item to retrieve.
the item with the given key without any conversions or all items (if 'key' is undefined or omitted).
key of the item to retrieve.
the item with the given key as a string (or null as the default).
key of the item to retrieve.
value to return if conversion is not possible.
the item with the given key as a string or the defaultValue (if conversion is not possible).
Converts the item with the given key into an object of type 'type' using [[TypeConverter.toTypeWithDefault]] and returns it.
the TypeCode to be used in TypeConverter.toTypeWithDefault
key of the item to retrieve.
the item with the given key as an object of type 'type' (or null as the default).
Converts the item with the given key into an object of type 'type' using [[TypeConverter.toTypeWithDefault]] and returns it.
the TypeCode to be used in TypeConverter.toTypeWithDefault
value to return if conversion is not possible.
the item with the given key as an object of type 'type' or the defaultValue, if conversion is not possible.
key of the item to retrieve.
the item with the given key as an AnyValue object.
Gets the key to retrieve this connection from [[DiscoveryService]]. If this key is null, than all parameters are already present.
the discovery key to retrieve connection.
Gets the host name or IP address.
the host name or IP address.
all of the keys that are contained in this StringValueMap as a list of strings.
Gets the port number.
the port number.
Gets the connection protocol.
(optional) the default protocol
the connection protocol or the default value if it's not set.
name of the section to retrieve configuration parameters from.
all configuration parameters that belong to the section named 'section'.
Example key "Section-1.Subsection-1-1.Key-1-1-1" contains the section named "Section-1".
Calling getSection("Section-1")
would return a ConfigParams object containing
the key "Subsection-1-1.Key-1-1-1"
the names of all sections that are present in this object's complex keys.
Example key "Section-1.Subsection-1-1.Key-1-1-1" contains the section named "Section-1".
Gets the resource URI or connection string. Usually it includes all connection parameters in it.
the resource URI or connection string.
the number of key-value pairs stored in this StringValueMap.
Overrides the configuration parameters stored in this object with the ones in 'configParams'. If a configuration is already set in this ConfigParams object, it will be overwritten by the value in 'configParams' with the same key.
configuration parameters to override the parameters of this object with.
ConfigParams object with overridden parameters.
the key by which to insert the given value.
the value to insert into this StringValueMap by the given key.
key of the item to remove.
the key by which to set the 'value' passed.
the value to set in this StringValueMap with the given 'key'. If 'key' is omitted, then this StringValueMap will be set (cleared and filled anew) using 'value'. In this case 'value' will be converted to a map using "MapConverter.toMap(value)" and set to this StringValueMap.
Sets the default configurations for this ConfigParams object, based on the default configuration parameters passed in 'defaultConfigParams'. If a configuration is already set in this ConfigParams object, it will not be overwritten by the default value in 'defaultConfigParams' with the same key.
the default configuration parameters to use.
this ConfigParams object with the newly set defaults.
Sets the key to retrieve these parameters from [[DiscoveryService]].
a new key to retrieve connection.
Sets the host name or IP address.
a new host name or IP address.
Sets the port number.
a new port number.
Sets the connection protocol.
a new connection protocol.
Sets the resource URI or connection string.
a new resource URI or connection string.
this StringValueMap as a semicolon-separated values string.
Example: "key1=value1;key2;key3=value3".
Checks if these connection parameters shall be retrieved from [[DiscoveryService]]. The connection parameters are redirected to [[DiscoveryService]] when discovery_key parameter is set.
true if connection shall be retrieved from [[DiscoveryService]]
Retrieves a single ConnectionParams from configuration parameters from "connection" section. If "connections" section is present instead, then is returns only the first connection element.
ConnectionParams, containing a section named "connection(s)".
the generated ConnectionParams object.
Static method for creating a StringValueMap using the maps passed as parameters.
the maps passed to this method to create a StringValueMap with.
the StringValueMap created.
Creates a new ConnectionParams object filled with key-value pairs serialized as a string.
a string with serialized key-value pairs as "key1=value1;key2=value2;..." Example: "Key1=123;Key2=ABC;Key3=2016-09-16T00:00:00.00Z"
a new ConnectionParams object.
Creates a new ConnectionParams object filled with provided key-value pairs called tuples. Tuples parameters contain a sequence of key1, value1, key2, value2, ... pairs.
the tuples to fill a new ConnectionParams object.
a new ConnectionParams object.
Static method for creating a StringValueMap from an array of tuples.
the key-value tuples array to initialize the new StringValueMap with.
the StringValueMap created and filled by the 'tuples' array provided.
Static method that creates a ConfigParams object based on the values that are stored in the 'value' object's properties.
configuration parameters in the form of an object with properties.
generated ConfigParams.
Retrieves all ConnectionParams from configuration parameters from "connections" section. If "connection" section is present instead, than it returns a list with only one ConnectionParams.
a configuration parameters to retrieve connections
a list of retrieved ConnectionParams
Static method that can merge two or more ConfigParams into one.
the ConfigParams that are to be merged into one ConfigParams object. The order in which the ConfigParams are passed to this method is important, as it regulates which values to keep in the case of identical complex keys (the ConfigParams passed later/last override the values of other ConfigParams with the same key).
merged ConfigParams.
Generated using TypeDoc
Contains connection parameters to connect to external services. They are used together with credential parameters, but usually stored separately from more protected sensitive values.
Configuration parameters
In addition to standard parameters ConnectionParams may contain any number of custom parameters
ConfigParams
CredentialParams
ConnectionResolver
IDiscovery
Example
Example ConnectionParams object usage:
let connection = ConnectionParams.fromTuples( "protocol", "http", "host", "10.1.1.100", "port", "8080", "cluster", "mycluster" ); let host = connection.getHost(); // Result: "10.1.1.100" let port = connection.getPort(); // Result: 8080 let cluster = connection.getAsNullableString("cluster"); // Result: "mycluster"