103 constructor(
string n_name,
string n_desc,
string n_url,
bool n_monitor, *
hash n_opts,
hash n_urlh, *
string n_safe_url, *
bool n_enabled);
124 constructor(
string name,
string description,
string url, hash<auto> attributes = {}, hash<auto> options = {});
132 hash<PingInfo>
ping(
bool throw_exception =
False);
148 hash<ConnectionInfo>
getInfo(
bool with_password =
False);
197 object get(
bool connect =
True, *hash<auto> rtopts);
313 abstract object getImpl(
bool connect =
True, *hash<auto> rtopts);
parseTextOptions()
this method is called when parsing connection file definitions from text files when loading into the ...
auto getTag(string tag)
returns the value of the given tag or NOTHING if not present
bool monitor
monitoring flag
Definition: AbstractConnection.qc.dox.h:66
hash< auto > getExtendedInfo(*hash< auto > opts)
Returns connection info plus any extended information returned by the connection. ...
hash< auto > internal_info
internal tags
Definition: AbstractConnection.qc.dox.h:90
date last_check
date/time of last check/ping
Definition: AbstractConnection.qc.dox.h:57
bool locked
locked/unlocked flag
Definition: AbstractConnection.qc.dox.h:81
hash< ConnectionInfo > getInfo(bool with_password=False)
returns a ConnectionInfo hash of information about the connection
string getSafeUrl(hash< auto > urlh)
creates a "safe" URL string with password information removed
*hash< auto > getOptions()
returns static / initialization options
deprecated constructor(string n_name, string n_desc, string n_url, bool n_monitor, *hash n_opts, hash n_urlh, *string n_safe_url, *bool n_enabled)
creates the AbstractConnection object
string name
connection name
Definition: AbstractConnection.qc.dox.h:36
hash< auto > urlh
broken down URL hash (as returned by Qore::parse_url())
Definition: AbstractConnection.qc.dox.h:54
hash< ConnectionSchemeInfo > getConnectionSchemeInfo()
Returns a default ConnectionSchemeInfo hash.
*hash< auto > opts
connection options
Definition: AbstractConnection.qc.dox.h:51
static *code post_processing
optional code for default post-processing of objects created by getImpl(); must take the connection o...
Definition: AbstractConnection.qc.dox.h:75
hash< PingInfo > ping(bool throw_exception=False)
returns a hash with the results of the ping operation
string status
status string; in case of a connection error this string will be the error string ...
Definition: AbstractConnection.qc.dox.h:60
hash< auto > tags
connection tags; user-defined key-value pairs
Definition: AbstractConnection.qc.dox.h:87
bool hasDataProvider()
returns True if the connection returns a data provider with the getDataProvider() method ...
abstract base class for connections
Definition: AbstractConnection.qc.dox.h:32
AbstractDataProvider getDataProvider()
returns a data provider object for this connection, if supported
string safe_url
"safe" URL (password information removed)
Definition: AbstractConnection.qc.dox.h:45
*hash< auto > getRealOptions()
returns options for saving the connection's configuration information
bool enabled
enabled/disabled indicator flag
Definition: AbstractConnection.qc.dox.h:78
auto getTagEx(string tag)
returns the value of the given tag or throws an exception if the tag is not set with a value ...
constructorInit(string name, string description, string url, hash< auto > attributes, hash< auto > options)
Common construtor implementation.
abstract object getImpl(bool connect=True, *hash< auto > rtopts)
this method must return the connection object corresponding to the object's configuration ...
abstract string getType()
returns the string type name for the connection object
hash< ConfigInfo > getConfigHash()
returns a ConfigInfo hash of static configuration information about the connection ...
hash< auto > getTags()
returns all tags associated with the connection
string desc
connection description
Definition: AbstractConnection.qc.dox.h:39
hash< auto > hash(object obj)
date updated
date/time of last update
Definition: AbstractConnection.qc.dox.h:69
hash< auto > validateOptions(hash< auto > options)
performs options validation in the constructor
hash< UrlInfo > parseUrl(string url)
Parse the URL to a hash.
bool up
connection status flag; set by monitoring or explicit pings/connections
Definition: AbstractConnection.qc.dox.h:63
*hash< auto > getRuntimeOptions()
returns runtime options
string url
connection URL (potentially with password info)
Definition: AbstractConnection.qc.dox.h:42
bool debug_data
debug data flag; to be used an an indication for a higher-level implementation
Definition: AbstractConnection.qc.dox.h:84
*hash< auto > orig_opts
original connection options
Definition: AbstractConnection.qc.dox.h:48
hash< PingInfo > pingIntern(hash< PingInfo > rv)
performs the ping by executing get(); returns a PingInfo hash
bool loopback
set to True for loopback connections
Definition: AbstractConnection.qc.dox.h:72
the ConnectionProvider namespace. All classes used in the ConnectionProvider module should be inside ...
Definition: AbstractConnection.qc.dox.h:26
*hash< auto > getDefaultOptions()
returns default options