Qorus Integration Engine® Enterprise Edition 6.1.0_prod
|
This class implements the client interface to a Qorus server. More...
Public Member Methods | |
constructor () | |
creates the object and parses the options file | |
Logger | getClientLogger (Logger::LoggerLevel level=LoggerLevel::getLevelError()) |
Returns a client "stdout" logger. | |
Logger | getClientLogger (int level=LoggerLevel::ERROR) |
Returns a client "stdout" logger. | |
Connections | getConnectionProvider (string type) |
returns the connection provider object | |
bool | isLSB () |
returns True if the installation is an LSB installation, False if not | |
string | getOptionFileName () |
returns the options file name | |
*hash< string, AbstractConnection > | getUserConnections () |
Returns a hash describing all defined user connections or NOTHING if no user connections are defined. | |
*hash< auto > | getUserConnectionInfo () |
Returns a hash describing all defined user connections or NOTHING if no user connections are defined. | |
ConnectionProvider::AbstractConnection | getUserConnectionObject (string name) |
Returns a ConnectionProvider::AbstractConnection object corresponding to a defined user connection. | |
synchronized hash | getUserConnectionInfo (string name) |
Returns a hash describing the given user connection. | |
string | getUserConnectionUrl (string name) |
Returns the URL corresponding to a defined user connection. | |
object | getUserConnection (string name, bool connect=True, *hash rtopts) |
Returns an object corresponding to a defined user connection. | |
reloadUserConnections () | |
reloads user connections from the DB on the next request for a user connection | |
synchronized Datasource | getDatasource (string name) |
returns a Datasource object for the given string if defined in Datasource Connections | |
Datasource | getNewDatasource (string name) |
returns a new Datasource object for the given string if defined in Datasource Connections | |
string | getDatasourceConnectionString (string name) |
returns the datasource connection string for the given datasource if defined in Datasource Connections | |
*hash< string, string > | getDatasourceConnectionsAsHash () |
returns a hash of datasource connections; keys are datasource names, values are connection strings | |
string | getConfigDir () |
returns the path to the configuration directory for this instance of Qorus | |
string | getAppDir () |
returns the path to the application root directory | |
synchronized DatasourcePool | getDatasourcePool (string name, int min=0, int max=0) |
returns a DatasourcePool object for the given string if defined in Datasource Connections | |
DatasourcePool | getNewDatasourcePool (string name, softint min=0, softint max=0) |
returns a new DatasourcePool object for the given string if defined in Datasource Connections | |
*hash< auto > | getRemoteInfo () |
returns a hash of remote connections keyed by remote connection name or NOTHING if no remote connections are defined | |
ConnectionProvider::AbstractConnection | getRemoteConnectionObject (string name) |
returns a ConnectionProvider::AbstractConnection object for the given remote connection | |
hash | getRemoteInfo (string name) |
returns a hash of the given remote connection | |
string | getRemoteUrl (string name) |
returns the URL for a Qorus remote connection from the connection name | |
OMQ::Client::QorusSystemAPIHelper | getRemote (string name) |
gets a remote connection based on connection parameters parsed in the Qorus to Qorus Connections | |
OMQ::Client::QorusSystemRestHelper | getRemoteRest (string name, bool connect=True) |
returns a connection for RESTful communication with a remote Qorus server based on connection parameters parsed in the Qorus to Qorus Connections | |
hash< auto > | getRemoteConfig (string name, bool with_password=True) |
returns a hash with connection parameters for a remote Qorus server based on connection parameters parsed in the Qorus to Qorus Connections | |
hash< auto > | getRemoteConfig (string name, hash< auto > opts) |
returns a hash with connection parameters for a remote Qorus server based on connection parameters parsed in the Qorus to Qorus Connections | |
string | getLocalSystemAuthToken (*timeout expiry) |
Returns a token with internal system authentication for use with REST clients or throws an exception. | |
*string | tryGetLocalSystemAuthToken (*timeout expiry) |
Returns a token with internal system authentication for use with REST clients if possible. | |
updateOptionValue (string domain, string option, auto value) | |
Update internal option value. | |
synchronized | initOmqUser () |
initializes the omquser variable | |
setDatasourceFromText (string line) | |
this method allows a datasource to be created or redefined from the text passed | |
hash< auto > | getWorkflowInfoID (softint wfid) |
returns a hash of information about the given workflow based on the workflowid passed | |
hash< auto > | getWorkflowInfoName (string name, string version) |
returns a hash of information about the given workflow based on the workflow name and version passed | |
hash | getOriginalOptionHash () |
returns a hash of options originally read form the options file | |
preSchemaVerifySystem (bool quiet=False) | |
actions to verify the state of an installed Qorus installation before the schema has potentially been created | |
postSchemaVerifySystem (bool quiet=False) | |
actions to verify the state of an installed Qorus installation after the schema has been verified | |
checkAdminUser (bool quiet=False) | |
check if any users exist in the system DB, if not create a superuser named admin with a random password | |
checkNodeOption (bool quiet=False) | |
create a "node" entry in System Options File if not already present | |
generateKeys (bool quiet=False) | |
create encryption key files if they don't exist and sets system options | |
string | createWorkflowInstanceID (softint wfid, *softstring ext_order_id, *hash sdata, *hash ddata, *hash orderkeys, softint priority=OMQ::DefaultOrderPriority, *softint pwfiid) |
creates a workflow order data instance from the workflowid and order parameters and returns the workflow_instanceid | |
string | createWorkflowInstanceName (string name, string version, *softstring ext_order_id, *hash sdata, *hash ddata, *hash orderkeys, softint priority=OMQ::DefaultOrderPriority, *softint pwfiid) |
creates a workflow order data instance from the workflow and version and order parameters and returns the workflow_instanceid | |
string | getQorusSystemLogFilePrefix () |
returns the system log file name prefix | |
string | getWorkflowLogFileName (string name, string version, softint wfid=0) |
returns a string giving the workflow log file name corresponding to the arguments | |
string | getServiceLogFileName (string type, string name, string version, softint svcid=0) |
returns a string giving the service log file name corresponding to the arguments | |
string | getJobLogFileName (string name, string version, softint jobid=0) |
returns a string giving the service log file name corresponding to the arguments | |
Public Member Methods inherited from OMQ::CryptoKeyHelper | |
binary | serializeEncryptSensitiveData (hash< auto > data, binary iv, reference mac, string aad) |
returns a binary object encrypted with AES-256 for a sensitive data hash | |
hash< auto > | deserializeDecryptSensitiveData (binary data, binary iv, binary mac, string aad) |
returns a decrypted sensitive data hash from the AES-256-encrypted binary object and other encryption arguments | |
string | encodeEncryptSensitiveValue (string svalue) |
returns a string encrypted with Blowfish and subjected to base64 encoding for a sensitive data key value | |
string | decodeDecryptSensitiveValue (string svalue) |
returns a decoded and decrypted sensitive data key value from the base64-encoded encrypted value | |
hash< auto > | encryptOrderData (softint wfiid, string skey, string svalue, hash< auto > info, *hash< auto > meta) |
encrypt the data needed for a row in sensitive_order_data | |
abstract *string | getKeyOption (string opt) |
returns the value of a system opion as a string | |
Static Public Member Methods | |
static | ignoreWarnings (bool ignore_warnings=True) |
sets a flag to ignore warnings | |
static bool | checkPid (int pid, string process_type) |
Returns True if the process is running, False if not. | |
static | saveOptionsFile (string fn, hash options, string hdr="", string trl="") |
saves the hash given as the options file | |
static | clientError (string msg, string desc,...) |
throws an exception with the given parameters | |
static | clientWarning (string err, string msg,...) |
prints out a warning with the given parameters | |
Static Public Member Methods inherited from OMQ::QorusClient | |
static | init (*bool ignore_warnings) |
the client initialization function where any errors cause an error message to be displayed and exit() is called | |
static synchronized | init2 (*bool ignore_warnings) |
the main client initialization method; other functions call this one to initialize the client library | |
static synchronized | initFast (*bool ignore_warnings) |
fast client initialization method; other functions call this one to initialize the client library | |
static hash< auto > | parseOptions (string domain) |
option-parsing function: parses the option file | |
static hash< auto > | parseOptions () |
option-parsing function: parses the option file | |
static int | configureInterfaces (hash< auto > config, *bool silent, bool exit_on_error=True) |
set config items in the server | |
static int | restGetCode (string uri_path, bool exit_if_down=True) |
Sends a REST GET request to the Qorus server and returns the HTTP status code. | |
static | createPerm (string perm, string desc, *bool silent) |
Creates the given user permission if the permission does not exist. | |
static | createRole (string role, string base_role, string desc, *softlist< string > groups, *bool silent) |
Creates the given role as a clone of an existing role if the new role does not exist. | |
static | createRoleWithPerms (string role, string desc, hash< auto > role_info, *bool silent) |
Creates the given role with explicit permissions if the role does not exist. | |
static | createUser (string user, string pass, softlist< string > roles, string desc, *bool silent) |
Creates the given user if the user does not exist. | |
static | createUserConnection (string name, string desc, string url, *hash< auto > options, *bool silent) |
Creates a user connection if the connection does not exist. | |
static | createGlobalError (string error, string desc, string status, *int retry_delay_secs, *bool silent) |
Creates the given global error configuration if it does not already exist. | |
static | createOrUpdateWorkflowError (string workflow, string error, string desc, string status, *int retry_delay_secs, *bool silent) |
Aligns the given workflow error configuration according to the arguments. | |
static | addDataProviderModuleOption (string mod) |
Adds the given module to the dataprovider-modules system option. | |
static | addConnectionModuleOption (string mod) |
Adds the given module to the connection-modules system option. | |
static | addModuleOption (string option, string mod) |
Adds the given module to the given module option. | |
Private Member Methods | |
synchronized | initUserConnectionsIntern () |
ensures that user connections have been initialized | |
string | processSystemTemplate (string template) |
takes a template string and performs substitutions | |
Private Member Methods inherited from OMQ::CryptoKeyHelper | |
setupEncryption () | |
sets up encryption keys and verifies their state | |
Private:Internal Member Methods | |
*ZSocketDealer | tryGetQorusCoreSocket () |
Tries to return a ZSocket object for communicating with the local qorus-core instance. | |
internal | getZContext () |
Sets up the context for ZeroMQ messaging. | |
internal | getLocalAddress () |
Gets the local address and node name. | |
setRemoteParams (OMQ::Client::QorusSystemAPIHelper ret, string name) | |
sets up a QorusSystemAPIHelper to communicate with the given remote Qorus instance | |
string | getConfigFile (string name, *string opt) |
returns a complete path for the configuration file given as an argument or an exception is thrown if the file does not exist | |
hash< auto > | getOptions (string domain) |
returns the options from the given domain as a hash | |
hash< auto > | getOptions () |
returns the options from all domains as a hash of hashes | |
setOption (string domain, string key, auto value) | |
Allows an option value to be set temporarily. | |
SQLInterface | getSQLIF () |
returns an SQLInterface object using the system DatasourcePool object | |
SQLInterface | getSQLIF (string dsn) |
returns an SQLInterface object using a DatasourcePool object for the datasource given as an argument | |
SQLInterface | getSQLIF (DatasourcePool dsp) |
returns an SQLInterface object using the DatasourcePool object given as an argument | |
resetSystemDatasource () | |
Resets the system datasource. | |
initSystemDatasources () | |
initializes the system Datasource and DatasourcePool objects | |
synchronized | initOmq (*bool ignore_errors) |
initializes the omq variable | |
softstring | getNextSequenceValue (string name) |
returns the next sequence value for the given sequence using the SQLInterface object (returned as a string) | |
int | getNextSequenceValueInt (string name) |
returns the next sequence value for the given sequence using the SQLInterface object (returned as an int) | |
internal | init () |
on-demand initialization | |
internal | initInternalDb () |
initalizes the omqp and sqlif members | |
Static Private:Internal Member Methods | |
static hash | parseOptionsFile (string fn) |
parses the given file as a Qorus option file and returns a hash | |
static hash< auto > | parse_ds (string str) |
parses a datasource string and returns the hash | |
static binary | getRandomSalt (int size) |
returns a random salt from /dev/urandom (on UNIX) as a binary, arg: size in bytes | |
static int | createRBACUser (Datasource ds, string user, string pass, string name, softlist roles, bool quiet=False, *string tag) |
creates an RBAC user with transaction management and duplicate user checking | |
static | createRBACUserDB (Datasource ds, string user, string pass, string name, softlist roles, bool quiet=False, *string tag) |
creates an RBAC user | |
static auto | parseToQoreValue (string arg) |
tries to convert a string (such as an argument given from the command-line) to a Qore value | |
Private:Internal Attributes | |
hash | options |
internal options | |
Additional Inherited Members | |
Public Attributes inherited from OMQ::QorusClient | |
const | DefaultZmqTimeout = 5s |
Default client timeout for ZeroMQ messages to acquire an API token. | |
This class implements the client interface to a Qorus server.
This class is in charge of parsing the options and providing other client-related services based on these files. This class is normally used from the omqclient object, a global variable initialized by calling qorus_client_init() (or qorus_client_init2()).
For example, retrieving Datasource or DatasourcePool objects:
OMQ::QorusClientAPI::constructor | ( | ) |
creates the object and parses the options file
uses the OMQ_DIR environment variable if set, otherwise tries to find the Qorus installation
|
staticprivate:internal |
creates an RBAC user with transaction management and duplicate user checking
assumes auto-commit disabled for the passed datasource
|
staticprivate:internal |
creates an RBAC user
no transaction management, no checking for duplicate users or valid permissions, etc
string OMQ::QorusClientAPI::createWorkflowInstanceID | ( | softint | wfid, |
*softstring | ext_order_id, | ||
*hash | sdata, | ||
*hash | ddata, | ||
*hash | orderkeys, | ||
softint | priority = OMQ::DefaultOrderPriority , |
||
*softint | pwfiid | ||
) |
creates a workflow order data instance from the workflowid and order parameters and returns the workflow_instanceid
wfid | the workflow ID of the workflow order to create |
ext_order_id | the optional external_order_instanceid of the workflow order to create |
sdata | the static data for the order |
ddata | the dynamic data for the order |
orderkeys | a hash giving the order keys for the order (key=value) |
priority | gives the order priority (default OMQ::DefaultOrderPriority) |
pwfiid | the loosely-coupled parent workflow instance ID |
CREATE-ORDER-ERROR | missing both static data and external order instance ID arguments |
string OMQ::QorusClientAPI::createWorkflowInstanceName | ( | string | name, |
string | version, | ||
*softstring | ext_order_id, | ||
*hash | sdata, | ||
*hash | ddata, | ||
*hash | orderkeys, | ||
softint | priority = OMQ::DefaultOrderPriority , |
||
*softint | pwfiid | ||
) |
creates a workflow order data instance from the workflow and version and order parameters and returns the workflow_instanceid
name | the name of the workflow for the order to create |
version | the version of the workflow for the order to create |
ext_order_id | the optional external_order_instanceid of the workflow order to create |
sdata | the static data for the order |
ddata | the dynamic data for the order |
orderkeys | a hash giving the order keys for the order (key=value) |
priority | gives the order priority (default OMQ::DefaultOrderPriority) |
pwfiid | the loosely-coupled parent workflow instance ID |
CREATE-ORDER-ERROR | missing both static data and external order instance ID arguments |
OMQ::QorusClientAPI::generateKeys | ( | bool | quiet = False | ) |
create encryption key files if they don't exist and sets system options
If system options are changed, backs up the System Options File
string OMQ::QorusClientAPI::getAppDir | ( | ) |
returns the path to the application root directory
for LSB instances, always returns "/var/opt/qorus"
Logger OMQ::QorusClientAPI::getClientLogger | ( | int | level = LoggerLevel::ERROR | ) |
Returns a client "stdout" logger.
If the client logger has already been created before, then it is returned, and the level argument is ignored
level | the level for the logger, if it is created with this call |
Logger OMQ::QorusClientAPI::getClientLogger | ( | Logger::LoggerLevel | level = LoggerLevel::getLevelError() | ) |
Returns a client "stdout" logger.
If the client logger has already been created before, then it is returned, and the level argument is ignored
level | the level for the logger, if it is created with this call |
string OMQ::QorusClientAPI::getConfigDir | ( | ) |
returns the path to the configuration directory for this instance of Qorus
|
private:internal |
returns a complete path for the configuration file given as an argument or an exception is thrown if the file does not exist
name | the config file name without any directory component |
opt | the name of the option giving the file location (default: name + "-file") |
MISSING-FILE | the given file cannot be located |
Connections OMQ::QorusClientAPI::getConnectionProvider | ( | string | type | ) |
returns the connection provider object
type | one of remote , connection , or datasource |
INVALID-CONNECTION-PROVIDER | invalid connection provider type |
synchronized Datasource OMQ::QorusClientAPI::getDatasource | ( | string | name | ) |
returns a Datasource object for the given string if defined in Datasource Connections
An exception is thrown if the datasource is not known. The same Datasource object will always be returned from this method.
name | the name of the datasource to retrieve |
INVALID-DATASOURCE | unknown datasource |
*hash< string, string > OMQ::QorusClientAPI::getDatasourceConnectionsAsHash | ( | ) |
returns a hash of datasource connections; keys are datasource names, values are connection strings
string OMQ::QorusClientAPI::getDatasourceConnectionString | ( | string | name | ) |
returns the datasource connection string for the given datasource if defined in Datasource Connections
An exception is thrown if the datasource is not known
name | the name of the datasource to retrieve |
INVALID-DATASOURCE | unknown datasource |
synchronized DatasourcePool OMQ::QorusClientAPI::getDatasourcePool | ( | string | name, |
int | min = 0 , |
||
int | max = 0 |
||
) |
returns a DatasourcePool object for the given string if defined in Datasource Connections
An exception is thrown if the datasource is not known. The same DatasourcePool object will always be returned from this method.
name | the name of the datasource to use as a basis for creating the DatasourcePool object |
min | override the minimum connection setting |
max | override the maximum connection setting |
string OMQ::QorusClientAPI::getLocalSystemAuthToken | ( | *timeout | expiry | ) |
Returns a token with internal system authentication for use with REST clients or throws an exception.
expiry | the optional expoiration period for the token (default = 10 minutes) |
QORUS-DOWN | no token can be returned; Qorus is down |
Datasource OMQ::QorusClientAPI::getNewDatasource | ( | string | name | ) |
returns a new Datasource object for the given string if defined in Datasource Connections
An exception is thrown if the datasource is not known
name | the name of the datasource to retrieve |
INVALID-DATASOURCE | unknown datasource |
DatasourcePool OMQ::QorusClientAPI::getNewDatasourcePool | ( | string | name, |
softint | min = 0 , |
||
softint | max = 0 |
||
) |
returns a new DatasourcePool object for the given string if defined in Datasource Connections
an exception is thrown if the datasource is not known
name | the name of the datasource to use as a basis for creating the DatasourcePool object |
min | the minumum number of connections to open when the object is created |
max | the maximum number of connections to manage; not more than these connections will be opened |
string OMQ::QorusClientAPI::getOptionFileName | ( | ) |
returns the options file name
|
private:internal |
returns the options from all domains as a hash of hashes
the top-level hash keys are the domain names
|
private:internal |
returns the options from the given domain as a hash
an empty hash is returned for domains not present in the options file
domain | the option domain to return |
OMQ::Client::QorusSystemAPIHelper OMQ::QorusClientAPI::getRemote | ( | string | name | ) |
gets a remote connection based on connection parameters parsed in the Qorus to Qorus Connections
name | a string key/name of the remote instance |
REMOTE-LOAD-ERROR | Missing Qorus to Qorus Connections configuration or malformed syntax |
GET-REMOTE-ERROR | requested connection is not defined |
hash< auto > OMQ::QorusClientAPI::getRemoteConfig | ( | string | name, |
bool | with_password = True |
||
) |
returns a hash with connection parameters for a remote Qorus server based on connection parameters parsed in the Qorus to Qorus Connections
name | a string key/name of the remote instance |
with_password | if True then the password is also returned |
REMOTE-LOAD-ERROR | Missing Qorus to Qorus Connections configuration or malformed syntax |
CONNECTION-ERROR | requested connection is not defined |
hash< auto > OMQ::QorusClientAPI::getRemoteConfig | ( | string | name, |
hash< auto > | opts | ||
) |
returns a hash with connection parameters for a remote Qorus server based on connection parameters parsed in the Qorus to Qorus Connections
name | a string key/name of the remote instance |
opts | connection information options; options are connection-specific; the only universal option is with_passwords: if True, then passwords are returned in the info hash |
REMOTE-LOAD-ERROR | Missing Qorus to Qorus Connections configuration or malformed syntax |
CONNECTION-ERROR | requested connection is not defined |
ConnectionProvider::AbstractConnection OMQ::QorusClientAPI::getRemoteConnectionObject | ( | string | name | ) |
returns a ConnectionProvider::AbstractConnection object for the given remote connection
name | the name of the remote connection |
REMOTE-LOAD-ERROR | Missing Qorus to Qorus Connections config file or malformed syntax |
GET-REMOTE-ERROR | requested connection is not defined |
*hash< auto > OMQ::QorusClientAPI::getRemoteInfo | ( | ) |
returns a hash of remote connections keyed by remote connection name or NOTHING if no remote connections are defined
REMOTE-LOAD-ERROR | Missing Qorus to Qorus Connections config file or malformed syntax |
hash OMQ::QorusClientAPI::getRemoteInfo | ( | string | name | ) |
returns a hash of the given remote connection
name | the name of the remote connection |
REMOTE-LOAD-ERROR | Missing Qorus to Qorus Connections configuration or malformed syntax |
GET-REMOTE-ERROR | requested connection is not defined |
OMQ::Client::QorusSystemRestHelper OMQ::QorusClientAPI::getRemoteRest | ( | string | name, |
bool | connect = True |
||
) |
returns a connection for RESTful communication with a remote Qorus server based on connection parameters parsed in the Qorus to Qorus Connections
name | a string key/name of the remote instance |
connect | if False, then the object will be created in an unconnected state |
REMOTE-LOAD-ERROR | Missing Qorus to Qorus Connections configuration or malformed syntax |
GET-REMOTE-ERROR | requested connection is not defined |
string OMQ::QorusClientAPI::getRemoteUrl | ( | string | name | ) |
returns the URL for a Qorus remote connection from the connection name
name | the name of the remote connection |
REMOTE-LOAD-ERROR | Missing Qorus to Qorus Connections configuration or malformed syntax |
GET-REMOTE-ERROR | requested connection is not defined |
|
private:internal |
returns an SQLInterface object using the system DatasourcePool object
"omq"
datasource
|
private:internal |
returns an SQLInterface object using the DatasourcePool object given as an argument
dsp | the DatasourcePool to use for the SQLInteterface object |
|
private:internal |
returns an SQLInterface object using a DatasourcePool object for the datasource given as an argument
dsn | the name of the datasource to use for the SQLInteterface object |
object OMQ::QorusClientAPI::getUserConnection | ( | string | name, |
bool | connect = True , |
||
*hash | rtopts | ||
) |
Returns an object corresponding to a defined user connection.
name | the name of the connection |
connect | if False an unconnected object will be returned, otherwise the object is already connected |
rtopts | any runtime options accepted by the connection |
CONNECTION-ERROR | The given connection is not known |
*hash< auto > OMQ::QorusClientAPI::getUserConnectionInfo | ( | ) |
Returns a hash describing all defined user connections or NOTHING if no user connections are defined.
synchronized hash OMQ::QorusClientAPI::getUserConnectionInfo | ( | string | name | ) |
Returns a hash describing the given user connection.
name | the name of the connection |
CONNECTION-ERROR | The given connection is invalid or unknown |
ConnectionProvider::AbstractConnection OMQ::QorusClientAPI::getUserConnectionObject | ( | string | name | ) |
Returns a ConnectionProvider::AbstractConnection object corresponding to a defined user connection.
name | the name of the connection |
CONNECTION-ERROR | The given connection is not known |
*hash< string, AbstractConnection > OMQ::QorusClientAPI::getUserConnections | ( | ) |
Returns a hash describing all defined user connections or NOTHING if no user connections are defined.
string OMQ::QorusClientAPI::getUserConnectionUrl | ( | string | name | ) |
Returns the URL corresponding to a defined user connection.
name | the name of the connection |
CONNECTION-ERROR | The given connection is invalid or unknown |
hash< auto > OMQ::QorusClientAPI::getWorkflowInfoID | ( | softint | wfid | ) |
returns a hash of information about the given workflow based on the workflowid passed
an exception is thrown if the workflowid is invalid
wfid | the workflowid of the workflow |
hash< auto > OMQ::QorusClientAPI::getWorkflowInfoName | ( | string | name, |
string | version | ||
) |
returns a hash of information about the given workflow based on the workflow name and version passed
an exception is thrown if the workflow name and version are invalid
name | the name the workflow |
version | the name the workflow |
|
private:internal |
initializes the system Datasource and DatasourcePool objects
This method is automatically called from other methods of this class when needed. This method is safe to call multiple times (also from multiple threads); if the system Datasource objects have already been initialized, then the method returns immediately
bool OMQ::QorusClientAPI::isLSB | ( | ) |
returns True if the installation is an LSB installation, False if not
|
staticprivate:internal |
parses a datasource string and returns the hash
an exception will be thrown if no driver name is given
|
staticprivate:internal |
parses the given file as a Qorus option file and returns a hash
returns a hash of the option information, keyed by "domain" (i.e. qorus, qorus-client); the return hash only has the option data that is set in the file; no options are derived or automatically set by this function
fn | the file name of the options file to parse |
|
staticprivate:internal |
tries to convert a string (such as an argument given from the command-line) to a Qore value
This method recognizes two special prefixes in the string:
STR=
this prefix indicates that the rest of the string should be passed literally and not parsedEVAL=
this prefix indicates that the rest of the string should be taken as a Qore expression and executed and the value returnedarg | a string to convert to a Qore value |
OMQ::QorusClientAPI::reloadUserConnections | ( | ) |
reloads user connections from the DB on the next request for a user connection
OMQ::QorusClientAPI::setDatasourceFromText | ( | string | line | ) |
this method allows a datasource to be created or redefined from the text passed
line | the datasource text to use to create or redefine a datasource (ex: dsname=driver:user/pass@dbnamehost:port) |
*string OMQ::QorusClientAPI::tryGetLocalSystemAuthToken | ( | *timeout | expiry | ) |
Returns a token with internal system authentication for use with REST clients if possible.
OMQ::QorusClientAPI::updateOptionValue | ( | string | domain, |
string | option, | ||
auto | value | ||
) |
Update internal option value.
To be used when the option file itself is updated