BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions | Protected Member Functions
BeeeOn::GWSConnector Class Referenceabstract

GWSConnector is an abstract class that defines an API for communication with a remote server. It keeps the connection alive and allows to send and receive messages. More...

#include <GWSConnector.h>

Inheritance diagram for BeeeOn::GWSConnector:
BeeeOn::AbstractGWSConnector BeeeOn::GWSConnectorImpl

Public Types

typedef Poco::SharedPtr
< GWSConnector
Ptr
 

Public Member Functions

virtual void send (const GWMessage::Ptr message)=0
 Send the given message to the remote server. The actual sending operation might be delayed and thus the result of this call might be just appending the message into an output queue.
 
void addListener (GWSListener::Ptr listener)
 Register a GWSListener instance that would receive events related to the communication.
 
void clearListeners ()
 Remove all registered listeners.
 
void setEventsExecutor (AsyncExecutor::Ptr executor)
 Configure an AsyncExecutor instance that would be used for GWSListener events delivery.
 

Protected Member Functions

template<typename Event , typename Method >
void fireEvent (const Event &e, const Method &m)
 
void fireReceived (const GWMessage::Ptr message)
 

Detailed Description

GWSConnector is an abstract class that defines an API for communication with a remote server. It keeps the connection alive and allows to send and receive messages.

All received messages and other events are reported via the GWSListener interface. Sending is done by the provided method GWSConnector::send().


The documentation for this class was generated from the following files: