Loading...
Searching...
No Matches
ServerSentEventClientDataProviderBase.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
/* ServerSentEventClientDataProviderBase.qc Copyright 2025 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.
*/
namespace ServerSentEventClient {
class ServerSentEventClientDataProviderBase : public DataProvider::AbstractDataProvider {
public:
const ProviderInfo = ...;
const ConstructorOptions = ...;
const RequiredConstructorOptions = "url|sseclient";
const ApiClasses = ...;
protected:
ServerSentEventClient client;
Mutex m();
ServerSentEventClientWaitForMessageDataProvider child;
QueuedObserver queued_observer;
public:
constructor(*hash<auto> options);
destructor();
string getName();
setLogger(*LoggerInterface logger);
register(ServerSentEventClientWaitForMessageDataProvider child);
deregister();
Queue getQueue();
registerObserver(object observer, ...);
bool deregisterObserver(object observer);
observersReady();
bool isConnected();
reconnect();
protected:
*hash<DataProviderConnectionInfo> getConnectionInfoImpl();
public:
protected:
*list<string> getChildProviderNamesImpl();
public:
protected:
*AbstractDataProvider getChildProviderImpl(string name);
public:
protected:
hash<string, hash<DataProviderMessageInfo>> getEventTypesImpl();
public:
static hash<auto> getOptionsFromTemplate(hash<auto> template_options, *hash<auto> options);
};
};
ServerSentEventClient::ServerSentEventClientDataProviderBase
Event-based data provider for ServerSentEvent client-side events.
Definition ServerSentEventClientDataProviderBase.qc.dox.h:30
ServerSentEventClient::ServerSentEventClientDataProviderBase::deregister
deregister()
Dergister a child data provider.
ServerSentEventClient::ServerSentEventClientDataProviderBase::getOptionsFromTemplate
static hash< auto > getOptionsFromTemplate(hash< auto > template_options, *hash< auto > options)
Returns options from a template.
ServerSentEventClient::ServerSentEventClientDataProviderBase::RequiredConstructorOptions
const RequiredConstructorOptions
Required constructor option combinations.
Definition ServerSentEventClientDataProviderBase.qc.dox.h:42
ServerSentEventClient::ServerSentEventClientDataProviderBase::setLogger
setLogger(*LoggerInterface logger)
Accepts a LoggerInterface object for logging (or clears it)
ServerSentEventClient::ServerSentEventClientDataProviderBase::ApiClasses
const ApiClasses
Registered API classes.
Definition ServerSentEventClientDataProviderBase.qc.dox.h:45
ServerSentEventClient::ServerSentEventClientDataProviderBase::ConstructorOptions
const ConstructorOptions
Constructor options.
Definition ServerSentEventClientDataProviderBase.qc.dox.h:38
ServerSentEventClient::ServerSentEventClientDataProviderBase::getEventTypesImpl
hash< string, hash< DataProviderMessageInfo > > getEventTypesImpl()
Returns a hash of all supported event types.
ServerSentEventClient::ServerSentEventClientDataProviderBase::queued_observer
QueuedObserver queued_observer
Queued observer.
Definition ServerSentEventClientDataProviderBase.qc.dox.h:59
ServerSentEventClient::ServerSentEventClientDataProviderBase::getConnectionInfoImpl
*hash< DataProviderConnectionInfo > getConnectionInfoImpl()
Returns connection info.
ServerSentEventClient::ServerSentEventClientDataProviderBase::observersReady
observersReady()
Called when all observers have been added to the object.
ServerSentEventClient::ServerSentEventClientDataProviderBase::child
ServerSentEventClientWaitForMessageDataProvider child
Wait for message API data provider.
Definition ServerSentEventClientDataProviderBase.qc.dox.h:56
ServerSentEventClient::ServerSentEventClientDataProviderBase::deregisterObserver
bool deregisterObserver(object observer)
The method deregisters the given observer.
ServerSentEventClient::ServerSentEventClientDataProviderBase::registerObserver
registerObserver(object observer,...)
The method registers the given observer.
ServerSentEventClient::ServerSentEventClientDataProviderBase::isConnected
bool isConnected()
Returns True if the object is currently connected.
ServerSentEventClient::ServerSentEventClientDataProviderBase::m
Mutex m()
Mutex for wait for message child data provider handling.
ServerSentEventClient::ServerSentEventClientDataProviderBase::ProviderInfo
const ProviderInfo
Provider info.
Definition ServerSentEventClientDataProviderBase.qc.dox.h:34
ServerSentEventClient::ServerSentEventClientDataProviderBase::getChildProviderNamesImpl
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names.
ServerSentEventClient::ServerSentEventClientDataProviderBase::getChildProviderImpl
*AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or nothing if the given child is unknown.
ServerSentEventClient::ServerSentEventClientDataProviderBase::client
ServerSentEventClient client
The SSE client itself.
Definition ServerSentEventClientDataProviderBase.qc.dox.h:50
ServerSentEventClient::ServerSentEventClientDataProviderBase::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
ServerSentEventClient::ServerSentEventClientDataProviderBase::getQueue
Queue getQueue()
Returs the child message queue.
ServerSentEventClient::ServerSentEventClientDataProviderBase::reconnect
reconnect()
Initiate a reconnect action on the client.
ServerSentEventClient::ServerSentEventClientWaitForMessageDataProvider
ServerSentEvent client wait for message from server API data provider.
Definition ServerSentEventClientWaitForMessageDataProvider.qc.dox.h:28
ServerSentEventClient
the ServerSentEventClient namespace contains all the definitions in the ServerSentEventClient module
Definition ServerSentEventClient.qc.dox.h:26