Qorus Integration Engine®  4.1.4.p4_git
OMQ::QorusClient Class Reference

This class implements static methods in the client API. More...

Inheritance diagram for OMQ::QorusClient:
OMQ::QorusClientAPI

Static Public Member Methods

static init (*bool ignore_warnings)
 the client initialization function where any errors cause an error message to be displayed and exit() is called More...
 
static synchronized init2 (*bool ignore_warnings)
 the main client initialization method; other functions call this one to initialize the client library More...
 
static synchronized initFast (*bool ignore_warnings)
 fast client initialization method; other functions call this one to initialize the client library More...
 
static hash< auto > parseOptions (string domain)
 option-parsing function: parses the option file More...
 
static hash< auto > parseOptions ()
 option-parsing function: parses the option file More...
 
static int configureInterfaces (hash< auto > config, *bool silent, bool exit_on_error=True)
 set config items in the server More...
 
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. More...
 
static createRole (string role, string base_role, string desc, string group, *bool silent)
 Creates the given role if the role does not exist. More...
 
static createUser (string user, string pass, softlist< string > roles, string desc, *bool silent)
 Creates the given user if the user does not exist. More...
 
static createUserConnection (string name, string desc, string url, *hash< auto > options, *bool silent)
 Creates a user connection if the connection does not exist. More...
 
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. More...
 
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. More...
 
static addDataProviderModuleOption (string mod)
 Adds the given module to the dataprovider-modules system option. More...
 
static addConnectionModuleOption (string mod)
 Adds the given module to the connection-modules system option. More...
 
static addModuleOption (string option, string mod)
 Adds the given module to the given module option. More...
 

Detailed Description

This class implements static methods in the client API.

Member Function Documentation

◆ addConnectionModuleOption()

static OMQ::QorusClient::addConnectionModuleOption ( string  mod)
static

Adds the given module to the connection-modules system option.

Parameters
modthe module name to add to the option value

If the options file is updated, then a backup is made and appropriate messages are output

Note
Qorus must be restarted for module option changes to take effect
Since
Qorus 4.1.1

◆ addDataProviderModuleOption()

static OMQ::QorusClient::addDataProviderModuleOption ( string  mod)
static

Adds the given module to the dataprovider-modules system option.

Parameters
modthe module name to add to the option value

If the options file is updated, then a backup is made and appropriate messages are output

Note
Qorus must be restarted for module option changes to take effect
Since
Qorus 4.1

◆ addModuleOption()

static OMQ::QorusClient::addModuleOption ( string  option,
string  mod 
)
static

Adds the given module to the given module option.

Parameters
optiona Qorus module option
modthe module name to add to the option value

If the options file is updated, then a backup is made and appropriate messages are output

Note
Qorus must be restarted for module option changes to take effect
Since
Qorus 4.1

◆ configureInterfaces()

static int OMQ::QorusClient::configureInterfaces ( hash< auto >  config,
*bool  silent,
bool  exit_on_error = True 
)
static

set config items in the server

Parameters
configa hash keyed by REST path to the object to be configured, values are hashes keyed by config item name; values are the config item values
silentif True no output will be printed to stdout
exit_on_errorif True and an error occurs, thread_exit Statements is called, otherwise -1 is returned
Returns
0 = OK, -1 = error occurred

◆ createGlobalError()

static OMQ::QorusClient::createGlobalError ( string  error,
string  desc,
string  status,
*int  retry_delay_secs,
*bool  silent 
)
static

Creates the given global error configuration if it does not already exist.

Note
  • Changes are made with REST API calls; if Qorus is down, no update is performed
  • If the global error already exists, no changes are made
Since
Qorus 4.1

◆ createOrUpdateWorkflowError()

static OMQ::QorusClient::createOrUpdateWorkflowError ( string  workflow,
string  error,
string  desc,
string  status,
*int  retry_delay_secs,
*bool  silent 
)
static

Aligns the given workflow error configuration according to the arguments.

Note
Updates are made with REST API calls; if Qorus is down, no update is performed
Since
Qorus 4.1

◆ createRole()

static OMQ::QorusClient::createRole ( string  role,
string  base_role,
string  desc,
string  group,
*bool  silent 
)
static

Creates the given role if the role does not exist.

Note
  • Changes are made with REST API calls; if Qorus is down, no action is performed
  • If the global error already exists, no changes are made
Since
Qorus 4.1

◆ createUser()

static OMQ::QorusClient::createUser ( string  user,
string  pass,
softlist< string roles,
string  desc,
*bool  silent 
)
static

Creates the given user if the user does not exist.

Note
  • Changes are made with REST API calls; if Qorus is down, no action is performed
  • If the global error already exists, no changes are made
Since
Qorus 4.1

◆ createUserConnection()

static OMQ::QorusClient::createUserConnection ( string  name,
string  desc,
string  url,
*hash< auto >  options,
*bool  silent 
)
static

Creates a user connection if the connection does not exist.

Note
  • Changes are made with REST API calls; if Qorus is down, no action is performed
  • If the global error already exists, no changes are made
Since
Qorus 4.1

◆ init()

static OMQ::QorusClient::init ( *bool  ignore_warnings)
static

the client initialization function where any errors cause an error message to be displayed and exit() is called

creates global objects; throws exceptions on errors

Parameters
ignore_warningsif True then warnings will be suppressed
See also

◆ init2()

static synchronized OMQ::QorusClient::init2 ( *bool  ignore_warnings)
static

the main client initialization method; other functions call this one to initialize the client library

creates global objects; throws exceptions on errors

Parameters
ignore_warningsif True then warnings will be suppressed
See also

◆ initFast()

static synchronized OMQ::QorusClient::initFast ( *bool  ignore_warnings)
static

fast client initialization method; other functions call this one to initialize the client library

creates global objects; throws exceptions on errors

does not initializes system datasources

Parameters
ignore_warningsif True then warnings will be suppressed
See also

◆ parseOptions() [1/2]

static hash<auto> OMQ::QorusClient::parseOptions ( string  domain)
static

option-parsing function: parses the option file

this function calls qorus_client_init() to ensure the client library is initialized

Returns
a hash of the options in the given domain

◆ parseOptions() [2/2]

static hash<auto> OMQ::QorusClient::parseOptions ( )
static

option-parsing function: parses the option file

Returns
a hash of hashes; the first level hash key represents the domain, the second level is the option=value within that option domain

◆ restGetCode()

static int OMQ::QorusClient::restGetCode ( string  uri_path,
bool  exit_if_down = True 
)
static

Sends a REST GET request to the Qorus server and returns the HTTP status code.

Parameters
uri_paththe URI path to send
exit_if_downif True and Qorus is down, thread_exit Statements is called, otherwise -1 is returned
Returns
the HTTP status code returned from the rest request or -1 if Qorus is down and exit_if_down is not True
Since
Qorus 4.1

The documentation for this class was generated from the following file: