| Qore ServerSentEventClient Module Reference 1.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ServerSentEventClient::ServerSentEventClientDataProviderBase Class Reference

Event-based data provider for ServerSentEvent client-side events. More...

`#include <ServerSentEventClientDataProviderBase.qc.dox.h>`

Inheritance diagram for ServerSentEventClient::ServerSentEventClientDataProviderBase:
[legend]

## Public Member Functions
| constructor (*hash< auto > options)
| Creates the object from constructor options.
| deregister ()
| Dergister a child data provider.
bool | deregisterObserver (object observer)
| The method deregisters the given observer.
Queue | getQueue ()
| Returs the child message queue.
bool | isConnected ()
| Returns True if the object is currently connected.
| observersReady ()
| Called when all observers have been added to the object.
| reconnect ()
| Initiate a reconnect action on the client.
| register (ServerSentEventClientWaitForMessageDataProvider child)
| Regstiger a child data provider.
| registerObserver (object observer,...)
| The method registers the given observer.
| setLogger (*LoggerInterface logger)
| Accepts a LoggerInterface object for logging (or clears it)

## Static Public Member Functions
static hash< auto > | getOptionsFromTemplate (hash< auto > template_options, *hash< auto > options)
| Returns options from a template.

## Public Attributes
const | ApiClasses = ...
| Registered API classes.
const | ConstructorOptions = ...
| Constructor options.
const | ProviderInfo = ...
| Provider info.
const | RequiredConstructorOptions = "url|sseclient"
| Required constructor option combinations.

## Protected Member Functions
*AbstractDataProvider | getChildProviderImpl (string name)
| Returns the given child provider or NOTHING if the given child is unknown.
*list< string > | getChildProviderNamesImpl ()
| Returns a list of child data provider names.
*hash< DataProviderConnectionInfo > | getConnectionInfoImpl ()
| Returns connection info.
hash< string, hash< DataProviderMessageInfo > > | getEventTypesImpl ()
| Returns a hash of all supported event types.
Mutex | m ()
| Mutex for wait for message child data provider handling.

## Protected Attributes
ServerSentEventClientWaitForMessageDataProvider | child
| Wait for message API data provider.
ServerSentEventClient | client
| The SSE client itself.
QueuedObserver | queued_observer
| Queued observer.

## Detailed Description

Event-based data provider for ServerSentEvent client-side events.

## Member Function Documentation

## ◆ deregisterObserver()

bool ServerSentEventClient::ServerSentEventClientDataProviderBase::deregisterObserver | ( | object | observer | ) |

The method deregisters the given observer.

Parameters

  observer | the observer to be deregistered

Returns
  True if found otherwise False

## ◆ getChildProviderImpl()

*AbstractDataProvider ServerSentEventClient::ServerSentEventClientDataProviderBase::getChildProviderImpl | ( | string | name | ) |
| protected

Returns the given child provider or NOTHING if the given child is unknown.

Returns
  the given child provider or NOTHING if the given child is unknown

Exceptions

  CHILD-PROVIDER-ERROR | error acquiring child provider

See also
  getChildProviderEx()

## ◆ getChildProviderNamesImpl()

*list< string > ServerSentEventClient::ServerSentEventClientDataProviderBase::getChildProviderNamesImpl | ( |  | ) |
| protected

Returns a list of child data provider names.

Returns
  a list of child data provider names

## ◆ getConnectionInfoImpl()

*hash< DataProviderConnectionInfo > ServerSentEventClient::ServerSentEventClientDataProviderBase::getConnectionInfoImpl | ( |  | ) |
| protected

Returns connection info.

Returns
  the connection hash; see ServerSentEventClient::getConnectionInfo() for information about the `info` key

Since
  DataProvider 3.0

## ◆ getEventTypesImpl()

hash< string, hash< DataProviderMessageInfo > > ServerSentEventClient::ServerSentEventClientDataProviderBase::getEventTypesImpl | ( |  | ) |
| protected

Returns a hash of all supported event types.

Returns
  a hash of all supported event types

Note
  only called if the provider supports the observer pattern / event API

## ◆ observersReady()

ServerSentEventClient::ServerSentEventClientDataProviderBase::observersReady | ( |  | ) |

Called when all observers have been added to the object.

This method is meant to trigger event generation