Qore ServerSentEventClient Module Reference 1.0
Loading...
Searching...
No Matches
ServerSentEventClientDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
4/* ServerSentEventClientDataProvider.qc Copyright 2025 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
26namespace ServerSentEventClient {
28
32class ServerSentEventClientDataProvider : public ServerSentEventClientDataProviderBase, public DataProvider::DelayedObservable {
33
34public:
36 const ProviderInfo = ...;
37
38
40 const ExampleTimeout = 10s;
41
43 constructor(*hash<auto> options) ;
44
45
47 constructor(hash<auto> template_options, *hash<auto> options) ;
48
49
50protected:
51 hash<DataProviderInfo> getStaticInfoImpl();
52public:
53
54
56
65protected:
66 auto getExampleEventDataImpl(string event_id);
67public:
68
69};
70};
71
72namespace Priv {
73class ExampleObserver : public Observer {
74
75public:
76protected:
77 Queue q();
78
79public:
80
81 *hash<SseMessageInfo> waitMessage(*timeout to);
82
83
84 update(string event_id, hash<auto> data_);
85
86};
87};
Event-based data provider for ServerSentEvent client-side events.
Definition ServerSentEventClientDataProviderBase.qc.dox.h:30
Event-based data provider for ServerSentEvent messaging.
Definition ServerSentEventClientDataProvider.qc.dox.h:32
constructor(hash< auto > template_options, *hash< auto > options)
Creates the object from constructor + template options.
constructor(*hash< auto > options)
Creates the object from constructor options.
const ExampleTimeout
Max time to wait for example data.
Definition ServerSentEventClientDataProvider.qc.dox.h:40
const ProviderInfo
Provider info.
Definition ServerSentEventClientDataProvider.qc.dox.h:36
auto getExampleEventDataImpl(string event_id)
Returns example data for the given observable event.
the ServerSentEventClient namespace contains all the definitions in the ServerSentEventClient module
Definition ServerSentEventClient.qc.dox.h:26