00001 #ifndef _IT_BUS_PDK_BUS_SERVICE_ACTIVATOR_H_
00002 #define _IT_BUS_PDK_BUS_SERVICE_ACTIVATOR_H_
00003
00004
00005
00006
00007 #include <it_bus/bus.h>
00008 #include <it_bus/types.h>
00009 #include <it_bus/qname.h>
00010 #include <it_bus_pdk/registry.h>
00011
00012 namespace IT_Bus
00013 {
00014 class IT_BUS_API ServiceActivator :
00015 public RegistryBase
00016 {
00017 public:
00018
00019 virtual ~ServiceActivator() throw(());
00020
00021 virtual void
00022 activate_service(
00023 const IT_Bus::QName & service_name
00024 ) throw((Exception)) = 0;
00025
00026 virtual void
00027 deactivate_service(
00028 const IT_Bus::QName & service_name
00029 ) = 0;
00030
00031 static IT_Bus::Boolean
00032 register_sa(
00033 IT_Bus::Bus_ptr bus,
00034 const IT_Bus::QName & service_name,
00035 ServiceActivator * sa
00036 );
00037
00038 static IT_Bus::Boolean
00039 deregister_sa(
00040 IT_Bus::Bus_ptr bus,
00041 const IT_Bus::QName & service_name
00042 );
00043
00044 static ServiceActivator*
00045 get_service_activator(
00046 IT_Bus::Bus_ptr bus,
00047 const IT_Bus::QName & service_name
00048 );
00049
00050 static const String SERVICE_ACTIVATOR_QNAME_REGISTRY_NAME;
00051 };
00052
00053 typedef Registry<QName, ServiceActivator> ServiceActivatorRegistry;
00054 }
00055
00056 #endif