Samchon Framework for CPP
1.0.0
|
#include <ExternalSystemRole.hpp>
Public Member Functions | |
ExternalSystemRole (ExternalSystem *system) | |
virtual | ~ExternalSystemRole ()=default |
virtual auto | key () const -> std::string |
auto | getSystem () const -> ExternalSystem * |
auto | getName () const -> std::string |
virtual void | sendData (std::shared_ptr< protocol::Invoke > invoke) override |
virtual void | replyData (std::shared_ptr< protocol::Invoke > invoke)=0 |
Public Member Functions inherited from samchon::protocol::IProtocol | |
virtual void | replyData (std::shared_ptr< Invoke >)=0 |
virtual void | sendData (std::shared_ptr< Invoke >)=0 |
Protected Attributes | |
std::string | name |
A role of an external system.
The ExternalSystemRole class represents a role, WHAT TO DO. Extends the ExternalSystemRole class and overrides replyData() to define the WHAT TO DO. And assign this ExternalSystemRole object to related ExternalSystem object.
The ExternalSystemRole class can be an logical proxy. In framework within user, which external system is connected with this system, it's not important. Only interested in user's perspective is which can be done.
By using the logical proxy, user dont't need to know which role is belonged to which system. Just access to a role directly from ExternalSystemArray.getRole. Sends and receives Invoke message via the role.
Definition at line 49 of file ExternalSystemRole.hpp.
|
inline |
Constructor from a system.
system | An external system containing this role. |
Definition at line 77 of file ExternalSystemRole.hpp.
References ~ExternalSystemRole().
|
virtualdefault |
|
inlinevirtual |
Identifier of ExternalSystemRole is its name.
Reimplemented from samchon::protocol::Entity< std::string >.
Definition at line 98 of file ExternalSystemRole.hpp.
References name.
|
inline |
Get parent ExternalSystemRole object.
Definition at line 106 of file ExternalSystemRole.hpp.
|
inline |
Get name, who represents and identifies this role.
Definition at line 114 of file ExternalSystemRole.hpp.
References name.
|
inlineoverridevirtual |
Send an Invoke message.
Sends an Invoke message to remote system through the parent ExternalSystem object.
invoke | An Invoke message to send to the external system. |
Definition at line 129 of file ExternalSystemRole.hpp.
References replyData().
|
pure virtual |
Handle replied Invoke message.
ExternalSystemRole.replyData() is an abstract method handling a replied message gotten from remote system via parent ExternalSystem object. Overrides this method and defines the WHAT TO DO with the message.
invoke | An Invoke message received from the external system. |
Referenced by sendData().
|
protected |
A name, represents and identifies this role.
This name is an identifier represents this role. This name is used in ExternalSystemArray.getRole and ExternalSystem.get, as a key elements. Thus, this name should be unique in an ExternalSystemArray.
Definition at line 66 of file ExternalSystemRole.hpp.