00001 #ifndef _IT_BUS_PDK_PDK_BUS_H_
00002 #define _IT_BUS_PDK_PDK_BUS_H_
00003
00004
00005
00006
00007 #include <orbix_sys/default_ts_error_handler.h>
00008 #include <orbix/workqueue.hh>
00009
00010 #include <it_bus/api_defines.h>
00011
00012 #include <it_bus/bus.h>
00013 #include <it_bus/types.h>
00014 #include <it_bus/port_factory.h>
00015 #include <it_bus/type_factory.h>
00016 #include <it_bus/reference.h>
00017 #include <it_ts/thread.h>
00018 #include <it_bus/service.h>
00019 #include <it_bus/port.h>
00020
00021 #include <it_bus_pdk/registry.h>
00022 #include <it_bus_pdk/messaging_transport.h>
00023 #include <it_bus_pdk/interceptor.h>
00024 #include <it_bus_pdk/interceptor_factory_manager.h>
00025 #include <it_bus_pdk/bus_plugin_manager.h>
00026
00027 #include <it_wsdl/wsdl_definitions.h>
00028 #include <it_wsdl/wsdl_processor.h>
00029
00030 namespace CORBA
00031 {
00032 class ORB;
00033 }
00034
00035 namespace IT_WSDL
00036 {
00037 class WSDLFactory;
00038 }
00039
00040 namespace IT_Config
00041 {
00042 class Configuration;
00043 }
00044
00045 namespace IT_Bus
00046 {
00047 class ServiceFactory;
00048 class OutputStream;
00049 class BusPlugIn;
00050 class GlobalBusORBPlugIn;
00051 class ContextRegistry;
00052 class ManagedBus;
00053 class EndpointManagerFactory;
00054
00055 namespace Logging
00056 {
00057 class LoggingConfig;
00058 class BusLogger;
00059 }
00060
00061 class IT_BUS_API ThreadCallback
00062 {
00063 public:
00064 ThreadCallback() {}
00065
00066 virtual ~ThreadCallback();
00067
00068 virtual void
00069 thread_startup(
00070 IT_ThreadBody* thread_body
00071 ) = 0;
00072
00073 virtual void
00074 thread_shutdown(
00075 IT_ThreadBody* thread_body
00076 ) = 0;
00077 };
00078
00079 class IT_BUS_API ContainerPlugin
00080 {
00081 public:
00082 ContainerPlugin() {}
00083
00084 virtual ~ContainerPlugin();
00085
00086 virtual void
00087 run() = 0;
00088 };
00089
00100 class IT_BUS_API PDKBus : public Bus, public BusPlugInManager
00101 {
00102 public:
00109 virtual RegistryBase*
00110 get_registry(
00111 const String& registry_name
00112 ) = 0;
00113
00117 virtual Registry<String, RegistryBase>&
00118 get_registry() IT_THROW_DECL((Exception)) = 0;
00119
00120
00121
00127 virtual void
00128 register_messaging_port_factory(
00129 PortFactory* factory
00130 ) = 0;
00131
00135 virtual void
00136 deregister_messaging_port_factory(
00137 ) = 0;
00138
00144 virtual PortFactory*
00145 get_messaging_port_factory() = 0;
00146
00147
00148
00149
00156 virtual void
00157 register_port_factory(
00158 const String & binding_namespace,
00159 const IT_WSDL::WSDLExtensionFactory* wsdl_extension_factory,
00160 PortFactory * factory
00161 ) = 0;
00162
00168 virtual void
00169 deregister_port_factory(
00170 const String & binding_namespace
00171 ) = 0;
00172
00179 virtual PortFactory*
00180 get_port_factory(
00181 const String & binding_namespace
00182 ) = 0;
00183
00189 virtual ServiceFactory &
00190 get_service_factory() = 0;
00191
00197 virtual IT_WSDL::WSDLFactory*
00198 get_wsdl_factory() = 0;
00199
00205 virtual IT_WSDL::WSDLProcessor&
00206 get_wsdl_processor() = 0;
00207
00208
00209
00210
00217 virtual void
00218 register_container_plugin(
00219 const String& container_name,
00220 ContainerPlugin* container_plugin
00221 ) = 0;
00222
00228 virtual void
00229 deregister_container_plugin(
00230 const String& container_name
00231 ) = 0;
00232
00233
00234
00235
00236
00242 virtual TransportFactory *
00243 get_transport_factory(
00244 const String & transport_name
00245 ) = 0;
00246
00253 virtual void
00254 register_transport_factory(
00255 const String & transport_name,
00256 TransportFactory * factory
00257 ) = 0;
00258
00265 virtual void
00266 deregister_transport_factory(
00267 const String & transport_name
00268 ) = 0;
00269
00270
00271
00272
00278 virtual int
00279 get_argc() = 0;
00280
00286 virtual char**
00287 get_argv() = 0;
00288
00294 virtual const char*
00295 get_orb_identifier() = 0;
00296
00302 virtual CORBA::ORB*
00303 get_orb() = 0;
00304
00310 virtual ManagedBus*
00311 get_managed_bus() = 0;
00312
00313
00320 static Boolean
00321 smf_register_global_plugin(
00322 const String& plugin_name,
00323 GlobalBusORBPlugIn* plugin
00324 );
00325
00331 static Boolean
00332 smf_deregister_global_plugin(
00333 const String& plugin_name
00334 );
00335
00341 virtual InterceptorFactoryManager&
00342 get_interceptor_factory_manager() = 0;
00343
00344 virtual IT_WorkQueue::WorkQueue_ptr
00345 get_workqueue() = 0;
00346
00347 virtual IT_WorkQueue::WorkQueue_ptr
00348 get_named_workqueue(
00349 const String& thread_pool_name
00350 ) = 0;
00351
00352 virtual TransportPolicyList*
00353 create_transport_policy_list() = 0;
00354
00355
00356 virtual Logging::LoggingConfig*
00357 get_logging_config() = 0;
00358
00359 virtual Logging::BusLogger*
00360 get_bus_logger(
00361 const char* subsystem
00362 ) = 0;
00363
00369 virtual void
00370 deploy_service(
00371 const QName & service_name
00372 ) IT_THROW_DECL((Exception)) = 0;
00373
00379 virtual void
00380 undeploy_service(
00381 const QName & service_name
00382 ) IT_THROW_DECL((Exception)) = 0;
00383
00384 virtual void
00385 bus_logger_complete(
00386 Logging::BusLogger* bus_logger,
00387 const char* subsystem
00388 ) = 0;
00389
00393 virtual void
00394 register_endpoint_manager_factory(
00395 const String& endpoint_factory_name,
00396 EndpointManagerFactory* endpoint_manager_factory
00397 ) = 0;
00398
00402 virtual EndpointManagerFactory*
00403 get_endpoint_manager_factory(
00404 const String& endpoint_factory_name
00405 ) = 0;
00406
00412 virtual IT_Config::Configuration*
00413 get_orb_config() = 0;
00414
00415 protected:
00416 PDKBus();
00417 virtual ~PDKBus();
00418
00419 PDKBus & operator= (const PDKBus & rhs);
00420 PDKBus(const PDKBus & rhs);
00421 };
00422
00423 }
00424
00425 #endif