Samchon Framework for CPP  1.0.0
samchon::templates::external::ExternalServerArray< System > Class Template Reference

#include <ExternalServerArray.hpp>

Collaboration diagram for samchon::templates::external::ExternalServerArray< System >:

Public Member Functions

 ExternalServerArray ()
 
virtual void connect ()
 
- Public Member Functions inherited from samchon::templates::external::ExternalSystemArray< System >
 ExternalSystemArray ()
 
virtual ~ExternalSystemArray ()=default
 
auto hasRole (const std::string &key) const -> bool
 
auto getRole (const std::string &key) const -> std::shared_ptr< ExternalSystemRole >
 
virtual void sendData (std::shared_ptr< protocol::Invoke > invoke)
 
virtual void replyData (std::shared_ptr< protocol::Invoke > invoke)=0
 
virtual auto CHILD_TAG () const -> std::string override
 A tag name of children. More...
 
- Public Member Functions inherited from samchon::protocol::EntityGroup< Container, T, Key >
virtual void construct (std::shared_ptr< library::XML > xml)
 Construct data of the Entity from an XML object. More...
 
auto find (const typename child_type::key_type &key) -> typename container_type::iterator
 Get iterator to element. More...
 
auto find (const typename child_type::key_type &key) const -> typename container_type::const_iterator
 Get const iterator to element. More...
 
auto has (const typename child_type::key_type &key) const -> bool
 Indicates whether a container has an object having the specified identifier. More...
 
auto count (const typename child_type::key_type &key) const -> size_t
 Count elements with a specific key. More...
 
auto get (const typename child_type::key_type &key) -> typename container_type::value_type &
 Access the element by specified identifier(key). More...
 
auto get (const typename child_type::key_type &key) const -> const typename container_type::value_type &
 Access the const element by specified identifier(key). More...
 
virtual auto toXML () const -> std::shared_ptr< library::XML >
 Get an XML object represents the EntityGroup. More...
 
- Public Member Functions inherited from samchon::protocol::Entity< Key >
virtual auto key () const -> Key
 Get a key that can identify the Entity uniquely. More...
 
- Public Member Functions inherited from samchon::protocol::IProtocol
virtual void replyData (std::shared_ptr< Invoke >)=0
 
virtual void sendData (std::shared_ptr< Invoke >)=0
 

Additional Inherited Members

- Protected Member Functions inherited from samchon::protocol::EntityGroup< Container, T, Key >
virtual auto createChild (std::shared_ptr< library::XML >) -> child_type *=0
 Factory method of a child Entity. More...
 

Detailed Description

template<class System = ExternalServer>
class samchon::templates::external::ExternalServerArray< System >

An array and manager of external servers.

The ExternalServerArray is an abstract class, derived from the ExternalSystemArray class, connecting to external servers.

Extends this ExternalServerArray and overrides createChild() method creating child IExternalServer object. After the extending and overriding, construct children IExternalServer objects and call the connect() method.

[Inherited] ExternalSystemArray}

An array and manager of external system drivers.

The ExternalSystemArray is an abstract class containing and managing external system drivers, ExternalSystem objects. Within framewokr of network, ExternalSystemArray represents your system and children ExternalSystem objects represent remote, external systems connected with your system. With this ExternalSystemArray, you can manage multiple external systems as a group.

You can specify this ExternalSystemArray class to be a server accepting external clients or a client connecting to external servers. Even both of them is also possible.

Class Diagram

Proxy Pattern

The ExternalSystemArray class can use Proxy Pattern. 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.

Templates - External System

Author
Jeongho Nam http://samchon.org

Definition at line 29 of file ExternalServerArray.hpp.

Constructor & Destructor Documentation

template<class System = ExternalServer>
samchon::templates::external::ExternalServerArray< System >::ExternalServerArray ( )
inline

Default Constructor.

Definition at line 36 of file ExternalServerArray.hpp.

Member Function Documentation

template<class System = ExternalServer>
virtual void samchon::templates::external::ExternalServerArray< System >::connect ( )
inlinevirtual

Connect to external servers.

This method calls children elements' method ExternalServer.connect gradually.

Definition at line 47 of file ExternalServerArray.hpp.

References samchon::templates::external::ExternalServer::connect().

Here is the call graph for this function:


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