RTC Toolkit  2.0.0
serviceRegistryIf.hpp
Go to the documentation of this file.
1 
12 #ifndef RTCTK_COMPONENTFRAMEWORK_SERVICEREGISTRYIF_HPP
13 #define RTCTK_COMPONENTFRAMEWORK_SERVICEREGISTRYIF_HPP
14 
15 #include <memory>
16 #include <string>
17 
18 #include <mal/Cii.hpp>
19 
21 
22 namespace rtctk::componentFramework {
23 
28  public:
29 
30  using ServiceEndpoint = elt::mal::Uri;
31 
35  static const std::string REQ_REP_ENDPOINT;
39  static const std::string PUB_SUB_ENDPOINT;
40 
42  public:
43  explicit InvalidComponent(const std::string& component);
44  };
45  class InvalidService : public RtctkException {
46  public:
47  explicit InvalidService(const std::string& service);
48  };
52  virtual ~ServiceRegistryIf() = default;
53 
61  virtual std::vector<std::string> ListComponents() = 0;
62 
75 
86  virtual ServiceEndpoint Get(const std::string& comp_name, const std::string& service_name) = 0;
87 };
88 
89 } // namespace rtctk::componentFramework
90 
91 #endif // RTCTK_COMPONENTFRAMEWORK_SERVICEREGISTRYIF_HPP
exceptions.hpp
Provides macros and utilities for exception handling.
rtctk::componentFramework
Definition: commandReplier.cpp:20
rtctk::componentFramework::ServiceRegistryIf::ServiceEndpoint
elt::mal::Uri ServiceEndpoint
Definition: serviceRegistryIf.hpp:30
rtctk::componentFramework::ServiceRegistryIf::Get
virtual ServiceEndpoint Get(const std::string &comp_name, const std::string &service_name)=0
Get endpoint of specific service of a specific component.
rtctk::componentFramework::ServiceRegistryIf::InvalidService
Definition: serviceRegistryIf.hpp:45
rtctk::componentFramework::RtctkException
The RtctkException class is the base class for all Rtctk exceptions.
Definition: exceptions.hpp:207
rtctk::componentFramework::ServiceRegistryIf::GetPersistentRepoEndpoint
virtual ServiceEndpoint GetPersistentRepoEndpoint()=0
Get the Persistent Repository Endpoint from the service registry.
rtctk::componentFramework::ServiceRegistryIf::~ServiceRegistryIf
virtual ~ServiceRegistryIf()=default
virtual destructor
rtctk::componentFramework::ServiceRegistryIf::InvalidComponent
Definition: serviceRegistryIf.hpp:41
rtctk::componentFramework::ServiceRegistryIf::GetOldbEndpoint
virtual ServiceEndpoint GetOldbEndpoint()=0
Get the Oldb Endpoint from the service registry.
rtctk::componentFramework::ServiceRegistryIf
Class that implements a service registry to be used by the service discovery.
Definition: serviceRegistryIf.hpp:27
rtctk::componentFramework::ServiceRegistryIf::REQ_REP_ENDPOINT
static const std::string REQ_REP_ENDPOINT
the string used to identify the Request/Reply endpoint of a service when using the Get function.
Definition: serviceRegistryIf.hpp:35
rtctk::componentFramework::ServiceRegistryIf::InvalidComponent::InvalidComponent
InvalidComponent(const std::string &component)
Definition: serviceRegistryIf.cpp:31
rtctk::componentFramework::ServiceRegistryIf::PUB_SUB_ENDPOINT
static const std::string PUB_SUB_ENDPOINT
the string used to identify the PubSub endpoint of a service when using the Get function.
Definition: serviceRegistryIf.hpp:39
rtctk::componentFramework::ServiceRegistryIf::InvalidService::InvalidService
InvalidService(const std::string &service)
Definition: serviceRegistryIf.cpp:35
rtctk::componentFramework::ServiceRegistryIf::ListComponents
virtual std::vector< std::string > ListComponents()=0
Get known components.
rtctk::componentFramework::ServiceRegistryIf::GetRuntimeRepoEndpoint
virtual ServiceEndpoint GetRuntimeRepoEndpoint()=0
Get the Runtime Repository Endpoint from the service registry.