Qore ConnectionProvider Module Reference 1.9.1
Loading...
Searching...
No Matches
ConnectionProvider Namespace Reference

The ConnectionProvider namespace. More...

Classes

class  AbstractConnection
 abstract base class for connections More...
 
class  AbstractConnectionWithInfo
 abstract base class for connections More...
 
hashdecl  AllowedValueInfo
 Allowed value hash. More...
 
hashdecl  ConfigInfo
 config informaton More...
 
hashdecl  ConnectionConstructorInfo
 information that can be used to dynamically construct a connection object More...
 
hashdecl  ConnectionInfo
 connection information hash More...
 
hashdecl  ConnectionOptionInfo
 Connection option information. More...
 
class  ConnectionSchemeCache
 Connection provider type cache class. More...
 
hashdecl  ConnectionSchemeInfo
 Connection provider information. More...
 
class  FilesystemConnection
 class for filesystem connections; returns an object of type Qore::Dir More...
 
class  FtpConnection
 class for FTP connections; returns Qore::FtpClient objects More...
 
class  HttpBasedConnection
 base class for HTTP-based connections that need their URLs rewritten to create the real connection object More...
 
class  HttpConnection
 class for HTTP connections; returns Qore::HTTPClient objects More...
 
class  InvalidConnection
 this class is used to mark invalid connections so they can be loaded and reported as invalid More...
 
hashdecl  PingInfo
 ping response info More...
 
class  PollingConnectionMonitor
 Class for monitoring connection supporting the polling API. More...
 

Functions

AbstractConnection get_connection (string conn)
 returns an AbstractConnection object if the identifier is known to a registered connection provider More...
 
*hash< string, hash< ConnectionInfo > > get_connection_hash (*bool verbose)
 returns a hash of connection information keyed by connection identifier; values are ConnectionInfo hashes as returned by AbstractConnection::getInfo() (with passwords included) More...
 
string get_connection_url (string str)
 returns a URL string for the given identifier if the identifier is known to a registered connection provider or returns the URL itself if the identifier is a valid URL More...
 
*hash< string, AbstractConnectionget_connections (*bool verbose)
 returns all known connections as a hash keyed by connection identifier; values are AbstractConnection objects; NOTHING is returned if no connections are known More...
 

Detailed Description

The ConnectionProvider namespace.

the ConnectionProvider namespace. All classes used in the ConnectionProvider module should be inside this namespace

Contains all public definitions in the ConnectionProvider module.

All public declarations in the ConnectionProvider module are defined in this namespace

ConnectionSchemeCache.qc Copyright 2019 - 2023 Qore Technologies, s.r.o.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Function Documentation

◆ get_connection()

AbstractConnection ConnectionProvider::get_connection ( string  conn)

returns an AbstractConnection object if the identifier is known to a registered connection provider

Example:
string connstr = get_connection(str);
Parameters
connthe connection identifier
Returns
the connection object
Exceptions
CONNECTION-ERRORthe connection string cannot be matched as an external url identifier by a connection provider module
Note
connection provider modules are processed in the order they are declared with the QORE_CONNECTION_PROVIDERS environment variable; connection provider modules must be separated with PathSep characters
See also
Connection Provider Modules

◆ get_connection_hash()

*hash< string, hash< ConnectionInfo > > ConnectionProvider::get_connection_hash ( *bool  verbose)

returns a hash of connection information keyed by connection identifier; values are ConnectionInfo hashes as returned by AbstractConnection::getInfo() (with passwords included)

Example:
*hash<string, hash<ConnectionInfo>> h = get_connection_hash();
Parameters
verbosedisplay connection provider module errors on stdout (otherwise errors are silently ignored)
Returns
a hash keyed by connection identifier; values are ConnectionInfo hashes as returned by AbstractConnection::getInfo() (with passwords included); NOTHING is returned if no connections are known
Note
connection provider modules are processed in the order they are declared with the QORE_CONNECTION_PROVIDERS environment variable; connection provider modules must be separated with PathSep characters
See also

◆ get_connection_url()

string ConnectionProvider::get_connection_url ( string  str)

returns a URL string for the given identifier if the identifier is known to a registered connection provider or returns the URL itself if the identifier is a valid URL

Example:
string connstr = get_connection_url(str);
Parameters
strthe connection identifier or a valid URL connection string (a URL string is considered valid for this function if it begins with a scheme and has at least one character after the scheme; ex: "scheme://x..."
Returns
the URL string corresponding to the connection identifier, or, in case the argument is a valid URL string, returns the argument itself
Exceptions
CONNECTION-ERRORthe connection string cannot be matched as an external url identifier by a connection provider module and there is no scheme (i.e. protocol) specification in the string followed by at least one character (ex: "scheme://x...")
Note
connection provider modules are processed in the order they are declared with the QORE_CONNECTION_PROVIDERS environment variable; connection provider modules must be separated with PathSep characters
See also
Connection Provider Modules

◆ get_connections()

*hash< string, AbstractConnection > ConnectionProvider::get_connections ( *bool  verbose)

returns all known connections as a hash keyed by connection identifier; values are AbstractConnection objects; NOTHING is returned if no connections are known

Example:
*hash<string, AbstractConnection> h = get_connections();
Parameters
verbosedisplay connection provider module errors on stdout (otherwise errors are ignored)
Returns
a hash keyed by connection identifier; values are AbstractConnection objects; NOTHING is returned if no connections are known
Note
connection provider modules are processed in the order they are declared with the QORE_CONNECTION_PROVIDERS environment variable; connection provider modules must be separated with PathSep characters
See also