3 * @file LookupManager.h
5 * @author Pradeep Gore <pradeep@oomworks.com>
8 #ifndef TAO_Notify_Tests_LOOKUPMANAGER_H
9 #define TAO_Notify_Tests_LOOKUPMANAGER_H
10 #include /**/ "ace/pre.h"
12 #include "notify_test_export.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "ace/Singleton.h"
19 #include "tao/PortableServer/PortableServer.h"
20 #include "orbsvcs/CosNotifyChannelAdminC.h"
21 #include "orbsvcs/CosNamingC.h"
22 #include "ace/Hash_Map_Manager.h"
24 class TAO_Notify_Tests_Periodic_Supplier
;
25 class TAO_Notify_Tests_Periodic_Consumer
;
26 class TAO_Notify_Tests_Driver_Base
;
27 class TAO_Notify_Tests_Activation_Manager
;
28 class TAO_Notify_Tests_Priority_Mapping
;
31 * @class TAO_Notify_Tests_LookupManager
33 * @brief Utility to register and resolve object references.
35 class TAO_NOTIFY_TEST_Export TAO_Notify_Tests_LookupManager
39 TAO_Notify_Tests_LookupManager ();
42 ~TAO_Notify_Tests_LookupManager ();
45 void init (CORBA::ORB_ptr orb
);
49 /// Register the application starter object.
50 void _register (TAO_Notify_Tests_Driver_Base
* app
);
51 void _register (TAO_Notify_Tests_Activation_Manager
* activation_manager
);
52 void _register (TAO_Notify_Tests_Priority_Mapping
*priority_mapping
);
54 /// Register Objects with Naming Service
55 void _register(CORBA::Object_ptr obj
, const char* obj_name
);
59 /// Resolve the application starter object.
60 void resolve (TAO_Notify_Tests_Driver_Base
*& app
);
61 void resolve (TAO_Notify_Tests_Activation_Manager
*& activation_manager
);
62 void resolve (TAO_Notify_Tests_Priority_Mapping
* &priority_mapping
);
65 void resolve (CORBA::ORB_var
& orb
);
67 /// Return the Root POA.
68 void resolve (PortableServer::POA_var
& poa
);
70 /// Return the default Naming context.
71 void resolve (CosNaming::NamingContextExt_var
& naming
);
73 void resolve (PortableServer::POA_var
& poa
, const char *poa_name
);
74 void resolve (CosNaming::NamingContextExt_var
& naming
, const char *naming_name
);
75 void resolve (CosNotifyChannelAdmin::EventChannelFactory_var
& ecf
, const char *factory_name
);
76 void resolve (CosNotifyChannelAdmin::EventChannel_var
& ec
, const char *channel_name
);
77 void resolve (CosNotifyChannelAdmin::SupplierAdmin_var
& sa
, const char *admin_name
);
78 void resolve (CosNotifyChannelAdmin::ConsumerAdmin_var
& ca
, const char *admin_name
);
79 void resolve (CosNotifyComm::StructuredPushSupplier_var
& supplier
, const char *supplier_name
);
80 void resolve (CosNotifyComm::StructuredPushConsumer_var
& consumer
, const char *consumer_name
);
81 void resolve (CosNotifyFilter::FilterFactory_var
& ff
, const char *filter_factory_name
);
82 void resolve (CosNotifyFilter::Filter_var
& filter
, const char *filter_name
);
83 void resolve (CosNotifyFilter::FilterAdmin_var
& filter_admin
, const char *filter_admin_name
);
86 /// Application Starter
87 TAO_Notify_Tests_Driver_Base
* app_
;
89 /// Activation Manager
90 TAO_Notify_Tests_Activation_Manager
* activation_manager_
;
92 /// Resolve to CORBA::Object
93 CORBA::Object_ptr
resolve_object (const char* obj_name
);
95 // The ORB that we use.
98 // Reference to the root poa.
99 PortableServer::POA_var root_poa_
;
102 CosNaming::NamingContextExt_var naming_
;
105 TAO_Notify_Tests_Priority_Mapping
*priority_mapping_
;
108 TAO_NOTIFY_TEST_SINGLETON_DECLARE (ACE_Singleton
, TAO_Notify_Tests_LookupManager
, TAO_SYNCH_MUTEX
)
110 typedef ACE_Singleton
<TAO_Notify_Tests_LookupManager
, TAO_SYNCH_MUTEX
> _TAO_Notify_Tests_LookupManager
;
112 #define LOOKUP_MANAGER _TAO_Notify_Tests_LookupManager::instance()
114 #include /**/ "ace/post.h"
115 #endif /* TAO_Notify_Tests_LOOKUPMANAGER_H */