SmartSoft Component-Developer API
|
Server part of the one-way, n->1 Send communication pattern. More...
#include <smartISendServerPattern_T.h>
Public Types | |
using | ISendServerHandlerPtr = std::shared_ptr< Smart::ISendServerHandler< DataType > > |
Public Member Functions | |
ISendServerPattern (IComponent *component, const std::string &service, ISendServerHandlerPtr handler=nullptr) | |
Default constructor. More... | |
virtual | ~ISendServerPattern ()=default |
Destructor. 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... | |
Public Member Functions inherited from Smart::InputSubject< DataType > | |
virtual | ~InputSubject ()=default |
Default destructor. More... | |
Protected Member Functions | |
void | handleSend (const DataType &data) |
please call this method in derived classes from within the middleware-specific data handler More... | |
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 Member Functions inherited from Smart::InputSubject< DataType > | |
virtual void | attach (IInputHandler< DataType > *handler, const unsigned int &prescaleFactor=1) |
Attach an IInputHandler<InputType> instance. More... | |
virtual void | detach (IInputHandler< DataType > *handler) |
Detach an IInputHandler<InputType> instance. More... | |
virtual bool | notify_input (const DataType &input) |
Notifies all attached IInputHandler instances about incoming data. More... | |
Additional Inherited Members | |
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 one-way, n->1 Send communication pattern.
Clients can send a specified DataType object to a server. The server propagates handling of the input object to a registered ISendServerHandler
If the send() method succeeds, this means that the sent object actually arrived at the server, but the server has the freedom to process this object later or throw it away altogether, depending on the implemented server semantics.
Template parameters
Template parameters:
Demonstrated in sixth example
using Smart::ISendServerPattern< DataType >::ISendServerHandlerPtr = std::shared_ptr<Smart::ISendServerHandler<DataType> > |
|
inline |
Default constructor.
Note that a handler has to be supplied. Without a handler, the SendServer could not accept a send command.
component | management class of the component |
service | name of the service |
handler | is a pointer to the send-handler |
|
virtualdefault |
Destructor.
Properly disconnects all service requestors in case of destruction such that all pending sends are handled correctly at client side even when the service provider disappears during pending sends.
|
inlineprotected |
please call this method in derived classes from within the middleware-specific data handler