This class is used to publish and retrieve RSC services.
More...
#include <ServiceManager.hpp>
|
|
| ServiceManager (void)=delete |
| | makes this class pure static
|
| |
|
| template<class TService > |
| static TService::Ptr | GetService (void) |
| | Gets a RSC service. The service provider is determined by the proxy factory. More...
|
| |
| template<class TService > |
| static TService::Ptr | GetService (const char *serviceProviderName) |
| | Gets a service of the specified service provider. More...
|
| |
| template<class TService > |
| static bool | TryGetService (typename TService::Ptr &result) |
| | Tries to get a service of the service provider Arp. More...
|
| |
| template<class TService > |
| static bool | TryGetService (const char *serviceProviderName, typename TService::Ptr &result) |
| | Gets a service of the specified service provider. More...
|
| |
| template<class TService , class TServiceFactory > |
| static void | PublishService (void) |
| | Registers a RSC service. More...
|
| |
| template<class TService , class TServiceFactory > |
| static void | PublishService (const char *serviceProviderName) |
| | Registers a RSC service of the specified service provider. More...
|
| |
| static void | PublishComponentService (const char *componentName, const char *serviceName, IRscServiceFactory *pServiceFactory) |
| | Publishes a service of the specified service or type of the specified component, which serves as service provider. More...
|
| |
|
static Impl & | GetImpl (void) |
| |
This class is used to publish and retrieve RSC services.
The implementation of this class is pure static, that is, the class provides only static operations.
◆ GetService() [1/2]
template<class TService >
| TService::Ptr Arp::Base::Rsc::ServiceManager::GetService |
( |
const char * |
serviceProviderName | ) |
|
|
inlinestatic |
Gets a service of the specified service provider.
- Template Parameters
-
| TService | The service type to get. |
- Parameters
-
| serviceProviderName | The name of the service provider or the process name to get the specified service from. |
- Returns
- The pointer of the requested service instance.
- Exceptions
-
| InvalidOperationException | If the service could not be found. |
| ArgumentException | If the service provider specified by <paramref ="serviceProviderName" /> does not exist. |
This operation is only used by internal infrastructure. Use ServiceManager::GetService(void) instead.
◆ GetService() [2/2]
template<class TService >
| TService::Ptr Arp::Base::Rsc::ServiceManager::GetService |
( |
void |
| ) |
|
|
inlinestatic |
Gets a RSC service. The service provider is determined by the proxy factory.
- Template Parameters
-
| TService | The service type to get. |
- Returns
- The pointer of the requested service instance.
- Exceptions
-
| InvalidOperationException | If the service could not be found. |
◆ PublishComponentService()
| void Arp::System::Rsc::ServiceManager::PublishComponentService |
( |
const char * |
componentName, |
|
|
const char * |
serviceName, |
|
|
IRscServiceFactory * |
pServiceFactory |
|
) |
| |
|
static |
Publishes a service of the specified service or type of the specified component, which serves as service provider.
- Parameters
-
| componentName | The name of the component to publish the service for. |
| serviceName | The name of the service or service type to publish. |
| pServiceFactory | The pointer to the factory of the specified service. |
◆ PublishService() [1/2]
template<class TService , class TServiceFactory >
| void Arp::Base::Rsc::ServiceManager::PublishService |
( |
const char * |
serviceProviderName | ) |
|
|
inlinestatic |
Registers a RSC service of the specified service provider.
- Parameters
-
| serviceProviderName | The name of the service provider. |
- Template Parameters
-
| TService | The service type to publish. |
| TServiceFactory | The factory type of the specified service. Shall implement the singleton pattern. |
This operation is only used by internal infrastructure. Use ServiceManager::PublishService<T>(void) instead.
◆ PublishService() [2/2]
template<class TService , class TServiceFactory >
| void Arp::Base::Rsc::ServiceManager::PublishService |
( |
void |
| ) |
|
|
inlinestatic |
Registers a RSC service.
The service provider name is retrieved from the specified service factory or defaults to the local application/process name.
- Template Parameters
-
| TService | The service type to register. |
| TServiceFactory | The service factory. Shall implement the singleton pattern. |
◆ TryGetService() [1/2]
template<class TService >
| bool Arp::Base::Rsc::ServiceManager::TryGetService |
( |
const char * |
serviceProviderName, |
|
|
typename TService::Ptr & |
result |
|
) |
| |
|
inlinestatic |
Gets a service of the specified service provider.
- Template Parameters
-
| TService | The type of the service or service type to get. |
- Parameters
-
| serviceProviderName | The name or URL of the service provider or the application name to get the specified service from. |
| result | The pointer of the requested service instance or nullptr if the service could not be found. |
- Returns
true on success, otherwise false.
This operation is only used by internal infrastructure. Use ServiceManager::TryGetService<T>(result) instead.
◆ TryGetService() [2/2]
template<class TService >
| bool Arp::Base::Rsc::ServiceManager::TryGetService |
( |
typename TService::Ptr & |
result | ) |
|
|
inlinestatic |
Tries to get a service of the service provider Arp.
- Template Parameters
-
| TService | The service type to get. |
- Parameters
-
| result | The pointer of the requested service instance or nullptr if the service could not be found. |
- Returns
true on success, otherwise false.
The documentation for this class was generated from the following files:
- Arp/Base/Rsc/ServiceManager.hpp
- Arp/Base/Rsc/ServiceManager.cpp
- Arp/System/Rsc/ServiceManager.cpp