Qorus Integration Engine®
4.0.3.p2_git
|
User connections, Datasource Connections, Qorus to Qorus Connections are defined in connection files with the suffix ".qconn"
.
Qorus user code should access external resources using user connections in all possible cases because such connections are monitored and the interace is managed (stopped and started) when the dependent connections become unavailable and again available (additionally, operational alerts are issued and cleared in these cases.
When connections are made directly (for example, by using a HTTPClient object directly instead of using a user connection), then the system does not monitor the connection's health, does not manage dependent interface status nor raise or clear alerts when the connection is unavailable or again available.
User connection definition file syntax:
connection-name = ( key = value, ... )
The use of whitespace (spaces, newlines, tabs, etc) is allowed; empty lines are ignored. Text after the hash character ('#'
) indicates the start of a line comment when found outside a quoted string. Quoted strings are allowed, and certain characters must be included in quoted strings and escaped to be used in connection attributes; see Connection File Parsing for more information.
Conditional parsing is also supported with the following parse directives:
%ifdef
: if the given parse define is defined, then the definitions up to the next %else
or %endif
are parsed, otherwise the block is skipped%ifndef
: if the given parse define is not defined, then the definitions up to the next %else
or %endif
are parsed, otherwise the block is skipped%else
: toggles the parsing state from the last %ifdef
or %ifndef
%endif
: closes a conditionally-parsed blockParse defines are set in the System Options File by system option qorus.defines.
Supported (case sensitive) keys are given in the following table.
Remote Connection Keys
Key | Mandatory? | Description | Example |
url | Y | full URL for the resource; see connection object types for information on the URLs handled and the object class returned by UserApi::getUserConnection() | http://user:pass@localhost:8001 |
desc | N | public description of the connection | production server 2 |
Additional keys can (and depending on the connection type must) be defined according to supported or required options for the given connection type. See connection object types for information on supported options per connection type.
"qorus"
connection name is provided by default by the QorusConnectionProvider module as a connnection to the local Qorus instance, therefore it's recommended not to use "qorus"
for a user or remote connection nameThe following is an example of a connection file using conditional parsing:
%ifdef Production # production connection definition sftp-file1 = ( desc = FILE1 SFTP Polling / Delivery connection, url = sftp://file1@sftp.example.com, keyfile = /export/home/qorus-prod/.ssh/id_rsa-file1 ) %else # test/devel connection definition sftp-file1 = ( desc = FILE1 SFTP Polling / Delivery connection, url = sftp://file1@sftp-test.example.com, keyfile = HOME/.ssh/id_rsa-file1 ) %endif