| Qore ConnectionProvider Module Reference 2.0.1

Loading...
Searching...
No Matches
HttpConnection.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
2// Qore HttpConnection class definition
3
4/* HttpConnection.qc Copyright 2016 - 2024 Qore Technologies, s.r.o.
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23*/
24
25
27
29 namespace ConnectionProvider {
31
59 class HttpConnection : public AbstractConnectionWithInfo {
60
61 public:
63 const ConnectionScheme = ...;
64
65
67 const Options = map {$1: True}, keys ConnectionScheme.options;
68
70
80 constructor(string name, string desc, string url, hash<auto> attributes = {}, hash<auto> options = {}, *Logger logger) ;
81
82
84
101 constructor(hash<auto> config, *hash<auto> attr) ;
102
103
105 string getType();
106
107
109
115 DataProvider::AbstractDataProvider getDataProvider(*hash<auto> constructor_options);
116
117
119
123 bool hasDataProvider();
124
125
127
131 bool supportsPollingApi();
132
133
135
142 Qore::AbstractPollOperation startPollConnect(*Logger::LoggerInterface logger);
143
144
146 *hash<auto> getConnectionOptions(*hash<auto> rtopts);
147
148
150 protected:
151 setChildCapabilities();
152 public:
153
154
156
159 protected:
160 Qore::HTTPClient getImpl(bool connect = True, *hash<auto> rtopts);
161 public:
162
163
165 protected:
166 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
167 public:
168
169};
170}; // ConnectionProvider namespace
ConnectionProvider::AbstractConnection::desc
string desc
Connection description with markdown formatting.
Definition AbstractConnection.qc.dox.h:82
ConnectionProvider::AbstractConnection::url
string url
Connection URL (potentially with password info)
Definition AbstractConnection.qc.dox.h:85
ConnectionProvider::AbstractConnection::name
string name
Connection name.
Definition AbstractConnection.qc.dox.h:73
ConnectionProvider::AbstractConnectionWithInfo
abstract base class for connections
Definition AbstractConnectionWithInfo.qc.dox.h:32
ConnectionProvider::HttpConnection
class for HTTP connections; returns Qore::HTTPClient objects
Definition HttpConnection.qc.dox.h:59
ConnectionProvider::HttpConnection::hasDataProvider
bool hasDataProvider()
Returns True, as the connection returns a data provider with the getDataProvider() method.
ConnectionProvider::HttpConnection::ConnectionScheme
const ConnectionScheme
Connection entry info.
Definition HttpConnection.qc.dox.h:63
ConnectionProvider::HttpConnection::getImpl
Qore::HTTPClient getImpl(bool connect=True, *hash< auto > rtopts)
returns an Qore::HTTPClient object
ConnectionProvider::HttpConnection::getConnectionSchemeInfoImpl
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
ConnectionProvider::HttpConnection::getType
string getType()
Returns "http".
ConnectionProvider::HttpConnection::Options
const Options
HttpConnection object connection options.
Definition HttpConnection.qc.dox.h:67
ConnectionProvider::HttpConnection::startPollConnect
Qore::AbstractPollOperation startPollConnect(*Logger::LoggerInterface logger)
Called to start the connection if the connection supports the polling API.
ConnectionProvider::HttpConnection::constructor
constructor(hash< auto > config, *hash< auto > attr)
Creates the HttpConnection object.
ConnectionProvider::HttpConnection::supportsPollingApi
bool supportsPollingApi()
returns True, since this connection type supports the Qore Socket-based polling API
ConnectionProvider::HttpConnection::getDataProvider
DataProvider::AbstractDataProvider getDataProvider(*hash< auto > constructor_options)
Returns an HttpDataProvider object for this connection.
ConnectionProvider::HttpConnection::setChildCapabilities
setChildCapabilities()
Sets child data provider capabilities.
ConnectionProvider::HttpConnection::constructor
constructor(string name, string desc, string url, hash< auto > attributes={}, hash< auto > options={}, *Logger logger)
Creates the HttpConnection object.
ConnectionProvider::HttpConnection::getConnectionOptions
*hash< auto > getConnectionOptions(*hash< auto > rtopts)
Returns options for creating a new connection.
Qore::AbstractPollOperation
Qore::HTTPClient
ConnectionProvider
The ConnectionProvider namespace.
Definition AbstractConnection.qc.dox.h:28