SmartSoft Component-Developer API
|
Server part of the Push pattern to provide a push service. More...
#include <smartIPushServerPattern_T.h>
Public Member Functions | |
IPushServerPattern (IComponent *component, const std::string &serviceName) | |
Default Constructor. More... | |
virtual | ~IPushServerPattern ()=default |
Destructor. More... | |
virtual StatusCode | put (const DataType &d)=0 |
Provide new data which is sent to all subscribed clients taking into account their individual prescale factors. More... | |
Public Member Functions inherited from Smart::IServerPattern | |
IServerPattern (IComponent *component, const std::string &serviceName) | |
Constructor. More... | |
virtual | ~IServerPattern () |
Destructor. More... | |
Public Member Functions inherited from Smart::ICommunicationPattern | |
ICommunicationPattern (IComponent *component) | |
Default Constructor initializing an IShutdownObserver. More... | |
virtual | ~ICommunicationPattern ()=default |
Default Destructor. More... | |
Public Member Functions inherited from Smart::IShutdownObserver | |
IShutdownObserver (ShutdownSubject *subject=nullptr) | |
The default constructor. More... | |
virtual | ~IShutdownObserver () |
The default destructor. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Smart::IServerPattern | |
bool | is_shutting_down () const |
virtual void | on_shutdown () |
implements individual shutdown strategy. More... | |
virtual void | serverInitiatedDisconnect ()=0 |
implements server-initiated-disconnect (SID) More... | |
Protected Member Functions inherited from Smart::ICommunicationPattern | |
ICommunicationPattern (const ICommunicationPattern &)=delete | |
ICommunicationPattern & | operator= (const ICommunicationPattern &)=delete |
ICommunicationPattern ()=delete | |
Protected Member Functions inherited from Smart::IShutdownObserver | |
void | attach_self_to (ShutdownSubject *subject) |
call this method from within the constructor of derived classes More... | |
void | detach_self_from (ShutdownSubject *subject) |
this method is called within the destructor More... | |
Protected Attributes inherited from Smart::IServerPattern | |
std::string | serviceName |
the current serviceName (can be used in derived classes) More... | |
Protected Attributes inherited from Smart::ICommunicationPattern | |
IComponent * | icomponent |
the internal pointer to the component (can be accessed in derived classes) More... | |
Server part of the Push pattern to provide a push service.
New data is provided to the server by the put() method. It immediately distributes the new data to all at that point subscribed clients taking into account their individual prescale factors (see IPushClientPattern).
Template parameters
|
inline |
Default Constructor.
The default constructor should initialize all internal server resources such that the put() method can be used.
component | management class of the component |
serviceName | name of the service |
|
virtualdefault |
Destructor.
Properly disconnects all service requestors in case of destruction such that all connected and subscribed clients are unsubscribed and disconnected properly.
|
pure virtual |
Provide new data which is sent to all subscribed clients taking into account their individual prescale factors.
Prescale factors are always whole-numbered multiples of the server update intervals.
(Individual update interval counters are incremented each time this member function is called irrespectively of the elapsed time. One should use the time triggered handler to call the put() member function with the appropriate timing.)
d | contains the newly acquired data to be sent as update. |