94 namespace ConnectionProvider {
273 constructor(
string n_name,
string n_desc,
string n_url,
bool n_monitor, *
hash n_opts,
hash n_urlh, *
string n_safe_url);
292 hash<PingInfo>
ping(
bool throw_exception =
False);
307 hash<ConnectionInfo>
getInfo(
bool with_password =
False);
335 object get(
bool connect =
True, *
hash rtopts);
459 "http_version":
True,
460 "max_redirects":
True,
463 "connect_timeout":
True,
464 "ssl_cert_path":
True,
465 "ssl_key_password":
True,
466 "ssl_key_path":
True,
467 "ssl_verify_cert":
True,
473 "connect_timeout": 45s,
476 const OptionList =
Options.keys();
593 *
hash priv_try_get_connections(
string mod);
parseTextOptions()
this method is called when parsing connection file definitions from text files when loading into the ...
*hash getRuntimeOptions()
returns runtime options
string getType()
returns "http"
*hash< string, AbstractConnection > get_connections(*bool verbose)
returns all known connections as a hash keyed by connection identifier; values are AbstractConnection...
bool monitor
monitoring flag
Definition: ConnectionProvider.qm.dox.h:246
*hash opts
the options set on the connection
Definition: ConnectionProvider.qm.dox.h:117
base class for HTTP-based connections that need their URLs rewritten to create the real connection ob...
Definition: ConnectionProvider.qm.dox.h:382
date last_check
date/time of last check/ping
Definition: ConnectionProvider.qm.dox.h:237
hash< ConnectionInfo > getInfo(bool with_password=False)
returns a ConnectionInfo hash of information about the connection
constructor(string name, string desc, string url, bool monitor, *hash opts, hash n_urlh)
creates the FilesystemConnection object
*date last_check
the date/time value of the last connection check (or NOTHING if not checked)
Definition: ConnectionProvider.qm.dox.h:100
class for filesystem connections; returns an object of type Qore::Dir; this can be used to monitor fi...
Definition: ConnectionProvider.qm.dox.h:538
const Options
FilesystemConnection object connection options.
Definition: ConnectionProvider.qm.dox.h:543
string name
the connection name
Definition: ConnectionProvider.qm.dox.h:98
abstract object getImpl(bool connect=True, *hash rtopts)
this method must return the connection object corresponding to the object's configuration ...
constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
creates the FtpConnection object
*hash opts
connection options
Definition: ConnectionProvider.qm.dox.h:231
class for HTTP connections; returns Qore::HTTPClient objects
Definition: ConnectionProvider.qm.dox.h:453
string status
a string giving the connection's status
Definition: ConnectionProvider.qm.dox.h:104
static string getSafeUrl(hash urlh)
creates a "safe" URL string with password information removed
string info
a string giving the result of the ping ("OK" or an error message)
Definition: ConnectionProvider.qm.dox.h:128
static FilesystemConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
static constructor
string name
connection name
Definition: ConnectionProvider.qm.dox.h:216
*hash getDefaultOptions()
returns default options
string url
the full URL (including any username & password)
Definition: ConnectionProvider.qm.dox.h:116
string getType()
returns "dir"
AbstractConnection get_connection(string conn)
returns an AbstractConnection object if the identifier is known to a registered connection provider ...
*date updated
the date/time value of the update (or NOTHING if not updated)
Definition: ConnectionProvider.qm.dox.h:107
Dir getImpl(bool connect=True, *hash rtopts)
returns a Qore::Dir object
*hash getRuntimeOptions()
returns runtime options
bool up
a boolean vaue indicating the connection is known to be up (will be False if not checked) ...
Definition: ConnectionProvider.qm.dox.h:106
hash urlh
broken down URL hash (as returned by Qore::parse_url())
Definition: ConnectionProvider.qm.dox.h:234
static *code post_processing
optional code for default post-processing of objects created by getImpl(); must take the object creat...
Definition: ConnectionProvider.qm.dox.h:255
hash< PingInfo > ping(bool throw_exception=False)
returns a hash with the results of the ping operation
const OptionList
FilesystemConnection object connection option list.
Definition: ConnectionProvider.qm.dox.h:548
string status
status string; in case of a connection error this string will be the error string ...
Definition: ConnectionProvider.qm.dox.h:240
*hash orig_opts
original connection options
Definition: ConnectionProvider.qm.dox.h:228
static FtpConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
static constructor
abstract base class for connections
Definition: ConnectionProvider.qm.dox.h:211
*hash getOptions()
returns static / initialization options
string safe_url
"safe" URL (password information removed)
Definition: ConnectionProvider.qm.dox.h:225
Qore::HTTPClient getImpl(bool connect=True, *hash rtopts)
returns an Qore::HTTPClient object
static HttpConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
static constructor
ping response info as returned by AbstractConnection::ping()
Definition: ConnectionProvider.qm.dox.h:121
string name
the name of the connection
Definition: ConnectionProvider.qm.dox.h:114
FtpClient getImpl(bool connect=True, *hash rtopts)
returns an Qore::FtpClient object
constructor(string n_name, string n_desc, string n_url, bool n_monitor, *hash n_opts, hash n_urlh, *string n_safe_url)
creates the AbstractConnection object
object getImpl(bool connect=True, *hash rtopts)
throws an exception because the object is invalid
string type
the connection type
Definition: ConnectionProvider.qm.dox.h:105
string url
a safe version of the URL (without passwords)
Definition: ConnectionProvider.qm.dox.h:125
this class is used to mark invalid connections so they can be loaded and reported as invalid ...
Definition: ConnectionProvider.qm.dox.h:360
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition: ConnectionProvider.qm.dox.h:102
*hash getDefaultOptions()
returns default options
*hash opts
the options set on the connection
Definition: ConnectionProvider.qm.dox.h:124
config informaton as returned by AbstractConnection::getConfigHash()
Definition: ConnectionProvider.qm.dox.h:113
const DefaultOptions
HttpConnection default options.
Definition: ConnectionProvider.qm.dox.h:471
hash url_hash
a hash of URL information as returned by parse_url()
Definition: ConnectionProvider.qm.dox.h:109
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition: ConnectionProvider.qm.dox.h:101
abstract string getType()
returns the string type name for the connection object
*hash getRealOptions()
returns options for saving the connection's configuration information
constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
creates the HttpConnection object
string desc
the description
Definition: ConnectionProvider.qm.dox.h:115
date time
a relative date/time value giving the elapsed time of the ping operation
Definition: ConnectionProvider.qm.dox.h:127
*hash opts
the original options used to create the object
Definition: ConnectionProvider.qm.dox.h:103
hash< ConfigInfo > getConfigHash()
returns a ConfigInfo hash of static configuration information about the connection ...
string url
the URL for the connection including the password (if any present and the with_password argument is T...
Definition: ConnectionProvider.qm.dox.h:108
string desc
the description
Definition: ConnectionProvider.qm.dox.h:123
string desc
connection description
Definition: ConnectionProvider.qm.dox.h:219
date updated
date/time of last update
Definition: ConnectionProvider.qm.dox.h:249
string name
the name of the connection
Definition: ConnectionProvider.qm.dox.h:122
string get_connection_url(string str)
returns a URL string for the given identifier if the identifier is known to a registered connection p...
connection information hash as returned by AbstractConnection::getInfo()
Definition: ConnectionProvider.qm.dox.h:97
class for FTP connections; returns Qore::FtpClient objects
Definition: ConnectionProvider.qm.dox.h:399
bool up
connection status flag; set by monitoring or explicit pings/connections
Definition: ConnectionProvider.qm.dox.h:243
const Options
HttpConnection object connection options.
Definition: ConnectionProvider.qm.dox.h:458
bool ok
a boolean value giving the result of the ping
Definition: ConnectionProvider.qm.dox.h:126
*hash< string, hash< ConnectionInfo > > get_connection_hash(*bool verbose)
returns a hash of connection information keyed by connection identifier; values are ConnectionInfo ha...
*hash ping_info
an optional free-form hash giving additional info regarding ping operation or the remote system ...
Definition: ConnectionProvider.qm.dox.h:129
hash getOptions()
gets options
string url
connection URL (potentially with password info)
Definition: ConnectionProvider.qm.dox.h:222
constructor(string n_name, string n_desc, string n_url, *hash n_opts, string n_error, hash urlh)
creates the invalid connection object
string desc
the connection description
Definition: ConnectionProvider.qm.dox.h:99
hash< PingInfo > pingIntern(hash< PingInfo > rv)
performs the ping by executing get(); returns a PingInfo hash
hash getOptions()
gets options
bool loopback
set to True for loopback connections
Definition: ConnectionProvider.qm.dox.h:252
string getType()
returns "ftp"
string getType()
returns "invalid"