Qore ConnectionProvider Module Reference 1.9.1
Loading...
Searching...
No Matches
ConnectionSchemeCache.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
27namespace ConnectionProvider {
29public hashdecl AllowedValueInfo {
31 auto value;
32
34 string desc;
35};
36
38public hashdecl ConnectionOptionInfo {
40 string type;
41
43 string desc;
44
46 bool sensitive = False;
47
49 *softlist<hash<AllowedValueInfo>> allowed_values;
50
53
55 bool subst_env_vars = False;
56
58 bool freeform = False;
59};
60
62public hashdecl ConnectionSchemeInfo {
64 Class cls;
65
67 *hash<string, hash<ConnectionOptionInfo>> options;
68
70
76};
77
80
81public:
83 const SchemeMap = {
84 "rest": "RestClient",
85 "rests": "RestClient",
86
87 "billwerkrest": "BillwerkRestClient",
88 "billwerkrests": "BillwerkRestClient",
89
90 "sewiorest": "SewioRestClient",
91 "sewiorests": "SewioRestClient",
92
93 "sfrests": "SalesforceRestClient",
94
95 "sap4hanarests": "Sap4HanaRestClient",
96
97 "awsrests": "AwsRestClient",
98
99 "cdsrests": "CdsRestClient",
100
101 "zeyosrest": "ZeyosRestClient",
102 "zeyosrests": "ZeyosRestClient",
103
104 "smtp": "SmtpClient",
105 "smtps": "SmtpClient",
106 "smtptls": "SmtpClient",
107 "esmtp": "SmtpClient",
108 "esmtps": "SmtpClient",
109 "esmtptls": "SmtpClient",
110
111 "pop3": "Pop3Client",
112 "pop3s": "Pop3Client",
113
114 "telnet": "TelnetClient",
115
116 "ws": "WebSocketClient",
117 "wss": "WebSocketClient",
118
119 "sewiows": "SewioWebSocketClient",
120 "sewiowss": "SewioWebSocketClient",
121
122 "soap": "SoapClient",
123 "soaps": "SoapClient",
124
125 "sfsoap": "SalesforceSoapClient",
126 "sfsoaps": "SalesforceSoapClient",
127
128 "sftp": "Ssh2Connections",
129
130 "snrests": "ServiceNowRestClient",
131
132 "ssh": "Ssh2Connections",
133
134 "jsonrpc": "JsonRpcClient",
135 "jsonrpcs": "JsonRpcClient",
136
137 "xmlrpc": "XmlRpcClient",
138 "xmlrpcs": "XmlRpcClient",
139
140 "yamlrpc": "YamlRpcClient",
141 "yamlrpcs": "YamlRpcClient",
142 };
143
144protected:
146 static hash<string, hash<ConnectionSchemeInfo>> cache = {
149
152
155 };
156
158 static Mutex lck();
159
160public:
161
163
169 static bool registerScheme(string scheme, hash<ConnectionSchemeInfo> entry);
170
172 static hash<string, hash<ConnectionSchemeInfo>> get();
173
175 static int size();
176
178 static bool empty();
179
181
183 static *list<string> listSchemes();
184
186
191 static *hash<ConnectionSchemeInfo> getScheme(string scheme);
192
194
200 static hash<ConnectionSchemeInfo> getSchemeEx(string scheme);
201
203
214 static *hash<ConnectionSchemeInfo> getSchemeImpl(string scheme, bool throw_exception, *code scheme_loader);
215
217protected:
218 static bool tryLoadModule(string mod, bool throw_exception);
219public:
220
221};
222};
Connection provider type cache class.
Definition: ConnectionSchemeCache.qc.dox.h:79
static *list< string > listSchemes()
Returns a list of all cached schemes.
static *hash< ConnectionSchemeInfo > getScheme(string scheme)
Returns info for the given connection scheme or NOTHING if not present.
static bool tryLoadModule(string mod, bool throw_exception)
Try to load the given module.
static *hash< ConnectionSchemeInfo > getSchemeImpl(string scheme, bool throw_exception, *code scheme_loader)
Returns info for the given connection scheme; either throws an exception if not present or returns NO...
static hash< ConnectionSchemeInfo > getSchemeEx(string scheme)
Returns info for the given connection scheme or throws an exception if not present.
const SchemeMap
Map of known connection schemes to modules.
Definition: ConnectionSchemeCache.qc.dox.h:83
static hash< string, hash< ConnectionSchemeInfo > > get()
Returns the entire cache.
static hash< string, hash< ConnectionSchemeInfo > > cache
Connection provider cache.
Definition: ConnectionSchemeCache.qc.dox.h:146
static bool registerScheme(string scheme, hash< ConnectionSchemeInfo > entry)
Register a new connection provider in the cache.
static int size()
Returns the number of types in the cache.
static bool empty()
Returns True if the cache is empty, False if not.
static Mutex lck()
Connection provider cache lock.
const ConnectionScheme
Connection entry info.
Definition: FilesystemConnection.qc.dox.h:40
const ConnectionScheme
Connection entry info.
Definition: FtpConnection.qc.dox.h:37
const ConnectionScheme
Connection entry info.
Definition: HttpConnection.qc.dox.h:59
The ConnectionProvider namespace.
Definition: AbstractConnection.qc.dox.h:28
Allowed value hash.
Definition: ConnectionSchemeCache.qc.dox.h:29
string desc
Description for the value.
Definition: ConnectionSchemeCache.qc.dox.h:34
auto value
The value.
Definition: ConnectionSchemeCache.qc.dox.h:31
Connection option information.
Definition: ConnectionSchemeCache.qc.dox.h:38
bool subst_env_vars
Do environment variable substitution on the value?
Definition: ConnectionSchemeCache.qc.dox.h:55
auto default_value
Any default value.
Definition: ConnectionSchemeCache.qc.dox.h:52
string type
Option value type.
Definition: ConnectionSchemeCache.qc.dox.h:40
string desc
Description.
Definition: ConnectionSchemeCache.qc.dox.h:43
*softlist< hash< AllowedValueInfo > > allowed_values
List of allowed values (enum)
Definition: ConnectionSchemeCache.qc.dox.h:49
bool freeform
Modifier for the "file-as-string" type; can a freeform location option be returned?
Definition: ConnectionSchemeCache.qc.dox.h:58
bool sensitive
Is the value sensitive? (password or other authentication info)
Definition: ConnectionSchemeCache.qc.dox.h:46
Connection provider information.
Definition: ConnectionSchemeCache.qc.dox.h:62
*string required_options
Required option string.
Definition: ConnectionSchemeCache.qc.dox.h:75
*hash< string, hash< ConnectionOptionInfo > > options
Connection options: name -> option info.
Definition: ConnectionSchemeCache.qc.dox.h:67
Class cls
The connection class.
Definition: ConnectionSchemeCache.qc.dox.h:64