Use this class to publish and retrieve Rsc and Remoting services.
More...
#include <ServiceManager.hpp>
|
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...
|
|
template<class TService > |
static TService::Ptr | GetService (void) |
| Gets a Rsc service of the service provider Arp . 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...
|
|
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 void | PublishRemotingServiceProvider (CRemotingServiceProviderBase *pServiceProvider) |
| Publishes a remoting service provider and all of its services. More...
|
|
template<class TService , class TServiceFactory > |
static void | PublishRemotingService (const char *serviceProviderName) |
| Publishes a remoting service of the specified service provider. More...
|
|
template<class TService > |
static TService::Ptr | GetRemotingService (const char *serviceProviderName) |
| Gets a Remoting service of the specified service provider. More...
|
|
Use this class to publish and retrieve Rsc and Remoting services.
This implementation of this class is pure static, that is, the class provides only static operations.
◆ GetRemotingService()
template<class TService >
TService::Ptr Arp::System::Rsc::ServiceManager::GetRemotingService |
( |
const char * |
serviceProviderName | ) |
|
|
inlinestatic |
Gets a Remoting service of the specified service provider.
- Parameters
-
serviceProviderName | The name of the service provider or the process name to get the specified service from. |
- Template Parameters
-
TService | The remoting service type to retrieve. |
- Returns
- The pointer of the requested service instance or
nullptr
if the service could not be found.
This operation should be used for Remoting services but not Rsc services.
◆ GetService() [1/2]
template<class TService >
TService::Ptr Arp::System::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. |
◆ GetService() [2/2]
template<class TService >
TService::Ptr Arp::System::Rsc::ServiceManager::GetService |
( |
void |
| ) |
|
|
inlinestatic |
Gets a Rsc service of the service provider Arp
.
- 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()
static 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. |
◆ PublishRemotingService()
template<class TService , class TServiceFactory >
void Arp::System::Rsc::ServiceManager::PublishRemotingService |
( |
const char * |
serviceProviderName | ) |
|
|
inlinestatic |
Publishes a remoting service of the specified service provider.
- Parameters
-
serviceProviderName | The name of the remoting service provider. |
- Template Parameters
-
TService | The remoting service type to register. |
TServiceFactory | The service factory type of the specified service. Must implement the singleton policy. |
This operation should be used by remoting services but not Rsc services.
◆ PublishRemotingServiceProvider()
static void Arp::System::Rsc::ServiceManager::PublishRemotingServiceProvider |
( |
CRemotingServiceProviderBase * |
pServiceProvider | ) |
|
|
static |
Publishes a remoting service provider and all of its services.
- Parameters
-
pServiceProvider | The remoting service provider to publish. |
This operation should be used to publish Remoting services but not Rsc services.
◆ PublishService() [1/2]
template<class TService , class TServiceFactory >
void Arp::System::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 register. |
TServiceFactory | The factory type of the specified service. Must implement the singleton policy. |
◆ PublishService() [2/2]
template<class TService , class TServiceFactory >
void Arp::System::Rsc::ServiceManager::PublishService |
( |
void |
| ) |
|
|
inlinestatic |
Registers a Rsc service.
The service provider name if retrieved from the specified service factory and defaults to Arp
.
- Template Parameters
-
TService | The service type to register. |
TServiceFactory | The factory type of the specified service. Shall implement the singleton policy.</patypeparamram> |
◆ TryGetService() [1/2]
template<class TService >
bool Arp::System::Rsc::ServiceManager::TryGetService |
( |
const char * |
serviceProviderName, |
|
|
typename TService::Ptr & |
result |
|
) |
| |
|
inlinestatic |
Gets a service of the specified service provider.
- Parameters
-
serviceName | The name of the service or service type to get. |
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<7c>.
◆ TryGetService() [2/2]
template<class TService >
bool Arp::System::Rsc::ServiceManager::TryGetService |
( |
typename TService::Ptr & |
result | ) |
|
|
inlinestatic |
Tries to get a service of the service provider Arp
.
- Parameters
-
serviceName | The name of the service or service type to get. |
result | The pointer of the requested service instance or nullptr if the service could not be found. |
- Returns
true
on success, otherwise false<7c>.
The documentation for this class was generated from the following file: