Creates a new connection parameters and fills it with values.
(optional) an object to be converted into key-value pairs to initialize this connection.
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.
Gets the port number.
the port number.
Gets the port number with default value.
a default port number.
the port number.
Gets the connection protocol.
the connection protocol or the default value if it's not set.
Gets the connection protocol with default value.
(optional) the default protocol
the connection protocol or the default value if it's not set.
Gets the resource URI or connection string. Usually it includes all connection parameters in it.
the resource URI or connection string.
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.
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.
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.
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
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"