SmartSoft Component-Developer API
|
Client part of the one-way, n->1 Send communication pattern. More...
#include <smartISendClientPattern_T.h>
Public Member Functions | |
ISendClientPattern (IComponent *component) | |
Constructor (not wired with a service provider). More... | |
ISendClientPattern (IComponent *component, const std::string &server, const std::string &service) | |
Connection Constructor (implicitly wiring with specified service provider). More... | |
virtual | ~ISendClientPattern ()=default |
Destructor. More... | |
virtual StatusCode | send (const DataType &data)=0 |
Perform a one-way communication. More... | |
Public Member Functions inherited from Smart::IClientPattern | |
IClientPattern (IComponent *component) | |
Default Constructor (not yet connecting with any service provider). More... | |
IClientPattern (IComponent *component, const std::string &server, const std::string &service) | |
Connection Constructor (implicitly connecting with specified service provider). More... | |
virtual | ~IClientPattern ()=default |
Default destructor. More... | |
virtual StatusCode | connect (const std::string &server, const std::string &service)=0 |
Connect this service requestor to the denoted service provider. More... | |
virtual StatusCode | disconnect ()=0 |
Disconnect the service requestor from the service provider. More... | |
virtual StatusCode | blocking (const bool blocking)=0 |
Allow or abort and reject blocking calls. 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::IClientPattern | |
bool | is_shutting_down () const |
virtual void | on_shutdown () override |
implements individual shutdown strategy The default behavior for each client during component shutdown is to call disconnect() which automatically disconnects the current client instance. More... | |
IClientPattern ()=delete | |
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::IClientPattern | |
std::string | connectionServerName |
the server-name used for the last connection (can be used in derived classes) More... | |
std::string | connectionServiceName |
the service-name used for the last connection (can be used in derived classes) More... | |
std::atomic< bool > | is_blocking |
the flag indicating the current blocking state of this client (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... | |
Client part of the one-way, n->1 Send communication pattern.
Clients can send a specified DataType object to a server. 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
|
inline |
Constructor (not wired with a service provider).
connect() / disconnect() can always be used to change the status of the connection.
component | the management class of the component |
|
inline |
Connection Constructor (implicitly wiring with specified service provider).
Connects to the denoted service and blocks until the connection has been established. Blocks infinitely if denoted service becomes unavailable since constructor performs retries. Blocking is useful to simplify startup of components which have mutual dependencies. connect() / disconnect() can always be used to change the status of the instance.
component | the management class of the component |
server | name of the server (i.e. the component-name to connect to) |
service | name of the service (i.e. the port-name of the component to connect to) |
|
virtualdefault |
Destructor.
The destructor calls disconnect().
|
pure virtual |
Perform a one-way communication.
Appropriate status codes make sure that the information has been transferred.
data | the object to be sent (Communication Object) |