RTC Toolkit  2.0.0
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
rtctk::componentFramework::ServiceRegistryIf Class Referenceabstract

Class that implements a service registry to be used by the service discovery. More...

#include <serviceRegistryIf.hpp>

Inheritance diagram for rtctk::componentFramework::ServiceRegistryIf:
rtctk::componentFramework::FileServiceRegistryAdapter

Classes

class  InvalidComponent
 
class  InvalidService
 

Public Types

using ServiceEndpoint = elt::mal::Uri
 

Public Member Functions

virtual ~ServiceRegistryIf ()=default
 virtual destructor More...
 
virtual std::vector< std::string > ListComponents ()=0
 Get known components. More...
 
virtual ServiceEndpoint GetOldbEndpoint ()=0
 Get the Oldb Endpoint from the service registry. More...
 
virtual ServiceEndpoint GetRuntimeRepoEndpoint ()=0
 Get the Runtime Repository Endpoint from the service registry. More...
 
virtual ServiceEndpoint GetPersistentRepoEndpoint ()=0
 Get the Persistent Repository Endpoint from the service registry. More...
 
virtual ServiceEndpoint Get (const std::string &comp_name, const std::string &service_name)=0
 Get endpoint of specific service of a specific component. More...
 

Static Public Attributes

static const std::string REQ_REP_ENDPOINT = "req_rep_endpoint"
 the string used to identify the Request/Reply endpoint of a service when using the Get function. More...
 
static const std::string PUB_SUB_ENDPOINT = "pub_sub_endpoint"
 the string used to identify the PubSub endpoint of a service when using the Get function. More...
 

Detailed Description

Class that implements a service registry to be used by the service discovery.

Member Typedef Documentation

◆ ServiceEndpoint

Constructor & Destructor Documentation

◆ ~ServiceRegistryIf()

virtual rtctk::componentFramework::ServiceRegistryIf::~ServiceRegistryIf ( )
virtualdefault

virtual destructor

Member Function Documentation

◆ Get()

virtual ServiceEndpoint rtctk::componentFramework::ServiceRegistryIf::Get ( const std::string &  comp_name,
const std::string &  service_name 
)
pure virtual

Get endpoint of specific service of a specific component.

Parameters
comp_namename of the component instance
service_namename of the service, Must be one of the REQ_REP_ENDPOINT or PUB_SUB_ENDPOINT contants defined in ServiceRegistryIf
Returns
ServiceEndpoint
Exceptions
InvalidServiceif service_name or InvalidComponent if comp_name invalid

Implemented in rtctk::componentFramework::FileServiceRegistryAdapter.

◆ GetOldbEndpoint()

virtual ServiceEndpoint rtctk::componentFramework::ServiceRegistryIf::GetOldbEndpoint ( )
pure virtual

Get the Oldb Endpoint from the service registry.

Implemented in rtctk::componentFramework::FileServiceRegistryAdapter.

◆ GetPersistentRepoEndpoint()

virtual ServiceEndpoint rtctk::componentFramework::ServiceRegistryIf::GetPersistentRepoEndpoint ( )
pure virtual

Get the Persistent Repository Endpoint from the service registry.

Implemented in rtctk::componentFramework::FileServiceRegistryAdapter.

◆ GetRuntimeRepoEndpoint()

virtual ServiceEndpoint rtctk::componentFramework::ServiceRegistryIf::GetRuntimeRepoEndpoint ( )
pure virtual

Get the Runtime Repository Endpoint from the service registry.

Implemented in rtctk::componentFramework::FileServiceRegistryAdapter.

◆ ListComponents()

virtual std::vector<std::string> rtctk::componentFramework::ServiceRegistryIf::ListComponents ( )
pure virtual

Get known components.

Use this method to retrieve all components known to the service registry

Returns
vector of pairs containing the component names

Implemented in rtctk::componentFramework::FileServiceRegistryAdapter.

Member Data Documentation

◆ PUB_SUB_ENDPOINT

const std::string rtctk::componentFramework::ServiceRegistryIf::PUB_SUB_ENDPOINT = "pub_sub_endpoint"
static

the string used to identify the PubSub endpoint of a service when using the Get function.

◆ REQ_REP_ENDPOINT

const std::string rtctk::componentFramework::ServiceRegistryIf::REQ_REP_ENDPOINT = "req_rep_endpoint"
static

the string used to identify the Request/Reply endpoint of a service when using the Get function.


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