summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-03-20 14:53:05 +0000
committerpradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-03-20 14:53:05 +0000
commit6c7f9c77416665334b39ae1187ffd497578a05ef (patch)
treeb6419c4196fd0526fdb91620013ec2234bd0365c
parentf65e4c9de122258536307e59d99327725810a07b (diff)
downloadATCD-6c7f9c77416665334b39ae1187ffd497578a05ef.tar.gz
ChangeLog: Wed Mar 19 08:42:45 2003 Pradeep Gore <pradeep@oomworks.com>
-rw-r--r--TAO/orbsvcs/Notify_Service/rt.svc.conf4
-rw-r--r--TAO/orbsvcs/orbsvcs/CosNotification.bor2
-rw-r--r--TAO/orbsvcs/orbsvcs/Makefile.RT_Notification46
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Admin.cpp68
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Admin.h46
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Admin.inl6
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/AdminProperties.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.cpp7
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.cpp11
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.h4
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp7
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushSupplier.cpp11
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushSupplier.h2
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/PushSupplier.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Builder.cpp661
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Builder.h106
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp6
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Consumer.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.cpp147
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.h41
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Container_T.cpp51
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Container_T.h59
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Container_T.inl26
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/CosNotify_Initializer.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp208
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.h30
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp14
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp336
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/EventChannel.h57
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp202
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h39
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Event_Manager.cpp68
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Event_Manager.h10
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Event_Map_Entry_T.h3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Event_Map_T.h3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Factory.h81
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.cpp74
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.h8
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/FilterFactory.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ID_Factory.h8
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ID_Factory.inl2
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Method_Request.h2
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch.cpp12
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch.h4
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch_No_Filtering.cpp5
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch_No_Filtering.h4
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Method_Request_Lookup.cpp14
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Method_Request_Lookup.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Notify_Default_POA_Factory.h2
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.cpp6
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Object.cpp171
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Object.h84
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Object.inl6
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp1
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Peer.cpp5
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Peer.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Proxy.cpp29
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Proxy.h19
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp42
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.h17
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.inl6
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer_T.cpp3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.cpp40
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.h18
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.inl6
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ProxySupplier_T.cpp3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Proxy_T.cpp25
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/QoSProperties.cpp18
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/QoSProperties.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/README2
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Builder.cpp76
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Builder.h51
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Builder.inl3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Factory.cpp29
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Factory.h50
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Factory.inl3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.cpp97
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.h60
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.inl3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.cpp154
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.h64
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.inl3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Properties.cpp27
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Properties.h65
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_Properties.inl27
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.cpp1
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Refcountable.cpp11
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Refcountable.h15
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.cpp7
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.h3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.cpp11
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h2
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushSupplier.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Service.h12
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.cpp44
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.h58
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.inl3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.cpp11
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushSupplier.cpp11
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushSupplier.h4
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredPushConsumer.h3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredPushSupplier.h3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Supplier.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp159
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.h27
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.cpp1
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Timer_Queue.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Timer_Queue.h4
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Timer_Reactor.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Timer_Reactor.h4
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/rt_notify_export.h39
-rw-r--r--TAO/orbsvcs/orbsvcs/NotifyExt.idl48
-rw-r--r--TAO/orbsvcs/orbsvcs/RT_Notification.bor72
-rw-r--r--TAO/orbsvcs/orbsvcs/RT_Notification.dsp323
-rw-r--r--TAO/orbsvcs/orbsvcs/RT_Notification.mpc22
-rw-r--r--TAO/orbsvcs/tests/Notify/Driver/Driver.dsp77
-rw-r--r--TAO/orbsvcs/tests/Notify/Driver/Driver.mpc7
-rw-r--r--TAO/orbsvcs/tests/Notify/Driver/Driver_Static.dsp77
-rw-r--r--TAO/orbsvcs/tests/Notify/Driver/main.cpp29
-rw-r--r--TAO/orbsvcs/tests/Notify/Lanes/README41
-rw-r--r--TAO/orbsvcs/tests/Notify/Lanes/consumer.conf58
-rw-r--r--TAO/orbsvcs/tests/Notify/Lanes/notify.conf5
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Lanes/run_test.pl95
-rw-r--r--TAO/orbsvcs/tests/Notify/Lanes/supplier.conf62
-rw-r--r--TAO/orbsvcs/tests/Notify/ThreadPool/README52
-rw-r--r--TAO/orbsvcs/tests/Notify/ThreadPool/consumer.conf50
-rw-r--r--TAO/orbsvcs/tests/Notify/ThreadPool/notify.conf5
-rwxr-xr-xTAO/orbsvcs/tests/Notify/ThreadPool/run_test.pl95
-rw-r--r--TAO/orbsvcs/tests/Notify/ThreadPool/supplier.conf63
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Activation_Manager.cpp319
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Activation_Manager.h136
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Activation_Manager.idl32
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Application_Command.cpp208
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Application_Command.h75
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Command.cpp57
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Command.h71
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Command_Builder.cpp108
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Command_Builder.h74
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Command_Factory.cpp14
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Command_Factory.h44
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Command_Factory_T.cpp53
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Command_Factory_T.h61
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/ConsumerAdmin_Command.cpp176
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/ConsumerAdmin_Command.h86
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Driver.cpp212
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Driver.h112
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Driver_Base.h38
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.cpp147
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.h81
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Factories_Define.cpp45
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Factories_Define.h38
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Filter_Command.cpp203
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Filter_Command.h79
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/LookupManager.cpp261
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/LookupManager.h120
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_NotifyTests108
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_NotifyTests.bor147
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests64
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests.bor78
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests_Filter62
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests_Filter.bor71
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Name.cpp37
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Name.h63
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushConsumer.cpp36
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushConsumer.h15
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushSupplier.cpp31
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushSupplier.h12
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp14
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Notify_lib.mpc102
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Options_Parser.cpp141
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Options_Parser.h48
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp184
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.h97
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer_Command.cpp317
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer_Command.h96
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp350
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h109
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier_Command.cpp310
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier_Command.h97
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Priority_Mapping.cpp25
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Priority_Mapping.h45
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_Application_Command.cpp35
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_Application_Command.h43
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_Factories_Define.cpp25
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_POA_Command.cpp380
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_POA_Command.h76
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_Priority_Mapping.cpp40
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_Priority_Mapping.h54
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_Test_Filter.cpp298
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_Test_Filter.h137
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_Test_FilterFactory.cpp81
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/RT_Test_FilterFactory.h84
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/StructuredEvent.cpp88
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/StructuredEvent.h67
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/SupplierAdmin_Command.cpp175
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/SupplierAdmin_Command.h85
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests.dsp379
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests_Static.dsp448
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests.dsp145
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Filter.dsp133
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Filter_Static.dsp133
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Static.dsp145
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Task_Callback.h39
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp193
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Task_Stats.h106
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Task_Stats.inl55
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/rt_notify_test_export.h39
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/rt_test_filter_export.h40
216 files changed, 12747 insertions, 1689 deletions
diff --git a/TAO/orbsvcs/Notify_Service/rt.svc.conf b/TAO/orbsvcs/Notify_Service/rt.svc.conf
index b1f46007664..8547cf4a698 100644
--- a/TAO/orbsvcs/Notify_Service/rt.svc.conf
+++ b/TAO/orbsvcs/Notify_Service/rt.svc.conf
@@ -1,3 +1,3 @@
-dynamic TAO_RT_ORB_Loader Service_Object * ./TAO_RTCORBAd:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous"
+dynamic TAO_RT_ORB_Loader Service_Object * TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous"
-dynamic TAO_NS_Service Service_Object * ./TAO_RT_Notificationd:_make_TAO_NS_RT_Notify_Service () ""
+dynamic TAO_Notify_Service Service_Object * TAO_RT_Notification:_make_TAO_RT_Notify_Service () ""
diff --git a/TAO/orbsvcs/orbsvcs/CosNotification.bor b/TAO/orbsvcs/orbsvcs/CosNotification.bor
index a8e8ed7aa25..7adec7020cc 100644
--- a/TAO/orbsvcs/orbsvcs/CosNotification.bor
+++ b/TAO/orbsvcs/orbsvcs/CosNotification.bor
@@ -1,4 +1,4 @@
-#$Id$
+$Id$
#
# Makefile for building the TAO CosNotification library
#
diff --git a/TAO/orbsvcs/orbsvcs/Makefile.RT_Notification b/TAO/orbsvcs/orbsvcs/Makefile.RT_Notification
new file mode 100644
index 00000000000..35fdf2983c3
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Makefile.RT_Notification
@@ -0,0 +1,46 @@
+#----------------------------------------------------------------------------
+# Macros
+#----------------------------------------------------------------------------
+ifndef TAO_ROOT
+ TAO_ROOT = $(ACE_ROOT)/TAO
+endif
+
+SOEXT = so
+MAKEFILE = Makefile.RT_Notification
+LIB = libTAO_RT_Notification.a
+SHLIB = libTAO_RT_Notification.$(SOEXT)
+CPPFLAGS += -KPIC
+IDL_FILES = AVStreams CosConcurrencyControl CosEventChannelAdmin CosEventComm CosLifeCycle CosLoadBalancing CosNaming CosNotification CosNotifyChannelAdmin CosNotifyComm CosNotifyFilter CosPropertyService CosTrading CosTradingRepos CosTradingDynamic DsEventLogAdmin DsLogAdmin DsLogNotification DsNotifyLogAdmin Event_Forwarder mgm FT_CORBA FT_CORBA_ORB LB_ORT LifeCycleService NotifyExt Null_MediaCtrl PortableGroup RTEventLogAdmin RtecBase RtecEventComm RtecDefaultEventData RtecEventChannelAdmin RtecScheduler RtecUDPAdmin SECIOP SSLIOP Security SecurityAdmin SecurityLevel1 SecurityLevel2 SecurityReplaceable TimeBase TimeService miop sfp
+IDL_SRC = AVStreamsC.cpp AVStreamsS.cpp CosConcurrencyControlC.cpp CosConcurrencyControlS.cpp CosEventChannelAdminC.cpp CosEventChannelAdminS.cpp CosEventCommC.cpp CosEventCommS.cpp CosLifeCycleC.cpp CosLifeCycleS.cpp CosLoadBalancingC.cpp CosLoadBalancingS.cpp CosNamingC.cpp CosNamingS.cpp CosNotificationC.cpp CosNotificationS.cpp CosNotifyChannelAdminC.cpp CosNotifyChannelAdminS.cpp CosNotifyCommC.cpp CosNotifyCommS.cpp CosNotifyFilterC.cpp CosNotifyFilterS.cpp CosPropertyServiceC.cpp CosPropertyServiceS.cpp CosTradingC.cpp CosTradingS.cpp CosTradingReposC.cpp CosTradingReposS.cpp CosTradingDynamicC.cpp CosTradingDynamicS.cpp DsEventLogAdminC.cpp DsEventLogAdminS.cpp DsLogAdminC.cpp DsLogAdminS.cpp DsLogNotificationC.cpp DsLogNotificationS.cpp DsNotifyLogAdminC.cpp DsNotifyLogAdminS.cpp Event_ForwarderC.cpp Event_ForwarderS.cpp mgmC.cpp mgmS.cpp FT_CORBAC.cpp FT_CORBAS.cpp FT_CORBA_ORBC.cpp FT_CORBA_ORBS.cpp LB_ORTC.cpp LB_ORTS.cpp LifeCycleServiceC.cpp LifeCycleServiceS.cpp NotifyExtC.cpp NotifyExtS.cpp Null_MediaCtrlC.cpp Null_MediaCtrlS.cpp PortableGroupC.cpp PortableGroupS.cpp RTEventLogAdminC.cpp RTEventLogAdminS.cpp RtecBaseC.cpp RtecBaseS.cpp RtecEventCommC.cpp RtecEventCommS.cpp RtecDefaultEventDataC.cpp RtecDefaultEventDataS.cpp RtecEventChannelAdminC.cpp RtecEventChannelAdminS.cpp RtecSchedulerC.cpp RtecSchedulerS.cpp RtecUDPAdminC.cpp RtecUDPAdminS.cpp SECIOPC.cpp SECIOPS.cpp SSLIOPC.cpp SSLIOPS.cpp SecurityC.cpp SecurityS.cpp SecurityAdminC.cpp SecurityAdminS.cpp SecurityLevel1C.cpp SecurityLevel1S.cpp SecurityLevel2C.cpp SecurityLevel2S.cpp SecurityReplaceableC.cpp SecurityReplaceableS.cpp TimeBaseC.cpp TimeBaseS.cpp TimeServiceC.cpp TimeServiceS.cpp miopC.cpp miopS.cpp sfpC.cpp sfpS.cpp
+SRC = AVStreamsC.cpp AVStreamsS.cpp CosConcurrencyControlC.cpp CosConcurrencyControlS.cpp CosEventChannelAdminC.cpp CosEventChannelAdminS.cpp CosEventCommC.cpp CosEventCommS.cpp CosLifeCycleC.cpp CosLifeCycleS.cpp CosLoadBalancingC.cpp CosLoadBalancingS.cpp CosNamingC.cpp CosNamingS.cpp CosNotificationC.cpp CosNotificationS.cpp CosNotifyChannelAdminC.cpp CosNotifyChannelAdminS.cpp CosNotifyCommC.cpp CosNotifyCommS.cpp CosNotifyFilterC.cpp CosNotifyFilterS.cpp CosPropertyServiceC.cpp CosPropertyServiceS.cpp CosTradingC.cpp CosTradingS.cpp CosTradingReposC.cpp CosTradingReposS.cpp CosTradingDynamicC.cpp CosTradingDynamicS.cpp DsEventLogAdminC.cpp DsEventLogAdminS.cpp DsLogAdminC.cpp DsLogAdminS.cpp DsLogNotificationC.cpp DsLogNotificationS.cpp DsNotifyLogAdminC.cpp DsNotifyLogAdminS.cpp Event_ForwarderC.cpp Event_ForwarderS.cpp mgmC.cpp mgmS.cpp FT_CORBAC.cpp FT_CORBAS.cpp FT_CORBA_ORBC.cpp FT_CORBA_ORBS.cpp LB_ORTC.cpp LB_ORTS.cpp LifeCycleServiceC.cpp LifeCycleServiceS.cpp NotifyExtC.cpp NotifyExtS.cpp Null_MediaCtrlC.cpp Null_MediaCtrlS.cpp PortableGroupC.cpp PortableGroupS.cpp RTEventLogAdminC.cpp RTEventLogAdminS.cpp RtecBaseC.cpp RtecBaseS.cpp RtecEventCommC.cpp RtecEventCommS.cpp RtecDefaultEventDataC.cpp RtecDefaultEventDataS.cpp RtecEventChannelAdminC.cpp RtecEventChannelAdminS.cpp RtecSchedulerC.cpp RtecSchedulerS.cpp RtecUDPAdminC.cpp RtecUDPAdminS.cpp SECIOPC.cpp SECIOPS.cpp SSLIOPC.cpp SSLIOPS.cpp SecurityC.cpp SecurityS.cpp SecurityAdminC.cpp SecurityAdminS.cpp SecurityLevel1C.cpp SecurityLevel1S.cpp SecurityLevel2C.cpp SecurityLevel2S.cpp SecurityReplaceableC.cpp SecurityReplaceableS.cpp TimeBaseC.cpp TimeBaseS.cpp TimeServiceC.cpp TimeServiceS.cpp miopC.cpp miopS.cpp sfpC.cpp sfpS.cpp Notify/RT_Builder.cpp Notify/RT_Factory.cpp Notify/RT_Notify_Service.cpp Notify/RT_POA_Helper.cpp Notify/RT_Properties.cpp
+OBJS = AVStreamsC.o AVStreamsS.o CosConcurrencyControlC.o CosConcurrencyControlS.o CosEventChannelAdminC.o CosEventChannelAdminS.o CosEventCommC.o CosEventCommS.o CosLifeCycleC.o CosLifeCycleS.o CosLoadBalancingC.o CosLoadBalancingS.o CosNamingC.o CosNamingS.o CosNotificationC.o CosNotificationS.o CosNotifyChannelAdminC.o CosNotifyChannelAdminS.o CosNotifyCommC.o CosNotifyCommS.o CosNotifyFilterC.o CosNotifyFilterS.o CosPropertyServiceC.o CosPropertyServiceS.o CosTradingC.o CosTradingS.o CosTradingReposC.o CosTradingReposS.o CosTradingDynamicC.o CosTradingDynamicS.o DsEventLogAdminC.o DsEventLogAdminS.o DsLogAdminC.o DsLogAdminS.o DsLogNotificationC.o DsLogNotificationS.o DsNotifyLogAdminC.o DsNotifyLogAdminS.o Event_ForwarderC.o Event_ForwarderS.o mgmC.o mgmS.o FT_CORBAC.o FT_CORBAS.o FT_CORBA_ORBC.o FT_CORBA_ORBS.o LB_ORTC.o LB_ORTS.o LifeCycleServiceC.o LifeCycleServiceS.o NotifyExtC.o NotifyExtS.o Null_MediaCtrlC.o Null_MediaCtrlS.o PortableGroupC.o PortableGroupS.o RTEventLogAdminC.o RTEventLogAdminS.o RtecBaseC.o RtecBaseS.o RtecEventCommC.o RtecEventCommS.o RtecDefaultEventDataC.o RtecDefaultEventDataS.o RtecEventChannelAdminC.o RtecEventChannelAdminS.o RtecSchedulerC.o RtecSchedulerS.o RtecUDPAdminC.o RtecUDPAdminS.o SECIOPC.o SECIOPS.o SSLIOPC.o SSLIOPS.o SecurityC.o SecurityS.o SecurityAdminC.o SecurityAdminS.o SecurityLevel1C.o SecurityLevel1S.o SecurityLevel2C.o SecurityLevel2S.o SecurityReplaceableC.o SecurityReplaceableS.o TimeBaseC.o TimeBaseS.o TimeServiceC.o TimeServiceS.o miopC.o miopS.o sfpC.o sfpS.o Notify/RT_Builder.o Notify/RT_Factory.o Notify/RT_Notify_Service.o Notify/RT_POA_Helper.o Notify/RT_Properties.o
+CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao -I$(ACE_ROOT)
+LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -L$(ACE_ROOT)/ace
+LDLIBS = -lTAO_CosNotification -lTAO_Svc_Utils -lTAO_ETCL -lTAO_DynamicAny -lTAO_PortableServer -lTAO -lACE
+SHFLAGS = -G
+OUTPUT_OPTION = -o $@
+
+#----------------------------------------------------------------------------
+# Local targets
+#----------------------------------------------------------------------------
+
+all: $(SHLIB)
+
+$(SHLIB): $(OBJS)
+ $(LINK.cc) $(SHFLAGS) $(OUTPUT_OPTION) $(OBJS) $(LDLIBS)
+
+$(LIB): $(OBJS)
+ $(AR) $(ARFLAGS) $(LIB) $(OBJS)
+
+%.o: %.cpp
+ $(COMPILE.cc) $< $(OUTPUT_OPTION)
+
+clean:
+ -$(RM) $(OBJS)
+
+realclean: clean
+ -$(RM) $(SHLIB) $(LIB)
+
+#----------------------------------------------------------------------------
+# Dependencies
+#----------------------------------------------------------------------------
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Admin.cpp b/TAO/orbsvcs/orbsvcs/Notify/Admin.cpp
index 6236246c655..9647c2aa451 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Admin.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Admin.cpp
@@ -8,52 +8,92 @@
ACE_RCSID(RT_Notify, TAO_NS_Admin, "$Id$")
-#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
#include "orbsvcs/CosNotifyChannelAdminC.h"
+#include "Container_T.h"
#include "Proxy.h"
#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
-TAO_NS_Admin::TAO_NS_Admin (ADMIN_TYPE type)
- :type_ (type), filter_operator_ (CosNotifyChannelAdmin::OR_OP)
+TAO_NS_Admin::TAO_NS_Admin (void)
+ : ec_ (0)
+ , proxy_container_ (0)
+ , filter_operator_ (CosNotifyChannelAdmin::OR_OP)
{
// Initialize all Admin objects to initially be subscribed for all events.
- // This is a reasonable default and is ewquired to allow Cos Event consumers/suppliers to send/receive events,
+ // This is a reasonable default and is required to allow Cos Event consumers/suppliers to send/receive events,
this->subscribed_types_.insert (TAO_NS_EventType::special ());
}
TAO_NS_Admin::~TAO_NS_Admin ()
{
+ this->ec_->_decr_refcnt ();
}
-
void
-TAO_NS_Admin::insert (TAO_NS_Proxy* proxy ACE_ENV_ARG_DECL)
+TAO_NS_Admin::init (TAO_NS_EventChannel *ec ACE_ENV_ARG_DECL)
{
- inherited::insert (proxy ACE_ENV_ARG_PARAMETER);
+ this->ec_ = ec;
+
+ this->ec_->_incr_refcnt ();
+
+ this->TAO_NS_Object::init (ec);
+
+ ACE_NEW_THROW_EX (this->proxy_container_,
+ TAO_NS_Proxy_Container (),
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
+ this->proxy_container_->init (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
- this->proxy_id_list_.insert (proxy->id ());
}
void
TAO_NS_Admin::remove (TAO_NS_Proxy* proxy ACE_ENV_ARG_DECL)
{
- inherited::remove (proxy ACE_ENV_ARG_PARAMETER);
+ this->proxy_container_->remove (proxy ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
-
- this->proxy_id_list_.remove (proxy->id ());
}
void
TAO_NS_Admin::subscribed_types (TAO_NS_EventTypeSeq& subscribed_types ACE_ENV_ARG_DECL)
{
ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
- CORBA::INTERNAL ());
+ CORBA::INTERNAL ());
ACE_CHECK;
// copy
subscribed_types = this->subscribed_types_;
}
+
+int
+TAO_NS_Admin::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (TAO_NS_Object::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return 1;
+
+ this->proxy_container_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (1);
+
+ delete this->proxy_container_;
+
+ return 0;
+}
+
+void
+TAO_NS_Admin::insert (TAO_NS_Proxy* proxy ACE_ENV_ARG_DECL)
+{
+ this->proxy_container_->insert (proxy ACE_ENV_ARG_PARAMETER);
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class TAO_ESF_Shutdown_Proxy<TAO_NS_Proxy>;
+template class TAO_NS_Container_T <TAO_NS_Proxy>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma TAO_ESF_Shutdown_Proxy<TAO_NS_Proxy>
+#pragma instantiate TAO_NS_Container_T <TAO_NS_Proxy>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Admin.h b/TAO/orbsvcs/orbsvcs/Notify/Admin.h
index 001707b4dcc..a456a774995 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Admin.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Admin.h
@@ -19,46 +19,42 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "Container_T.h"
#include "FilterAdmin.h"
#include "EventTypeSeq.h"
-#include "EventChannel.h"
+#include "Object.h"
class TAO_NS_Proxy;
class TAO_NS_EventChannel;
+template <class TYPE> class TAO_NS_Container_T;
/**
* @class TAO_NS_Admin
*
- * @brief
+ * @brief Base class for the ConsumerAdmin and SupplierAdmin.
*
*/
-class TAO_Notify_Export TAO_NS_Admin : public virtual TAO_NS_Container_T <TAO_NS_Proxy, TAO_NS_Admin, TAO_NS_EventChannel>
+class TAO_Notify_Export TAO_NS_Admin : public virtual TAO_NS_Object
{
+ friend class TAO_NS_Builder;
public:
- typedef ACE_Unbounded_Set <TAO_NS_Object_Id> TAO_NS_Object_Id_Seq;
-
- enum ADMIN_TYPE
- {
- CONSUMER_ADMIN,
- SUPPLIER_ADMIN
- };
+ typedef CosNotifyChannelAdmin::AdminIDSeq SEQ;
+ typedef CosNotifyChannelAdmin::AdminIDSeq_var SEQ_VAR;
/// Constuctor
- TAO_NS_Admin (ADMIN_TYPE type);
+ TAO_NS_Admin (void);
/// Destructor
~TAO_NS_Admin ();
- /// Insert object to this container.
- virtual void insert (TAO_NS_Proxy* proxy ACE_ENV_ARG_DECL);
+ /// Init
+ void init (TAO_NS_EventChannel *ec ACE_ENV_ARG_DECL);
- /// Remove type from container_
- virtual void remove (TAO_NS_Proxy* proxy ACE_ENV_ARG_DECL);
+ /// Insert the proxy in the <proxy_container_>.
+ void insert (TAO_NS_Proxy* proxy ACE_ENV_ARG_DECL);
- /// Return type.
- ADMIN_TYPE type (void);
+ /// Remove type from container_
+ void remove (TAO_NS_Proxy *proxy ACE_ENV_ARG_DECL);
/// Access Admin FilterAdmin.
TAO_NS_FilterAdmin& filter_admin (void);
@@ -72,15 +68,19 @@ public:
/// Obtain the Admin's subscribed types.
void subscribed_types (TAO_NS_EventTypeSeq& subscribed_types ACE_ENV_ARG_DECL);
+ /// Shutdown
+ virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
+
protected:
- typedef TAO_NS_Container_T <TAO_NS_Proxy, TAO_NS_Admin, TAO_NS_EventChannel> inherited;
+ typedef TAO_NS_Container_T <TAO_NS_Proxy> TAO_NS_Proxy_Container;
/// = Data Members
- /// List of proxy ID's
- TAO_NS_Object_Id_Seq proxy_id_list_;
- /// Type of Admin
- ADMIN_TYPE type_;
+ /// The EventChannel.
+ TAO_NS_EventChannel *ec_;
+
+ /// The Proxy Container.
+ TAO_NS_Proxy_Container *proxy_container_;
/// The types that we've subscribed our proxy objects with the event manager.
TAO_NS_EventTypeSeq subscribed_types_;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Admin.inl b/TAO/orbsvcs/orbsvcs/Notify/Admin.inl
index 814304a558d..2975697d92a 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Admin.inl
+++ b/TAO/orbsvcs/orbsvcs/Notify/Admin.inl
@@ -1,11 +1,5 @@
// $Id$
-ACE_INLINE TAO_NS_Admin::ADMIN_TYPE
-TAO_NS_Admin::type (void)
-{
- return this->type_;
-}
-
ACE_INLINE TAO_NS_FilterAdmin&
TAO_NS_Admin::filter_admin (void)
{
diff --git a/TAO/orbsvcs/orbsvcs/Notify/AdminProperties.h b/TAO/orbsvcs/orbsvcs/Notify/AdminProperties.h
index fe14835ab24..e05e06d2b1c 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/AdminProperties.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/AdminProperties.h
@@ -22,7 +22,6 @@
#include "ace/Atomic_Op.h"
#include "ace/Refcounted_Auto_Ptr.h"
#include "tao/orbconf.h"
-#include "Types.h"
#include "PropertySeq.h"
#include "Property_T.h"
#include "Property.h"
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.cpp
index a8f0fa35236..92576ba0b82 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.cpp
@@ -8,9 +8,7 @@
ACE_RCSID(Notify, TAO_NS_CosEC_ProxyPushConsumer, "$id$")
-#include "ace/Refcounted_Auto_Ptr.h"
#include "tao/debug.h"
-#include "../Admin.h"
#include "../AdminProperties.h"
#include "AnyEvent.h"
#include "PushSupplier.h"
@@ -36,7 +34,10 @@ TAO_NS_CosEC_ProxyPushConsumer::destroy (ACE_ENV_SINGLE_ARG_DECL)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "In TAO_NS_CosEC_ProxyPushConsumer::destroy \n"));
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
}
void
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h
index 780eb08aaa2..08b822c921f 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h
@@ -21,7 +21,6 @@
#include "orbsvcs/CosEventChannelAdminS.h"
#include "../ProxyConsumer_T.h"
-#include "../Destroy_Callback.h"
#if defined(_MSC_VER)
#if (_MSC_VER >= 1200)
@@ -36,7 +35,7 @@
* @brief
*
*/
-class TAO_Notify_Export TAO_NS_CosEC_ProxyPushConsumer : public virtual TAO_NS_ProxyConsumer_T <POA_CosEventChannelAdmin::ProxyPushConsumer>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_CosEC_ProxyPushConsumer : public virtual TAO_NS_ProxyConsumer_T <POA_CosEventChannelAdmin::ProxyPushConsumer>
{
friend class TAO_NS_Builder;
public:
@@ -46,7 +45,7 @@ public:
/// Destructor
~TAO_NS_CosEC_ProxyPushConsumer ();
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
/// Destroy this object.
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.cpp b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.cpp
index 401d9e8d604..c4c139cf9c8 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.cpp
@@ -10,12 +10,6 @@ ACE_RCSID(Notify, TAO_NS_CosEC_ProxyPushSupplier, "$id$")
#include "tao/debug.h"
#include "PushConsumer.h"
-#include "../Proxy.h"
-#include "../Admin.h"
-#include "../EventChannel.h"
-#include "../EventChannelFactory.h"
-#include "../Notify_Service.h"
-
TAO_NS_CosEC_ProxyPushSupplier::TAO_NS_CosEC_ProxyPushSupplier (void)
{
@@ -31,7 +25,10 @@ TAO_NS_CosEC_ProxyPushSupplier::destroy (ACE_ENV_SINGLE_ARG_DECL)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "In TAO_NS_ProxyPushConsumer::destroy \n"));
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
}
void
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.h b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.h
index a7a27dc3221..3f3a794e2b8 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.h
@@ -40,7 +40,7 @@ TAO_NS_ProxySupplier_T<POA_CosEventChannelAdmin::ProxyPushSupplier>;
* @brief
*
*/
-class TAO_Notify_Export TAO_NS_CosEC_ProxyPushSupplier : public virtual TAO_NS_ProxySupplier_T <POA_CosEventChannelAdmin::ProxyPushSupplier>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_CosEC_ProxyPushSupplier : public virtual TAO_NS_ProxySupplier_T <POA_CosEventChannelAdmin::ProxyPushSupplier>
{
friend class TAO_NS_Builder;
public:
@@ -53,7 +53,7 @@ public:
/// Destroy this object.
virtual void destroy (ACE_ENV_SINGLE_ARG_DECL);
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
// = Interface methods
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp
index 8b2ec3bb101..d09f50987a7 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp
@@ -8,9 +8,7 @@
ACE_RCSID(Notify, TAO_NS_ProxyPushConsumer, "$id$")
-#include "ace/Refcounted_Auto_Ptr.h"
#include "tao/debug.h"
-#include "../Admin.h"
#include "../AdminProperties.h"
#include "AnyEvent.h"
#include "PushSupplier.h"
@@ -39,7 +37,10 @@ TAO_NS_ProxyPushConsumer::destroy (ACE_ENV_SINGLE_ARG_DECL)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "In TAO_NS_ProxyPushConsumer::destroy \n"));
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
}
CosNotifyChannelAdmin::ProxyType
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.h
index 83eb801af1f..90a6fd5a7c4 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.h
@@ -21,7 +21,6 @@
#include "orbsvcs/CosNotifyChannelAdminS.h"
#include "../ProxyConsumer_T.h"
-#include "../Destroy_Callback.h"
#if defined(_MSC_VER)
#if (_MSC_VER >= 1200)
@@ -36,7 +35,7 @@
* @brief
*
*/
-class TAO_Notify_Export TAO_NS_ProxyPushConsumer : public virtual TAO_NS_ProxyConsumer_T <POA_CosNotifyChannelAdmin::ProxyPushConsumer>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_ProxyPushConsumer : public virtual TAO_NS_ProxyConsumer_T <POA_CosNotifyChannelAdmin::ProxyPushConsumer>
{
friend class TAO_NS_Builder;
public:
@@ -46,7 +45,7 @@ public:
/// Destructor
~TAO_NS_ProxyPushConsumer ();
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
/// Destroy this object.
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushSupplier.cpp b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushSupplier.cpp
index a430c6f0a1c..81612398502 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushSupplier.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushSupplier.cpp
@@ -10,12 +10,6 @@ ACE_RCSID(Notify, TAO_NS_ProxyPushSupplier, "$id$")
#include "tao/debug.h"
#include "PushConsumer.h"
-#include "../Proxy.h"
-#include "../Admin.h"
-#include "../EventChannel.h"
-#include "../EventChannelFactory.h"
-#include "../Notify_Service.h"
-
TAO_NS_ProxyPushSupplier::TAO_NS_ProxyPushSupplier (void)
{
@@ -31,7 +25,10 @@ TAO_NS_ProxyPushSupplier::destroy (ACE_ENV_SINGLE_ARG_DECL)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "In TAO_NS_ProxyPushConsumer::destroy \n"));
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
}
void
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushSupplier.h b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushSupplier.h
index 66a6f0de2d8..8d2e9bb8277 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushSupplier.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushSupplier.h
@@ -41,7 +41,7 @@ TAO_NS_ProxySupplier_T<POA_Event_Forwarder::ProxyPushSupplier>;
* @brief
*
*/
-class TAO_Notify_Export TAO_NS_ProxyPushSupplier : public virtual TAO_NS_ProxySupplier_T <POA_Event_Forwarder::ProxyPushSupplier>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_ProxyPushSupplier : public virtual TAO_NS_ProxySupplier_T <POA_Event_Forwarder::ProxyPushSupplier>
{
friend class TAO_NS_Builder;
public:
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.h
index 5660ddeee77..7a3d5c7ed39 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.h
@@ -21,7 +21,6 @@
#include "orbsvcs/CosNotifyCommC.h"
#include "../Consumer.h"
-#include "../Destroy_Callback.h"
/**
* @class TAO_NS_PushConsumer
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/PushSupplier.h b/TAO/orbsvcs/orbsvcs/Notify/Any/PushSupplier.h
index 3ba1c4fb2c0..be260eb1710 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/PushSupplier.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/PushSupplier.h
@@ -22,7 +22,6 @@
#include "orbsvcs/CosNotifyCommC.h"
#include "../Supplier.h"
-#include "../Destroy_Callback.h"
class TAO_NS_ProxyConsumer;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp b/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp
index f12a6ea898e..85262621eb9 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp
@@ -7,7 +7,6 @@
ACE_RCSID(RT_Notify, TAO_NS_Builder, "$Id$")
-#include "ace/Auto_Ptr.h"
#include "ace/Dynamic_Service.h"
#include "tao/PortableServer/PortableServerC.h"
#include "Factory.h"
@@ -24,7 +23,6 @@ ACE_RCSID(RT_Notify, TAO_NS_Builder, "$Id$")
#include "ThreadPool_Task.h"
#include "FilterFactory.h"
#include "Object.h"
-#include "Notify_Service.h"
#include "EventType.h"
#include "Event.h"
#include "Any/AnyEvent.h"
@@ -37,6 +35,105 @@ ACE_RCSID(RT_Notify, TAO_NS_Builder, "$Id$")
#include "Sequence/SequenceProxyPushConsumer.h"
#include "Sequence/SequenceProxyPushSupplier.h"
#include "ETCL_FilterFactory.h"
+#include "Container_T.h"
+
+template <class PROXY_IMPL, class PROXY, class PROXY_PTR, class PROXY_VAR, class PARENT>
+class TAO_NS_Proxy_Builder_T
+{
+public:
+ PROXY_PTR
+ build (PARENT *parent, CosNotifyChannelAdmin::ProxyID_out proxy_id
+ , const CosNotification::QoSProperties & initial_qos ACE_ENV_ARG_DECL)
+ {
+ PROXY_VAR proxy_ret;
+
+ TAO_NS_Factory* factory = TAO_NS_PROPERTIES::instance ()->factory ();
+
+ PROXY_IMPL* proxy = 0;
+ factory->create (proxy ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (proxy_ret._retn ());
+
+ PortableServer::ServantBase_var servant (proxy);
+
+ proxy->init (parent ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (proxy_ret._retn ());
+
+ proxy->set_qos (initial_qos ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (proxy_ret._retn ());
+
+ CORBA::Object_var obj = proxy->activate (proxy ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (proxy_ret._retn ());
+
+ proxy_id = proxy->id ();
+
+ proxy_ret = PROXY::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (proxy_ret._retn ());
+
+ // insert proxy in admin container.
+ parent->insert (proxy ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (PROXY::_nil ());
+
+ return proxy_ret._retn ();
+ }
+};
+
+// define the ProxyConsumer Builders.
+typedef TAO_NS_Proxy_Builder_T<TAO_NS_ProxyPushConsumer
+ , CosNotifyChannelAdmin::ProxyConsumer
+ , CosNotifyChannelAdmin::ProxyConsumer_ptr
+ , CosNotifyChannelAdmin::ProxyConsumer_var
+ , TAO_NS_SupplierAdmin>
+TAO_NS_ProxyPushConsumer_Builder;
+
+typedef TAO_NS_Proxy_Builder_T<TAO_NS_StructuredProxyPushConsumer
+ , CosNotifyChannelAdmin::ProxyConsumer
+ , CosNotifyChannelAdmin::ProxyConsumer_ptr
+ , CosNotifyChannelAdmin::ProxyConsumer_var
+ , TAO_NS_SupplierAdmin>
+TAO_NS_StructuredProxyPushConsumer_Builder;
+
+typedef TAO_NS_Proxy_Builder_T<TAO_NS_SequenceProxyPushConsumer
+ , CosNotifyChannelAdmin::ProxyConsumer
+ , CosNotifyChannelAdmin::ProxyConsumer_ptr
+ , CosNotifyChannelAdmin::ProxyConsumer_var
+ , TAO_NS_SupplierAdmin>
+TAO_NS_SequenceProxyPushConsumer_Builder;
+
+typedef TAO_NS_Proxy_Builder_T<TAO_NS_CosEC_ProxyPushConsumer
+ , CosEventChannelAdmin::ProxyPushConsumer
+ , CosEventChannelAdmin::ProxyPushConsumer_ptr
+ , CosEventChannelAdmin::ProxyPushConsumer_var
+ , TAO_NS_SupplierAdmin>
+TAO_NS_CosEC_ProxyPushConsumer_Builder;
+
+// define the ProxySupplier Builders.
+typedef TAO_NS_Proxy_Builder_T<TAO_NS_ProxyPushSupplier
+ , CosNotifyChannelAdmin::ProxySupplier
+ , CosNotifyChannelAdmin::ProxySupplier_ptr
+ , CosNotifyChannelAdmin::ProxySupplier_var
+ , TAO_NS_ConsumerAdmin>
+TAO_NS_ProxyPushSupplier_Builder;
+
+typedef TAO_NS_Proxy_Builder_T<TAO_NS_StructuredProxyPushSupplier
+ , CosNotifyChannelAdmin::ProxySupplier
+ , CosNotifyChannelAdmin::ProxySupplier_ptr
+ , CosNotifyChannelAdmin::ProxySupplier_var
+ , TAO_NS_ConsumerAdmin>
+TAO_NS_StructuredProxyPushSupplier_Builder;
+
+typedef TAO_NS_Proxy_Builder_T<TAO_NS_SequenceProxyPushSupplier
+ , CosNotifyChannelAdmin::ProxySupplier
+ , CosNotifyChannelAdmin::ProxySupplier_ptr
+ , CosNotifyChannelAdmin::ProxySupplier_var
+ , TAO_NS_ConsumerAdmin>
+TAO_NS_SequenceProxyPushSupplier_Builder;
+
+typedef TAO_NS_Proxy_Builder_T<TAO_NS_CosEC_ProxyPushSupplier
+ , CosEventChannelAdmin::ProxyPushSupplier
+ , CosEventChannelAdmin::ProxyPushSupplier_ptr
+ , CosEventChannelAdmin::ProxyPushSupplier_var
+ , TAO_NS_ConsumerAdmin>
+TAO_NS_CosEC_ProxyPushSupplier_Builder;
TAO_NS_Builder::TAO_NS_Builder (void)
{
@@ -61,7 +158,9 @@ TAO_NS_Builder::build_filter_factory (ACE_ENV_SINGLE_ARG_DECL)
ACE_CHECK_RETURN (CosNotifyFilter::FilterFactory::_nil ());
}
- return ff->create (ACE_ENV_SINGLE_ARG_PARAMETER);
+ PortableServer::POA_var default_poa = TAO_NS_PROPERTIES::instance ()->default_poa ();
+
+ return ff->create (default_poa ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::EventChannelFactory_ptr
@@ -71,43 +170,18 @@ TAO_NS_Builder::build_event_channel_factory (PortableServer::POA_ptr poa ACE_ENV
TAO_NS_Factory* factory = TAO_NS_PROPERTIES::instance ()->factory ();
- TAO_NS_POA_Helper* object_poa = 0;
- // Bootstrap initial Object POA
- ACE_NEW_THROW_EX (object_poa,
- TAO_NS_POA_Helper (),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (ecf_ret._retn ());
-
- auto_ptr<TAO_NS_POA_Helper> auto_object_poa (object_poa);
-
- object_poa->init (poa ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (ecf_ret._retn ());
-
// Create ECF
TAO_NS_EventChannelFactory* ecf = 0;
factory->create (ecf ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ecf_ret._retn ());
- ecf->TAO_NS_EventChannelFactory::init (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ecf->destroy_callback (ecf);
-
PortableServer::ServantBase_var servant_var (ecf);
- ecf->TAO_NS_Container_T <TAO_NS_EventChannel, TAO_NS_EventChannelFactory, TAO_NS_Notify_Service>::init (object_poa, 0, object_poa, object_poa);
+ ecf->TAO_NS_EventChannelFactory::init (poa ACE_ENV_ARG_PARAMETER);
- ecf->init_collection (ACE_ENV_SINGLE_ARG_PARAMETER);
+ CORBA::Object_var obj = ecf->activate (ecf ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ecf_ret._retn ());
- // Give ownership of object_poa
- ecf->object_poa (object_poa);
-
- CORBA::Object_var obj = ecf->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (ecf_ret._retn ());
-
- // release auto_ref.
- auto_object_poa.release ();
-
ecf_ret = CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ecf_ret._retn ());
@@ -116,11 +190,6 @@ TAO_NS_Builder::build_event_channel_factory (PortableServer::POA_ptr poa ACE_ENV
CosNotifyChannelAdmin::EventChannel_ptr
TAO_NS_Builder::build_event_channel (TAO_NS_EventChannelFactory* ecf, const CosNotification::QoSProperties & initial_qos, const CosNotification::AdminProperties & initial_admin, CosNotifyChannelAdmin::ChannelID_out id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- , CosNotification::UnsupportedQoS
- , CosNotification::UnsupportedAdmin
- ))
{
CosNotifyChannelAdmin::EventChannel_var ec_ret;
@@ -130,62 +199,21 @@ TAO_NS_Builder::build_event_channel (TAO_NS_EventChannelFactory* ecf, const CosN
factory->create (ec ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ec_ret._retn ());
- ec->destroy_callback (ec);
-
PortableServer::ServantBase_var servant_var (ec);
- TAO_NS_AdminProperties* admin_properties = 0;
-
- // set the admin properties.
- ACE_NEW_THROW_EX (admin_properties,
- TAO_NS_AdminProperties (),
- CORBA::NO_MEMORY ());
-
- ec->admin_properties_ = admin_properties;
-
- // set the parent -
- ec->parent_ = ecf;
- ec->parent_->_incr_refcnt ();
-
- ec->TAO_NS_Container::init (ecf->object_poa(), 0, ecf->object_poa(), ecf->object_poa());
-
- // proxy poa is set next.
- ec->init_collection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (ec_ret._retn ());
-
- // insert ec in ecf container.
- ecf->insert (ec ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (ec_ret._retn ());
-
- // create the event manager. @@ use factory
- ACE_NEW_THROW_EX (ec->event_manager_,
- TAO_NS_Event_Manager (),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (ec_ret._retn ());
-
- ec->event_manager_->init (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (ec_ret._retn ());
-
- const CosNotification::QoSProperties &default_ec_qos =
- TAO_NS_PROPERTIES::instance ()->default_event_channel_qos_properties ();
-
- ec->set_qos (default_ec_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (ec_ret._retn ());
-
- ec->set_qos (initial_qos ACE_ENV_ARG_PARAMETER);
+ ec->init (ecf, initial_qos, initial_admin ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ec_ret._retn ());
- ec->set_admin (initial_admin ACE_ENV_ARG_PARAMETER);
+ // insert ec in ec container.
+ ecf->ec_container_->insert (ec ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ec_ret._retn ());
- CORBA::Object_var obj = ec->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ CORBA::Object_var obj = ec->activate (ec ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ec_ret._retn ());
+ // Populate the ID to return.
id = ec->id ();
- // perform channel specific init
- ec->TAO_NS_EventChannel::init (ACE_ENV_SINGLE_ARG_PARAMETER);
-
ec_ret = CosNotifyChannelAdmin::EventChannel::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ec_ret._retn ());
@@ -194,9 +222,6 @@ TAO_NS_Builder::build_event_channel (TAO_NS_EventChannelFactory* ecf, const CosN
CosNotifyChannelAdmin::ConsumerAdmin_ptr
TAO_NS_Builder::build_consumer_admin (TAO_NS_EventChannel* ec, CosNotifyChannelAdmin::InterFilterGroupOperator op, CosNotifyChannelAdmin::AdminID_out id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
{
CosNotifyChannelAdmin::ConsumerAdmin_var ca_ret;
@@ -206,40 +231,23 @@ TAO_NS_Builder::build_consumer_admin (TAO_NS_EventChannel* ec, CosNotifyChannelA
factory->create (ca ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ca_ret._retn ());
- ca->destroy_callback (ca);
- ca->filter_operator (op);
-
- ca->parent_ = ec;
- ca->parent_->_incr_refcnt ();
- ca->event_manager_ = ec->event_manager_;
- ca->admin_properties_ = ec->admin_properties_;
-
PortableServer::ServantBase_var servant_var (ca);
- ca->init (ec->object_poa (), ec->worker_task (), ec->object_poa (), ec->proxy_poa ());
-
- ca->init_collection (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ca->init (ec ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ca_ret._retn ());
- // insert admin in ec container.
- ec->insert (ca ACE_ENV_ARG_PARAMETER);
+ ca->filter_operator (op);
- CORBA::Object_var obj = ca->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ CORBA::Object_var obj = ca->activate (ca ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ca_ret._retn ());
id = ca->id ();
- const CosNotification::QoSProperties &default_ca_qos =
- TAO_NS_PROPERTIES::instance ()->default_consumer_admin_qos_properties ();
-
- ca->set_qos (default_ca_qos ACE_ENV_ARG_PARAMETER);
+ ca_ret = CosNotifyChannelAdmin::ConsumerAdmin::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ca_ret._retn ());
- // Pass EC QoS
- ec->qos_properties_.transfer (ca->qos_properties_);
- ca->qos_changed (ca->qos_properties_);
-
- ca_ret = CosNotifyChannelAdmin::ConsumerAdmin::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
+ // insert admin in CA container.
+ ec->ca_container_->insert (ca ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (ca_ret._retn ());
return ca_ret._retn ();
@@ -247,9 +255,6 @@ TAO_NS_Builder::build_consumer_admin (TAO_NS_EventChannel* ec, CosNotifyChannelA
CosNotifyChannelAdmin::SupplierAdmin_ptr
TAO_NS_Builder::build_supplier_admin (TAO_NS_EventChannel* ec, CosNotifyChannelAdmin::InterFilterGroupOperator op, CosNotifyChannelAdmin::AdminID_out id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
{
CosNotifyChannelAdmin::SupplierAdmin_var sa_ret;
@@ -259,336 +264,91 @@ TAO_NS_Builder::build_supplier_admin (TAO_NS_EventChannel* ec, CosNotifyChannelA
factory->create (sa ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (sa_ret._retn ());
- sa->destroy_callback (sa);
- sa->filter_operator (op);
-
- sa->parent_ = ec;
- sa->parent_->_incr_refcnt ();
- sa->event_manager_ = ec->event_manager_;
- sa->admin_properties_ = ec->admin_properties_;
-
PortableServer::ServantBase_var servant_var (sa);
- sa->init (ec->object_poa (), ec->worker_task (), ec->object_poa (), ec->proxy_poa ());
-
- sa->init_collection (ACE_ENV_SINGLE_ARG_PARAMETER);
+ sa->init (ec ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (sa_ret._retn ());
- // insert admin in ec container.
- ec->insert (sa ACE_ENV_ARG_PARAMETER);
+ sa->filter_operator (op);
- CORBA::Object_var obj = sa->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ CORBA::Object_var obj = sa->activate (sa ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (sa_ret._retn ());
id = sa->id ();
- const CosNotification::QoSProperties &default_sa_qos =
- TAO_NS_PROPERTIES::instance ()->default_supplier_admin_qos_properties ();
-
- sa->set_qos (default_sa_qos ACE_ENV_ARG_PARAMETER);
+ sa_ret = CosNotifyChannelAdmin::SupplierAdmin::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (sa_ret._retn ());
- // Pass EC QoS
- ec->qos_properties_.transfer (sa->qos_properties_);
- sa->qos_changed (sa->qos_properties_);
-
- sa_ret = CosNotifyChannelAdmin::SupplierAdmin::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
+ // insert admin in SA container.
+ ec->sa_container_->insert (sa ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (sa_ret._retn ());
return sa_ret._retn ();
}
CosNotifyChannelAdmin::ProxyConsumer_ptr
-TAO_NS_Builder::build_notification_push_consumer (TAO_NS_SupplierAdmin* sa, CosNotifyChannelAdmin::ClientType ctype, CosNotifyChannelAdmin::ProxyID_out proxy_id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- , CosNotifyChannelAdmin::AdminLimitExceeded
- ))
-
+TAO_NS_Builder::build_proxy(TAO_NS_SupplierAdmin* sa
+ , CosNotifyChannelAdmin::ClientType ctype
+ , CosNotifyChannelAdmin::ProxyID_out proxy_id
+ , const CosNotification::QoSProperties & initial_qos
+ ACE_ENV_ARG_DECL)
{
- CosNotifyChannelAdmin::ProxyConsumer_var proxy_ret;
-
- TAO_NS_Factory* factory = TAO_NS_PROPERTIES::instance ()->factory ();
-
switch (ctype)
{
- case CosNotifyChannelAdmin::STRUCTURED_EVENT:
+ case CosNotifyChannelAdmin::ANY_EVENT:
{
- TAO_NS_StructuredProxyPushConsumer* pc = 0;
- factory->create (pc ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- pc->destroy_callback (pc);
-
- PortableServer::ServantBase_var servantbase_var (pc);
-
- pc->event_manager_ = sa->event_manager_;
- pc->admin_properties_ = sa->admin_properties_;
- pc->parent_ = sa;
- pc->parent_->_incr_refcnt ();
-
- /// self POA, proxy POA
- pc->init (sa->proxy_poa (), sa->proxy_poa (), sa->worker_task ());
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // insert proxy in admin container.
- sa->insert (pc ACE_ENV_ARG_PARAMETER);
-
- CORBA::Object_var obj = pc->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- proxy_id = pc->id ();
-
- const CosNotification::QoSProperties &default_pc_qos =
- TAO_NS_PROPERTIES::instance ()->default_proxy_consumer_qos_properties ();
-
- pc->set_qos (default_pc_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // Pass SA QoS
- sa->qos_properties_.transfer (pc->qos_properties_);
- pc->qos_changed (pc->qos_properties_);
-
- proxy_ret = CosNotifyChannelAdmin::ProxyConsumer::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
+ TAO_NS_ProxyPushConsumer_Builder pb;
+ return pb.build (sa, proxy_id, initial_qos ACE_ENV_ARG_PARAMETER);
}
- break;
+ break;
- case CosNotifyChannelAdmin::ANY_EVENT:
+ case CosNotifyChannelAdmin::STRUCTURED_EVENT:
{
- TAO_NS_ProxyPushConsumer* pc = 0;
- factory->create (pc ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- pc->destroy_callback (pc);
-
- PortableServer::ServantBase_var servantbase_var (pc);
-
- pc->event_manager_ = sa->event_manager_;
- pc->admin_properties_ = sa->admin_properties_;
- pc->parent_ = sa;
- pc->parent_->_incr_refcnt ();
-
- /// self POA, proxy POA
- pc->init (sa->proxy_poa (), sa->proxy_poa (), sa->worker_task ());
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // insert proxy in admin container.
- sa->insert (pc ACE_ENV_ARG_PARAMETER);
-
- CORBA::Object_var obj = pc->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- proxy_id = pc->id ();
-
- const CosNotification::QoSProperties &default_pc_qos =
- TAO_NS_PROPERTIES::instance ()->default_proxy_consumer_qos_properties ();
-
- pc->set_qos (default_pc_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // Pass SA QoS
- sa->qos_properties_.transfer (pc->qos_properties_);
- pc->qos_changed (pc->qos_properties_);
-
- proxy_ret = CosNotifyChannelAdmin::ProxyConsumer::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
+ TAO_NS_StructuredProxyPushConsumer_Builder pb;
+ return pb.build (sa, proxy_id, initial_qos ACE_ENV_ARG_PARAMETER);
}
break;
case CosNotifyChannelAdmin::SEQUENCE_EVENT:
- {
- TAO_NS_SequenceProxyPushConsumer* pc = 0;
- factory->create (pc ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- pc->destroy_callback (pc);
-
- PortableServer::ServantBase_var servantbase_var (pc);
-
- pc->event_manager_ = sa->event_manager_;
- pc->admin_properties_ = sa->admin_properties_;
- pc->parent_ = sa;
- pc->parent_->_incr_refcnt ();
-
- /// self POA, proxy POA
- pc->init (sa->proxy_poa (), sa->proxy_poa (), sa->worker_task ());
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // insert proxy in admin container.
- sa->insert (pc ACE_ENV_ARG_PARAMETER);
-
- CORBA::Object_var obj = pc->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- proxy_id = pc->id ();
-
- const CosNotification::QoSProperties &default_pc_qos =
- TAO_NS_PROPERTIES::instance ()->default_proxy_consumer_qos_properties ();
-
- pc->set_qos (default_pc_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // Pass SA QoS
- sa->qos_properties_.transfer (pc->qos_properties_);
- pc->qos_changed (pc->qos_properties_);
-
- proxy_ret = CosNotifyChannelAdmin::ProxyConsumer::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
- }
+ {
+ TAO_NS_SequenceProxyPushConsumer_Builder pb;
+ return pb.build (sa, proxy_id, initial_qos ACE_ENV_ARG_PARAMETER);
+ }
break;
default:
ACE_THROW_RETURN (CORBA::BAD_PARAM (),
CosNotifyChannelAdmin::ProxyConsumer::_nil ());
- }
-
- return proxy_ret._retn ();
+ }
}
-
CosNotifyChannelAdmin::ProxySupplier_ptr
-TAO_NS_Builder::build_notification_push_supplier (TAO_NS_ConsumerAdmin* ca, CosNotifyChannelAdmin::ClientType ctype, CosNotifyChannelAdmin::ProxyID_out proxy_id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- , CosNotifyChannelAdmin::AdminLimitExceeded
- ))
+TAO_NS_Builder::build_proxy(TAO_NS_ConsumerAdmin* ca
+ , CosNotifyChannelAdmin::ClientType ctype
+ , CosNotifyChannelAdmin::ProxyID_out proxy_id
+ , const CosNotification::QoSProperties & initial_qos
+ ACE_ENV_ARG_DECL)
{
- CosNotifyChannelAdmin::ProxySupplier_var proxy_ret;
-
- TAO_NS_Factory* factory = TAO_NS_PROPERTIES::instance ()->factory ();
-
switch (ctype)
{
case CosNotifyChannelAdmin::ANY_EVENT:
{
- TAO_NS_ProxyPushSupplier* ps = 0;
- factory->create (ps ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- ps->destroy_callback (ps);
-
- PortableServer::ServantBase_var servant (ps);
-
- ps->event_manager_ = ca->event_manager_;
- ps->admin_properties_ = ca->admin_properties_;
- ps->parent_ = ca;
- ps->parent_->_incr_refcnt ();
-
- /// self POA, proxy POA
- ps->init (ca->proxy_poa (), ca->proxy_poa (), ca->worker_task ());
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // insert proxy in admin container.
- ca->insert (ps ACE_ENV_ARG_PARAMETER);
-
- CORBA::Object_var obj = ps->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- proxy_id = ps->id ();
-
- ps->init_ps (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- const CosNotification::QoSProperties &default_ps_qos =
- TAO_NS_PROPERTIES::instance ()->default_proxy_supplier_qos_properties ();
-
- ps->set_qos (default_ps_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // Pass CA QoS
- ca->qos_properties_.transfer (ps->qos_properties_);
- ps->qos_changed (ps->qos_properties_);
-
- proxy_ret = CosNotifyChannelAdmin::ProxySupplier::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
+ TAO_NS_ProxyPushSupplier_Builder pb;
+ return pb.build (ca, proxy_id, initial_qos ACE_ENV_ARG_PARAMETER);
}
break;
case CosNotifyChannelAdmin::STRUCTURED_EVENT:
{
- TAO_NS_StructuredProxyPushSupplier* ps = 0;
- factory->create (ps ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- ps->destroy_callback (ps);
-
- PortableServer::ServantBase_var servant (ps);
-
- ps->event_manager_ = ca->event_manager_;
- ps->admin_properties_ = ca->admin_properties_;
- ps->parent_ = ca;
- ps->parent_->_incr_refcnt ();
-
- /// self POA, proxy POA
- ps->init (ca->proxy_poa (), ca->proxy_poa (), ca->worker_task ());
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // insert proxy in admin container.
- ca->insert (ps ACE_ENV_ARG_PARAMETER);
-
- CORBA::Object_var obj = ps->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- proxy_id = ps->id ();
-
- ps->init_ps (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- const CosNotification::QoSProperties &default_ps_qos =
- TAO_NS_PROPERTIES::instance ()->default_proxy_supplier_qos_properties ();
-
- ps->set_qos (default_ps_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // Pass CA QoS
- ca->qos_properties_.transfer (ps->qos_properties_);
- ps->qos_changed (ps->qos_properties_);
-
- proxy_ret = CosNotifyChannelAdmin::ProxySupplier::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
+ TAO_NS_StructuredProxyPushSupplier_Builder pb;
+ return pb.build (ca, proxy_id, initial_qos ACE_ENV_ARG_PARAMETER);
}
- break;
+ break;
case CosNotifyChannelAdmin::SEQUENCE_EVENT:
{
- TAO_NS_SequenceProxyPushSupplier* ps = 0;
- factory->create (ps ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- ps->destroy_callback (ps);
-
- PortableServer::ServantBase_var servant (ps);
-
- ps->event_manager_ = ca->event_manager_;
- ps->admin_properties_ = ca->admin_properties_;
- ps->parent_ = ca;
- ps->parent_->_incr_refcnt ();
-
- /// self POA, proxy POA
- ps->init (ca->proxy_poa (), ca->proxy_poa (), ca->worker_task ());
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // insert proxy in admin container.
- ca->insert (ps ACE_ENV_ARG_PARAMETER);
-
- CORBA::Object_var obj = ps->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- proxy_id = ps->id ();
-
- ps->init_ps (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- const CosNotification::QoSProperties &default_ps_qos =
- TAO_NS_PROPERTIES::instance ()->default_proxy_supplier_qos_properties ();
-
- ps->set_qos (default_ps_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // Pass CA QoS
- ca->qos_properties_.transfer (ps->qos_properties_);
- ps->qos_changed (ps->qos_properties_);
-
- proxy_ret = CosNotifyChannelAdmin::ProxySupplier::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
+ TAO_NS_SequenceProxyPushSupplier_Builder pb;
+ return pb.build (ca, proxy_id, initial_qos ACE_ENV_ARG_PARAMETER);
}
break;
@@ -596,108 +356,73 @@ TAO_NS_Builder::build_notification_push_supplier (TAO_NS_ConsumerAdmin* ca, CosN
ACE_THROW_RETURN (CORBA::BAD_PARAM (),
CosNotifyChannelAdmin::ProxySupplier::_nil ());
}
-
- return proxy_ret._retn ();
}
CosEventChannelAdmin::ProxyPushSupplier_ptr
-TAO_NS_Builder::build_push_supplier (TAO_NS_ConsumerAdmin* ca ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
+TAO_NS_Builder::build_proxy (TAO_NS_ConsumerAdmin* ca ACE_ENV_ARG_DECL)
{
- CosEventChannelAdmin::ProxyPushSupplier_var proxy_ret;
-
- TAO_NS_Factory* factory = TAO_NS_PROPERTIES::instance ()->factory ();
+ CosNotifyChannelAdmin::ProxyID proxy_id;
- TAO_NS_CosEC_ProxyPushSupplier* ps = 0;
- factory->create (ps ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
+ TAO_NS_CosEC_ProxyPushSupplier_Builder pb;
- ps->destroy_callback (ps);
+ CosNotification::QoSProperties initial_qos;
- PortableServer::ServantBase_var servant (ps);
-
- ps->event_manager_ = ca->event_manager_;
- ps->admin_properties_ = ca->admin_properties_;
- ps->parent_ = ca;
- ps->parent_->_incr_refcnt ();
-
- // self POA, proxy POA
- ps->init (ca->proxy_poa (), ca->proxy_poa (), ca->worker_task ());
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // insert proxy in admin container.
- ca->insert (ps ACE_ENV_ARG_PARAMETER);
-
- CORBA::Object_var obj = ps->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- ps->init_ps (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- const CosNotification::QoSProperties &default_ps_qos =
- TAO_NS_PROPERTIES::instance ()->default_proxy_supplier_qos_properties ();
-
- ps->set_qos (default_ps_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- // Pass CA QoS
- ca->qos_properties_.transfer (ps->qos_properties_);
- ps->qos_changed (ps->qos_properties_);
-
- proxy_ret = CosEventChannelAdmin::ProxyPushSupplier::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
-
- return proxy_ret._retn ();
+ return pb.build (ca, proxy_id, initial_qos ACE_ENV_ARG_PARAMETER);
}
CosEventChannelAdmin::ProxyPushConsumer_ptr
-TAO_NS_Builder::build_push_consumer (TAO_NS_SupplierAdmin* sa ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
+TAO_NS_Builder::build_proxy (TAO_NS_SupplierAdmin* sa ACE_ENV_ARG_DECL)
{
- CosEventChannelAdmin::ProxyPushConsumer_var proxy_ret;
+ CosNotifyChannelAdmin::ProxyID proxy_id;
- TAO_NS_Factory* factory = TAO_NS_PROPERTIES::instance ()->factory ();
+ TAO_NS_CosEC_ProxyPushConsumer_Builder pb;
- TAO_NS_CosEC_ProxyPushConsumer* pc = 0;
- factory->create (pc ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
+ CosNotification::QoSProperties initial_qos;
- pc->destroy_callback (pc);
+ return pb.build (sa, proxy_id, initial_qos ACE_ENV_ARG_PARAMETER);
+}
- PortableServer::ServantBase_var servantbase_var (pc);
+void
+TAO_NS_Builder::apply_reactive_concurrency (TAO_NS_Object& object ACE_ENV_ARG_DECL)
+{
+ TAO_NS_Reactive_Task* worker_task;
+
+ ACE_NEW_THROW_EX (worker_task,
+ TAO_NS_Reactive_Task (),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK;
- pc->event_manager_ = sa->event_manager_;
- pc->admin_properties_ = sa->admin_properties_;
- pc->parent_ = sa;
- pc->parent_->_incr_refcnt ();
+ worker_task->init (object.admin_properties_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
- // self POA, proxy POA
- pc->init (sa->proxy_poa (), sa->proxy_poa (), sa->worker_task ());
- ACE_CHECK_RETURN (proxy_ret._retn ());
+ object.worker_task_own (worker_task);
- // insert proxy in admin container.
- sa->insert (pc ACE_ENV_ARG_PARAMETER);
+ object.worker_task_->_decr_refcnt ();
+}
- CORBA::Object_var obj = pc->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
+void
+TAO_NS_Builder::apply_thread_pool_concurrency (TAO_NS_Object& object, const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL)
+{
+ TAO_NS_ThreadPool_Task* worker_task;
- const CosNotification::QoSProperties &default_pc_qos =
- TAO_NS_PROPERTIES::instance ()->default_proxy_consumer_qos_properties ();
+ ACE_NEW_THROW_EX (worker_task,
+ TAO_NS_ThreadPool_Task (),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK;
- pc->set_qos (default_pc_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
+ worker_task->init (tp_params, object.admin_properties_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
- // Pass SA QoS
- sa->qos_properties_.transfer (pc->qos_properties_);
- pc->qos_changed (pc->qos_properties_);
+ object.worker_task_own (worker_task);
- proxy_ret = CosEventChannelAdmin::ProxyPushConsumer::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (proxy_ret._retn ());
+ object.worker_task_->_decr_refcnt ();
+}
- return proxy_ret._retn ();
+void
+TAO_NS_Builder::apply_lane_concurrency (TAO_NS_Object& object, const NotifyExt::ThreadPoolLanesParams& /*tpl_params*/ ACE_ENV_ARG_DECL)
+{
+ // No lane support
+ ACE_THROW (CORBA::NO_IMPLEMENT ());
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Builder.h b/TAO/orbsvcs/orbsvcs/Notify/Builder.h
index f85e2816b69..cf668dc885f 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Builder.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Builder.h
@@ -44,49 +44,69 @@ public:
virtual ~TAO_NS_Builder ();
- ///= Factory Method
- CosNotifyChannelAdmin::EventChannelFactory_ptr build_event_channel_factory (PortableServer::POA_ptr poa ACE_ENV_ARG_DECL);
-
- CosNotifyChannelAdmin::EventChannel_ptr build_event_channel (TAO_NS_EventChannelFactory* ecf, const CosNotification::QoSProperties & initial_qos, const CosNotification::AdminProperties & initial_admin, CosNotifyChannelAdmin::ChannelID_out id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- , CosNotification::UnsupportedQoS
- , CosNotification::UnsupportedAdmin
- ));
-
- CosNotifyChannelAdmin::ConsumerAdmin_ptr build_consumer_admin (TAO_NS_EventChannel* ec, CosNotifyChannelAdmin::InterFilterGroupOperator op, CosNotifyChannelAdmin::AdminID_out id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::SupplierAdmin_ptr build_supplier_admin (TAO_NS_EventChannel* ec, CosNotifyChannelAdmin::InterFilterGroupOperator op, CosNotifyChannelAdmin::AdminID_out id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::ProxyConsumer_ptr build_notification_push_consumer (TAO_NS_SupplierAdmin* sa, CosNotifyChannelAdmin::ClientType ctype, CosNotifyChannelAdmin::ProxyID_out proxy_id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- , CosNotifyChannelAdmin::AdminLimitExceeded
- ));
-
- CosNotifyChannelAdmin::ProxySupplier_ptr build_notification_push_supplier (TAO_NS_ConsumerAdmin* ca, CosNotifyChannelAdmin::ClientType ctype, CosNotifyChannelAdmin::ProxyID_out proxy_id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- , CosNotifyChannelAdmin::AdminLimitExceeded
- ));
-
- CosNotifyFilter::FilterFactory_ptr build_filter_factory (ACE_ENV_SINGLE_ARG_DECL);
-
- CosEventChannelAdmin::ProxyPushSupplier_ptr build_push_supplier (TAO_NS_ConsumerAdmin* ca ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosEventChannelAdmin::ProxyPushConsumer_ptr build_push_consumer (TAO_NS_SupplierAdmin* sa ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
+ ///= Factory Methods
+
+ /// Build EventChannel Factory.
+ virtual CosNotifyChannelAdmin::EventChannelFactory_ptr
+ build_event_channel_factory (PortableServer::POA_ptr poa ACE_ENV_ARG_DECL);
+
+ /// Build the Filter Factory.
+ virtual CosNotifyFilter::FilterFactory_ptr build_filter_factory (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Build EventChannel.
+ virtual CosNotifyChannelAdmin::EventChannel_ptr
+ build_event_channel (TAO_NS_EventChannelFactory* ecf
+ , const CosNotification::QoSProperties & initial_qos
+ , const CosNotification::AdminProperties & initial_admin
+ , CosNotifyChannelAdmin::ChannelID_out id
+ ACE_ENV_ARG_DECL);
+
+ /// Build ConsumerAdmin
+ virtual CosNotifyChannelAdmin::ConsumerAdmin_ptr
+ build_consumer_admin (TAO_NS_EventChannel* ec
+ , CosNotifyChannelAdmin::InterFilterGroupOperator op
+ , CosNotifyChannelAdmin::AdminID_out id
+ ACE_ENV_ARG_DECL);
+
+ /// Build SupplierAdmin
+ virtual CosNotifyChannelAdmin::SupplierAdmin_ptr
+ build_supplier_admin (TAO_NS_EventChannel* ec
+ , CosNotifyChannelAdmin::InterFilterGroupOperator op
+ , CosNotifyChannelAdmin::AdminID_out id
+ ACE_ENV_ARG_DECL);
+
+ /// Build ProxyConsumer
+ virtual CosNotifyChannelAdmin::ProxyConsumer_ptr
+ build_proxy (TAO_NS_SupplierAdmin* sa
+ , CosNotifyChannelAdmin::ClientType ctype
+ , CosNotifyChannelAdmin::ProxyID_out proxy_id
+ , const CosNotification::QoSProperties & initial_qos
+ ACE_ENV_ARG_DECL);
+
+ /// Build ProxySupplier.
+ virtual CosNotifyChannelAdmin::ProxySupplier_ptr
+ build_proxy (TAO_NS_ConsumerAdmin* ca
+ , CosNotifyChannelAdmin::ClientType ctype
+ , CosNotifyChannelAdmin::ProxyID_out proxy_id
+ , const CosNotification::QoSProperties & initial_qos
+ ACE_ENV_ARG_DECL);
+
+ /// Build CosEC style ProxySupplier.
+ virtual CosEventChannelAdmin::ProxyPushSupplier_ptr
+ build_proxy (TAO_NS_ConsumerAdmin* ca ACE_ENV_ARG_DECL);
+
+ /// Build CosEC style ProxyConsumer.
+ virtual CosEventChannelAdmin::ProxyPushConsumer_ptr
+ build_proxy (TAO_NS_SupplierAdmin* sa ACE_ENV_ARG_DECL);
+
+ /// Apply Reactive concurrency.
+ virtual void apply_reactive_concurrency (TAO_NS_Object& object ACE_ENV_ARG_DECL);
+
+ /// Apply Thread Pools.
+ virtual void apply_thread_pool_concurrency (TAO_NS_Object& object, const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL);
+
+ /// Apply Thread Pools with Lanes.
+ virtual void apply_lane_concurrency (TAO_NS_Object& object, const NotifyExt::ThreadPoolLanesParams& tpl_params ACE_ENV_ARG_DECL);
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp
index 9924c38d391..2210c3ca7ad 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp
@@ -11,12 +11,6 @@ ACE_RCSID(RT_Notify, TAO_NS_Consumer, "$Id$")
#include "ace/Refcounted_Auto_Ptr.h"
#include "ace/Unbounded_Queue.h"
#include "tao/debug.h"
-#include "ProxySupplier.h"
-#include "Proxy.h"
-#include "Admin.h"
-#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
TAO_NS_Consumer::TAO_NS_Consumer (TAO_NS_ProxySupplier* proxy)
:proxy_ (proxy), event_collection_ (0), is_suspended_ (0)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Consumer.h b/TAO/orbsvcs/orbsvcs/Notify/Consumer.h
index 0a72eaadce0..9537e8f3398 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Consumer.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Consumer.h
@@ -23,7 +23,6 @@
#include "orbsvcs/CosNotificationC.h"
#include "Peer.h"
#include "Event.h"
-#include "Types.h"
class TAO_NS_ProxySupplier;
class TAO_NS_Proxy;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.cpp b/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.cpp
index dea48b705b0..e39392c49ef 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.cpp
@@ -8,18 +8,26 @@
ACE_RCSID(RT_Notify, TAO_NS_ConsumerAdmin, "$Id$")
+#include "ace/Auto_Ptr.h"
#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
-#include "Builder.h"
#include "Subscription_Change_Worker.h"
#include "Proxy.h"
-#include "Admin.h"
#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
#include "Properties.h"
+#include "Factory.h"
+#include "Builder.h"
+#include "Find_Worker_T.h"
+#include "Seq_Worker_T.h"
+
+typedef TAO_NS_Find_Worker_T<TAO_NS_Proxy
+ , CosNotifyChannelAdmin::ProxySupplier
+ , CosNotifyChannelAdmin::ProxySupplier_ptr
+ , CosNotifyChannelAdmin::ProxyNotFound>
+TAO_NS_ProxySupplier_Find_Worker;
+
+typedef TAO_NS_Seq_Worker_T<TAO_NS_Proxy> TAO_NS_Proxy_Seq_Worker;
TAO_NS_ConsumerAdmin::TAO_NS_ConsumerAdmin (void)
-:TAO_NS_Admin (TAO_NS_Admin::CONSUMER_ADMIN)
{
}
@@ -27,10 +35,16 @@ TAO_NS_ConsumerAdmin::~TAO_NS_ConsumerAdmin ()
{
}
-PortableServer::Servant
-TAO_NS_ConsumerAdmin::servant (void)
+void
+TAO_NS_ConsumerAdmin::init (TAO_NS_EventChannel *ec ACE_ENV_ARG_DECL)
{
- return this;
+ TAO_NS_Admin::init (ec ACE_ENV_ARG_PARAMETER);
+
+ const CosNotification::QoSProperties &default_ca_qos =
+ TAO_NS_PROPERTIES::instance ()->default_consumer_admin_qos_properties ();
+
+ this->set_qos (default_ca_qos ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
}
void
@@ -58,10 +72,16 @@ TAO_NS_ConsumerAdmin::destroy (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
+
+ this->ec_->remove (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
}
-::CosNotifyChannelAdmin::ProxySupplier_ptr
+CosNotifyChannelAdmin::ProxySupplier_ptr
TAO_NS_ConsumerAdmin::obtain_notification_push_supplier (CosNotifyChannelAdmin::ClientType ctype,
CosNotifyChannelAdmin::ProxyID_out proxy_id
ACE_ENV_ARG_DECL
@@ -71,9 +91,41 @@ TAO_NS_ConsumerAdmin::obtain_notification_push_supplier (CosNotifyChannelAdmin::
, CosNotifyChannelAdmin::AdminLimitExceeded
))
{
- return TAO_NS_PROPERTIES::instance()->builder ()->build_notification_push_supplier (this,
- ctype,
- proxy_id ACE_ENV_ARG_PARAMETER);
+ CosNotification::QoSProperties initial_qos;
+
+ return TAO_NS_PROPERTIES::instance()->builder()->build_proxy (this
+ , ctype
+ , proxy_id
+ , initial_qos
+ ACE_ENV_ARG_PARAMETER);
+}
+
+CosNotifyChannelAdmin::ProxySupplier_ptr
+TAO_NS_ConsumerAdmin::obtain_notification_push_supplier_with_qos (CosNotifyChannelAdmin::ClientType ctype,
+ CosNotifyChannelAdmin::ProxyID_out proxy_id,
+ const CosNotification::QoSProperties & initial_qos
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ , CosNotifyChannelAdmin::AdminLimitExceeded
+ , CosNotification::UnsupportedQoS
+ ))
+{
+ return TAO_NS_PROPERTIES::instance()->builder()->build_proxy (this
+ , ctype
+ , proxy_id
+ , initial_qos
+ ACE_ENV_ARG_PARAMETER);
+}
+
+CosEventChannelAdmin::ProxyPushSupplier_ptr
+TAO_NS_ConsumerAdmin::obtain_push_supplier (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ return TAO_NS_PROPERTIES::instance()->builder()->build_proxy (this ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::AdminID
@@ -91,10 +143,7 @@ TAO_NS_ConsumerAdmin::MyChannel (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- CORBA::Object_var object = this->parent_->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil ());
-
- return CosNotifyChannelAdmin::EventChannel::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ return this->ec_->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
}
::CosNotifyChannelAdmin::InterFilterGroupOperator
@@ -112,25 +161,9 @@ TAO_NS_ConsumerAdmin::push_suppliers (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- CosNotifyChannelAdmin::ProxyIDSeq* seq_ptr;
-
- ACE_NEW_THROW_EX (seq_ptr,
- CosNotifyChannelAdmin::ProxyIDSeq (),
- CORBA::NO_MEMORY ());
-
- CosNotifyChannelAdmin::ProxyIDSeq_var seq (seq_ptr);
-
- seq->length (this->proxy_id_list_.size ());
-
- TAO_NS_EventChannelFactory::TAO_NS_Object_Id_Seq::CONST_ITERATOR iter (this->proxy_id_list_);
+ TAO_NS_Proxy_Seq_Worker seq_worker;
- TAO_NS_Object_Id* object_id;
-
- CORBA::ULong i = 0;
- for (iter.first (); iter.next (object_id); iter.advance (), ++i)
- seq[i] = *object_id;
-
- return seq._retn ();
+ return seq_worker.create (*this->proxy_container_ ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::ProxySupplier_ptr
@@ -140,27 +173,9 @@ TAO_NS_ConsumerAdmin::get_proxy_supplier (CosNotifyChannelAdmin::ProxyID proxy_i
, CosNotifyChannelAdmin::ProxyNotFound
))
{
- TAO_NS_Object* ns_object = this->find (proxy_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxySupplier::_nil ());
-
- if (ns_object != 0)
- {
- CORBA::Object_var object = ns_object->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxySupplier::_nil ());
-
- return CosNotifyChannelAdmin::ProxySupplier::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- }
- else
- ACE_THROW_RETURN (CosNotifyChannelAdmin::ProxyNotFound (), CosNotifyChannelAdmin::ProxySupplier::_nil ());
-}
+ TAO_NS_ProxySupplier_Find_Worker find_worker;
-CosEventChannelAdmin::ProxyPushSupplier_ptr
-TAO_NS_ConsumerAdmin::obtain_push_supplier (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return TAO_NS_PROPERTIES::instance()->builder ()->build_push_supplier (this ACE_ENV_ARG_PARAMETER);
+ return find_worker.resolve (proxy_id, *this->proxy_container_ ACE_ENV_ARG_PARAMETER);
}
void TAO_NS_ConsumerAdmin::set_qos (const CosNotification::QoSProperties & qos ACE_ENV_ARG_DECL)
@@ -201,11 +216,11 @@ TAO_NS_ConsumerAdmin::subscription_change (const CosNotification::EventTypeSeq &
ACE_CHECK;
this->subscribed_types_.init (seq_added, seq_removed);
- }
- TAO_NS_Subscription_Change_Worker worker (added, removed);
+ TAO_NS_Subscription_Change_Worker worker (added, removed);
- this->collection_->for_each (&worker ACE_ENV_ARG_PARAMETER);
+ this->proxy_container_->collection()->for_each (&worker ACE_ENV_ARG_PARAMETER);
+ }
}
CosNotifyFilter::FilterID
@@ -338,3 +353,19 @@ TAO_NS_ConsumerAdmin::obtain_pull_supplier (ACE_ENV_SINGLE_ARG_DECL)
{
ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosEventChannelAdmin::ProxyPullSupplier::_nil ());
}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class TAO_NS_Find_Worker_T<TAO_NS_Proxy
+ , CosNotifyChannelAdmin::ProxySupplier
+ , CosNotifyChannelAdmin::ProxySupplier_ptr
+ , CosNotifyChannelAdmin::ProxyNotFound>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate TAO_NS_Find_Worker_T<TAO_NS_Proxy
+ , CosNotifyChannelAdmin::ProxySupplier
+ , CosNotifyChannelAdmin::ProxySupplier_ptr
+ , CosNotifyChannelAdmin::ProxyNotFound>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.h b/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.h
index 32470332213..3cc245baf8f 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.h
@@ -19,9 +19,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "orbsvcs/CosNotifyChannelAdminS.h"
+#include "orbsvcs/NotifyExtS.h"
#include "Admin.h"
-#include "Destroy_Callback.h"
#if defined(_MSC_VER)
#if (_MSC_VER >= 1200)
@@ -36,29 +35,41 @@
* @brief Implementation of CosNotifyChannelAdmin::ConsumerAdmin
*
*/
-class TAO_Notify_Export TAO_NS_ConsumerAdmin : public POA_CosNotifyChannelAdmin::ConsumerAdmin, public virtual TAO_NS_Admin, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_ConsumerAdmin : public POA_NotifyExt::ConsumerAdmin
+ , public virtual TAO_NS_Admin
{
- friend class TAO_NS_Builder;
public:
-
/// Constuctor
TAO_NS_ConsumerAdmin (void);
/// Destructor
~TAO_NS_ConsumerAdmin ();
- /// Return servant
- virtual PortableServer::Servant servant (void);
+ /// Init
+ void init (TAO_NS_EventChannel *ec ACE_ENV_ARG_DECL);
/// ServantBase refcount methods.
virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL);
virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL);
- /// TAO_NS_Destroy_Callback methods
+ /// Release this object.
virtual void release (void);
protected:
+ /// = NotifyExt::ConsumerAdmin methods
+ virtual CosNotifyChannelAdmin::ProxySupplier_ptr
+ obtain_notification_push_supplier_with_qos (CosNotifyChannelAdmin::ClientType ctype,
+ CosNotifyChannelAdmin::ProxyID_out proxy_id,
+ const CosNotification::QoSProperties & initial_qos
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ , CosNotifyChannelAdmin::AdminLimitExceeded
+ , CosNotification::UnsupportedQoS
+ ));
+
/// = CosNotifyChannelAdmin::ConsumerAdmin methods
virtual CosNotifyChannelAdmin::AdminID MyID (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
@@ -117,17 +128,19 @@ protected:
, CosNotifyChannelAdmin::ProxyNotFound
));
- virtual ::CosNotifyChannelAdmin::ProxySupplier_ptr obtain_notification_pull_supplier (CosNotifyChannelAdmin::ClientType ctype,
- CosNotifyChannelAdmin::ProxyID_out proxy_id
- ACE_ENV_ARG_DECL)
+ virtual ::CosNotifyChannelAdmin::ProxySupplier_ptr
+ obtain_notification_pull_supplier (CosNotifyChannelAdmin::ClientType ctype,
+ CosNotifyChannelAdmin::ProxyID_out proxy_id
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
, CosNotifyChannelAdmin::AdminLimitExceeded
));
- virtual ::CosNotifyChannelAdmin::ProxySupplier_ptr obtain_notification_push_supplier (CosNotifyChannelAdmin::ClientType ctype,
- CosNotifyChannelAdmin::ProxyID_out proxy_id
- ACE_ENV_ARG_DECL)
+ virtual ::CosNotifyChannelAdmin::ProxySupplier_ptr
+ obtain_notification_push_supplier (CosNotifyChannelAdmin::ClientType ctype,
+ CosNotifyChannelAdmin::ProxyID_out proxy_id
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
, CosNotifyChannelAdmin::AdminLimitExceeded
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Container_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Container_T.cpp
index 3004d23da45..ad43477e2da 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Container_T.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Container_T.cpp
@@ -17,64 +17,40 @@
ACE_RCSID(RT_Notify, TAO_NS_Container_T, "$Id$")
-/*************************************************************************************************/
-
-template<class OBJECT>
-TAO_NS_Object_Find_Worker_T<OBJECT>::TAO_NS_Object_Find_Worker_T (CORBA::Long id)
- :id_ (id), result_ (0)
-{
-}
-
-/*************************************************************************************************/
-
-template<class TYPE, class OBJECT, class PARENT>
-TAO_NS_Container_T<TYPE, OBJECT, PARENT>::TAO_NS_Container_T (void)
+template<class TYPE>
+TAO_NS_Container_T<TYPE>::TAO_NS_Container_T (void)
: collection_ (0)
{
}
-template<class TYPE, class OBJECT, class PARENT>
-TAO_NS_Container_T<TYPE, OBJECT, PARENT>::~TAO_NS_Container_T ()
+template<class TYPE>
+TAO_NS_Container_T<TYPE>::~TAO_NS_Container_T ()
{
+ delete collection_;
}
-template <class TYPE, class OBJECT, class PARENT> int
-TAO_NS_Container_T<TYPE, OBJECT, PARENT>::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+template <class TYPE> void
+TAO_NS_Container_T<TYPE>::shutdown (ACE_ENV_SINGLE_ARG_DECL)
{
- // shutdown baseclass.
- if (TAO_NS_Object_T<OBJECT, PARENT>::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
- return 1;
-
- ACE_CHECK_RETURN (1);
-
- // First inform the children.
TAO_ESF_Shutdown_Proxy<TYPE> shutdown_worker;
this->collection_->for_each (&shutdown_worker ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (1);
-
- /// shutdown Container
- this->cleanup (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- delete collection_;
-
- return 0;
}
-template<class TYPE, class OBJECT, class PARENT> void
-TAO_NS_Container_T<TYPE, OBJECT, PARENT>::insert (TYPE* type ACE_ENV_ARG_DECL)
+template<class TYPE> void
+TAO_NS_Container_T<TYPE>::insert (TYPE* type ACE_ENV_ARG_DECL)
{
this->collection_->connected (type ACE_ENV_ARG_PARAMETER);
}
-template<class TYPE, class OBJECT, class PARENT> void
-TAO_NS_Container_T<TYPE, OBJECT, PARENT>::remove (TYPE* type ACE_ENV_ARG_DECL)
+template<class TYPE> void
+TAO_NS_Container_T<TYPE>::remove (TYPE* type ACE_ENV_ARG_DECL)
{
this->collection_->disconnected (type ACE_ENV_ARG_PARAMETER);
}
-template<class TYPE, class OBJECT, class PARENT> void
-TAO_NS_Container_T<TYPE, OBJECT, PARENT>::init_collection (ACE_ENV_SINGLE_ARG_DECL)
+template<class TYPE> void
+TAO_NS_Container_T<TYPE>::init (ACE_ENV_SINGLE_ARG_DECL)
{
// get the factory
TAO_NS_Factory* factory = TAO_NS_PROPERTIES::instance ()->factory ();
@@ -82,4 +58,5 @@ TAO_NS_Container_T<TYPE, OBJECT, PARENT>::init_collection (ACE_ENV_SINGLE_ARG_DE
// Init variables
factory->create (this->collection_ ACE_ENV_ARG_PARAMETER);
}
+
#endif /* TAO_NS_CONTAINER_T_CPP */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Container_T.h b/TAO/orbsvcs/orbsvcs/Notify/Container_T.h
index 39f2c88677f..003bcf55a7d 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Container_T.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Container_T.h
@@ -19,76 +19,43 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "Container.h"
-#include "Object_T.h"
-#include "orbsvcs/ESF/ESF_Worker.h"
-
-/**
- * @class TAO_NS_Container_T
- *
- * @brief
- *
- */
-template <class OBJECT>
-class TAO_Notify_Export TAO_NS_Object_Find_Worker_T : public TAO_ESF_Worker<OBJECT>
-{
- typedef TAO_ESF_Proxy_Collection<OBJECT> COLLECTION;
-
-public:
- /// Constructor
- TAO_NS_Object_Find_Worker_T (TAO_NS_Object_Id id);
-
- /// Find
- OBJECT* find (COLLECTION* collection ACE_ENV_ARG_DECL);
-
-protected:
- ///= TAO_ESF_Worker method
- void work (OBJECT* object ACE_ENV_ARG_DECL);
-
- /// The id we're looking for.
- TAO_NS_Object_Id id_;
-
- /// The result
- OBJECT* result_;
-};
+#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
/**
* @class TAO_NS_Container_T
*
* @brief A template class that manages a collection.
- * TYPE = type of collection, OBJECT = the object, PARENT = parent of object (grandparent of TYPE)
+ * TYPE = type of collection
*
*/
-template <class TYPE, class OBJECT, class PARENT>
-class TAO_Notify_Export TAO_NS_Container_T : public virtual TAO_NS_Object_T<OBJECT, PARENT>, public virtual TAO_NS_Container
+template <class TYPE>
+class TAO_Notify_Export TAO_NS_Container_T
{
- typedef TAO_NS_Object_Find_Worker_T<TYPE> FIND_WORKER;
+ typedef TAO_ESF_Proxy_Collection<TYPE> COLLECTION;
+ public:
-public:
/// Constuctor
TAO_NS_Container_T (void);
/// Destructor
virtual ~TAO_NS_Container_T ();
+ /// Init this object.
+ void init (ACE_ENV_SINGLE_ARG_DECL);
+
/// Insert object to this container.
virtual void insert (TYPE* type ACE_ENV_ARG_DECL);
/// Remove type from container_
virtual void remove (TYPE* type ACE_ENV_ARG_DECL);
- /// Find the Type.
- TYPE* find (TAO_NS_Object_Id id ACE_ENV_ARG_DECL);
-
- /// Init this object.
- void init_collection (ACE_ENV_SINGLE_ARG_DECL);
-
/// Shutdown
- virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
+ virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL);
-protected:
- typedef TAO_ESF_Proxy_Collection<TYPE> COLLECTION;
+ /// Collection
+ COLLECTION* collection (void);
+protected:
/// The collection data structure that we add objects to.
COLLECTION* collection_;
};
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Container_T.inl b/TAO/orbsvcs/orbsvcs/Notify/Container_T.inl
index 3f986686772..8d692d555bc 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Container_T.inl
+++ b/TAO/orbsvcs/orbsvcs/Notify/Container_T.inl
@@ -1,27 +1,7 @@
// $Id$
-/*************************************************************************************************/
-
-template<class OBJECT> ACE_INLINE OBJECT*
-TAO_NS_Object_Find_Worker_T<OBJECT>::find ( ACE_TYPENAME TAO_NS_Object_Find_Worker_T::COLLECTION* collection ACE_ENV_ARG_DECL)
+template<class TYPE> ACE_INLINE ACE_TYPENAME TAO_NS_Container_T<TYPE>::COLLECTION*
+TAO_NS_Container_T<TYPE>:: collection (void)
{
- collection->for_each (this ACE_ENV_ARG_PARAMETER);
- return this->result_;
-}
-
-template<class OBJECT> ACE_INLINE void
-TAO_NS_Object_Find_Worker_T<OBJECT>::work (OBJECT* object ACE_ENV_ARG_DECL_NOT_USED)
-{
- if (object->id () == this->id_)
- this->result_ = object;
-}
-
-/*************************************************************************************************/
-
-template<class TYPE, class OBJECT, class PARENT> ACE_INLINE TYPE*
-TAO_NS_Container_T<TYPE, OBJECT, PARENT>::find (TAO_NS_Object_Id id ACE_ENV_ARG_DECL)
-{
- FIND_WORKER find_worker (id);
-
- return find_worker.find (this->collection_ ACE_ENV_ARG_PARAMETER);
+ return this->collection_;
}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Initializer.cpp b/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Initializer.cpp
index 7794ee10956..326efa455fd 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Initializer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Initializer.cpp
@@ -4,10 +4,10 @@
ACE_RCSID(Notify, TAO_NS_CosNotify_Initializer, "$id$")
-#include "Notify_Service.h"
+#include "CosNotify_Service.h"
TAO_NS_CosNotify_Initializer::TAO_NS_CosNotify_Initializer (void)
{
- ACE_Service_Config::static_svcs ()->insert (&ace_svc_desc_TAO_NS_Notify_Service);
+ ACE_Service_Config::static_svcs ()->insert (&ace_svc_desc_TAO_CosNotify_Service);
ACE_Service_Config::static_svcs ()->insert (&ace_svc_desc_TAO_Notify_Default_EMO_Factory_OLD);
}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp
index df575458c46..244cd57d7f5 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp
@@ -13,19 +13,28 @@ ACE_RCSID(Notify, TAO_ETCL_Filter, "$id$")
#include "Notify_Constraint_Visitors.h"
TAO_NS_ETCL_Filter::TAO_NS_ETCL_Filter (void)
+ :constraint_expr_ids_ (0)
{
}
TAO_NS_ETCL_Filter::~TAO_NS_ETCL_Filter ()
{
- ACE_DECLARE_NEW_CORBA_ENV;
- this->remove_all_constraints (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (TAO_debug_level > 0)
+ ACE_TRY_NEW_ENV
{
- ACE_DEBUG ((LM_DEBUG, "Filter Destroyed\n"));
+ this->remove_all_constraints (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ if (TAO_debug_level)
+ ACE_DEBUG ((LM_DEBUG, "Error in Filter dtor\n"));
+
+ // @@ eat exception.
}
+ ACE_ENDTRY;
+
+ if (TAO_debug_level > 1)
+ ACE_DEBUG ((LM_DEBUG, "Filter Destroyed\n"));
}
char*
@@ -39,55 +48,40 @@ TAO_NS_ETCL_Filter::constraint_grammar (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
void
TAO_NS_ETCL_Filter::add_constraints_i (const CosNotifyFilter::ConstraintInfoSeq& constraint_info_seq
- ACE_ENV_ARG_DECL
- )
+ ACE_ENV_ARG_DECL
+ )
ACE_THROW_SPEC ((
CORBA::SystemException,
CosNotifyFilter::InvalidConstraint
))
{
- for (CORBA::ULong index = 0;
- index < constraint_info_seq.length ();
- ++index)
+ for (CORBA::ULong index = 0; index < constraint_info_seq.length (); ++index)
{
TAO_NS_Constraint_Expr* notify_constr_expr;
- ACE_TRY
- {
- ACE_NEW_THROW_EX (notify_constr_expr,
- TAO_NS_Constraint_Expr (),
- CORBA::NO_MEMORY ());
+ ACE_NEW_THROW_EX (notify_constr_expr,
+ TAO_NS_Constraint_Expr (),
+ CORBA::NO_MEMORY ());
+ auto_ptr <TAO_NS_Constraint_Expr> auto_expr (notify_constr_expr);
- const CosNotifyFilter::ConstraintExp& expr =
- constraint_info_seq[index].constraint_expression;
+ const CosNotifyFilter::ConstraintExp& expr =
+ constraint_info_seq[index].constraint_expression;
- notify_constr_expr->interpreter.build_tree (
- expr.constraint_expr.in ()
- ACE_ENV_ARG_PARAMETER
- );
- ACE_TRY_CHECK;
+ notify_constr_expr->interpreter.
+ build_tree (expr.constraint_expr.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
- notify_constr_expr->constr_expr = expr;
+ notify_constr_expr->constr_expr = expr;
- CosNotifyFilter::ConstraintID cnstr_id = ++constraint_expr_ids_;
+ CosNotifyFilter::ConstraintID cnstr_id = ++constraint_expr_ids_;
- if (this->constraint_expr_list_.bind (cnstr_id, notify_constr_expr)
- == -1)
- {
- ACE_THROW (CORBA::NO_RESOURCES ());
- }
+ if (this->constraint_expr_list_.bind (cnstr_id, notify_constr_expr) == -1)
+ ACE_THROW (CORBA::INTERNAL ());
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Added constraint to filter %x\n", this, expr.constraint_expr.in ()));
- }
- ACE_CATCHANY
- {
- // Delete the one that failed us.
- delete notify_constr_expr;
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
+ if (TAO_debug_level > 1)
+ ACE_DEBUG ((LM_DEBUG, "Added constraint to filter %x\n", this, expr.constraint_expr.in ()));
+
+ auto_expr.release ();
}
}
@@ -100,30 +94,30 @@ TAO_NS_ETCL_Filter::add_constraints (const CosNotifyFilter::ConstraintExpSeq& co
CosNotifyFilter::InvalidConstraint
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
CORBA::ULong constraint_length = constraint_list.length ();
if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "constraint_length = %d\n",
+ ACE_DEBUG ((LM_DEBUG, "constraint_length = %d\n",
constraint_length));
- }
// Create the list that goes out.
- CosNotifyFilter::ConstraintInfoSeq *infoseq;
- ACE_NEW_THROW_EX (infoseq,
+ CosNotifyFilter::ConstraintInfoSeq* infoseq_ptr;
+ ACE_NEW_THROW_EX (infoseq_ptr,
CosNotifyFilter::ConstraintInfoSeq (constraint_length),
CORBA::NO_MEMORY ());
ACE_CHECK_RETURN (0);
+ CosNotifyFilter::ConstraintInfoSeq_var infoseq (infoseq_ptr);
infoseq->length (constraint_length);
- auto_ptr<CosNotifyFilter::ConstraintInfoSeq> auto_infoseq (infoseq);
-
// Populate infoseq.
for (CORBA::ULong pop_index = 0; pop_index < constraint_length; ++pop_index)
{
- (*infoseq)[pop_index].constraint_expression =
+ infoseq[pop_index].constraint_expression =
constraint_list [pop_index];
if (TAO_debug_level > 0)
@@ -135,13 +129,10 @@ TAO_NS_ETCL_Filter::add_constraints (const CosNotifyFilter::ConstraintExpSeq& co
}
}
- this->add_constraints_i (*infoseq
- ACE_ENV_ARG_PARAMETER);
+ this->add_constraints_i (infoseq.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- auto_infoseq.release ();
-
- return infoseq;
+ return infoseq._retn ();
}
void
@@ -155,6 +146,10 @@ TAO_NS_ETCL_Filter::modify_constraints (const CosNotifyFilter::ConstraintIDSeq &
CosNotifyFilter::ConstraintNotFound
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
// First check if all the ids are valid.
u_int index;
@@ -230,21 +225,25 @@ TAO_NS_ETCL_Filter::modify_constraints (const CosNotifyFilter::ConstraintIDSeq &
}
}
-CosNotifyFilter::ConstraintInfoSeq *
+CosNotifyFilter::ConstraintInfoSeq*
TAO_NS_ETCL_Filter::get_constraints (const CosNotifyFilter::ConstraintIDSeq & id_list
ACE_ENV_ARG_DECL
)
ACE_THROW_SPEC ((CORBA::SystemException,
CosNotifyFilter::ConstraintNotFound))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
// Create the list that goes out.
- CosNotifyFilter::ConstraintInfoSeq *infoseq;
- ACE_NEW_THROW_EX (infoseq,
+ CosNotifyFilter::ConstraintInfoSeq *infoseq_ptr;
+ ACE_NEW_THROW_EX (infoseq_ptr,
CosNotifyFilter::ConstraintInfoSeq (id_list.length ()),
CORBA::NO_MEMORY ());
ACE_CHECK_RETURN (0);
- auto_ptr<CosNotifyFilter::ConstraintInfoSeq> auto_infoseq (infoseq);
+ CosNotifyFilter::ConstraintInfoSeq_var infoseq (infoseq_ptr);
TAO_NS_Constraint_Expr *notify_constr_expr = 0;
@@ -255,33 +254,39 @@ TAO_NS_ETCL_Filter::get_constraints (const CosNotifyFilter::ConstraintIDSeq & id
ACE_THROW_RETURN (CosNotifyFilter::ConstraintNotFound (id_list[index]),
0);
- (*infoseq)[index].constraint_expression =
+ infoseq[index].constraint_expression =
notify_constr_expr->constr_expr;
// Get an id.
- (*infoseq)[index].constraint_id = id_list[index];
+ infoseq[index].constraint_id = id_list[index];
}
- auto_infoseq.release ();
- return infoseq;
+ return infoseq._retn ();
}
CosNotifyFilter::ConstraintInfoSeq *
TAO_NS_ETCL_Filter::get_all_constraints (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
size_t current_size = this->constraint_expr_list_.current_size ();
// Create the list that goes out.
- CosNotifyFilter::ConstraintInfoSeq *infoseq;
- ACE_NEW_THROW_EX (infoseq,
+ CosNotifyFilter::ConstraintInfoSeq *infoseq_ptr;
+ ACE_NEW_THROW_EX (infoseq_ptr,
CosNotifyFilter::ConstraintInfoSeq (current_size),
CORBA::NO_MEMORY ());
ACE_CHECK_RETURN (0);
+ CosNotifyFilter::ConstraintInfoSeq_var infoseq (infoseq_ptr);
+
infoseq->length (current_size);
- CONSTRAINT_EXPR_LIST_ITER iter (this->constraint_expr_list_);
- CONSTRAINT_EXPR_ENTRY *entry;
+
+ CONSTRAINT_EXPR_LIST::ITERATOR iter (this->constraint_expr_list_);
+ CONSTRAINT_EXPR_LIST::ENTRY *entry;
for (u_int index = 0; iter.done () == 0; iter.advance (), ++index)
{
@@ -291,23 +296,34 @@ TAO_NS_ETCL_Filter::get_all_constraints (ACE_ENV_SINGLE_ARG_DECL)
// We want to force the TAO_String_Manager to make a
// copy of the string. It wouldn't unless we coax it to use
// the correct assignment operator.
- (*infoseq)[index].constraint_expression =
+ infoseq[index].constraint_expression =
ACE_static_cast (const CosNotifyFilter::ConstraintExp,
entry->int_id_->constr_expr);
- (*infoseq)[index].constraint_id = entry->ext_id_;
+ infoseq[index].constraint_id = entry->ext_id_;
}
}
- return infoseq;
+ return infoseq._retn ();
+}
+
+void
+TAO_NS_ETCL_Filter::remove_all_constraints (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
+ this->remove_all_constraints_i (ACE_ENV_SINGLE_ARG_PARAMETER);
}
void
-TAO_NS_ETCL_Filter::remove_all_constraints (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+TAO_NS_ETCL_Filter::remove_all_constraints_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- CONSTRAINT_EXPR_LIST_ITER iter (this->constraint_expr_list_);
- CONSTRAINT_EXPR_ENTRY *entry;
+ CONSTRAINT_EXPR_LIST::ITERATOR iter (this->constraint_expr_list_);
+ CONSTRAINT_EXPR_LIST::ENTRY *entry;
u_int index;
@@ -326,7 +342,11 @@ void
TAO_NS_ETCL_Filter::destroy (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->remove_all_constraints (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
+ this->remove_all_constraints_i (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
PortableServer::POA_var my_POA = _default_POA ();
@@ -338,7 +358,7 @@ TAO_NS_ETCL_Filter::destroy (ACE_ENV_SINGLE_ARG_DECL)
CORBA::Boolean
TAO_NS_ETCL_Filter::match (const CORBA::Any & /*filterable_data */
- ACE_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
CosNotifyFilter::UnsupportedFilterableData))
{
@@ -348,14 +368,18 @@ TAO_NS_ETCL_Filter::match (const CORBA::Any & /*filterable_data */
CORBA::Boolean
TAO_NS_ETCL_Filter::match_structured (const CosNotification::StructuredEvent & filterable_data
- ACE_ENV_ARG_DECL_NOT_USED
+ ACE_ENV_ARG_DECL
)
ACE_THROW_SPEC ((CORBA::SystemException,
CosNotifyFilter::UnsupportedFilterableData))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
// We want to return true if at least one constraint matches.
- CONSTRAINT_EXPR_LIST_ITER iter (this->constraint_expr_list_);
- CONSTRAINT_EXPR_ENTRY *entry;
+ CONSTRAINT_EXPR_LIST::ITERATOR iter (this->constraint_expr_list_);
+ CONSTRAINT_EXPR_LIST::ENTRY *entry;
TAO_NS_Constraint_Visitor visitor;
@@ -423,13 +447,13 @@ TAO_NS_ETCL_Filter::get_callbacks (ACE_ENV_SINGLE_ARG_DECL)
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Hash_Map_Entry<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr *>;
-template class ACE_Hash_Map_Manager<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Manager_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Iterator<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Iterator_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Iterator_Base_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Reverse_Iterator<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,TAO_SYNCH_MUTEX>;
+template class ACE_Hash_Map_Manager<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Manager_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Iterator<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Iterator_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Iterator_Base_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Reverse_Iterator<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,ACE_SYNCH_NULL_MUTEX>;
#if !defined (ACE_HAS_STD_TEMPLATE_SPECIALIZATION)
template class ACE_Equal_To<CosNotifyFilter::ConstraintID>;
@@ -444,13 +468,13 @@ template class ACE_Auto_Basic_Ptr<CosNotifyFilter::ConstraintInfoSeq>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Hash_Map_Entry<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*>
-#pragma instantiate ACE_Hash_Map_Manager<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Iterator<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,TAO_SYNCH_MUTEX>
+#pragma instantiate ACE_Hash_Map_Manager<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Iterator<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Iterator_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<CosNotifyFilter::ConstraintID,TAO_NS_ETCL_Filter::TAO_NS_Constraint_Expr*,ACE_Hash<CosNotifyFilter::ConstraintID>, ACE_Equal_To<CosNotifyFilter::ConstraintID>,ACE_SYNCH_NULL_MUTEX>
#if !defined (ACE_HAS_STD_TEMPLATE_SPECIALIZATION)
#pragma instantiate ACE_Equal_To<CosNotifyFilter::ConstraintID>
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.h b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.h
index 6a6dc6cecbe..6e83250913b 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.h
@@ -131,6 +131,11 @@ private:
CosNotifyFilter::InvalidConstraint
));
+ void remove_all_constraints_i (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
struct TAO_NS_Constraint_Expr
{
// = DESCRIPTION
@@ -143,24 +148,19 @@ private:
// Constraint Interpreter.
};
+ /// Lock to serialize access to data members.
+ TAO_SYNCH_MUTEX lock_;
+
/// Id generator for ConstraintInfo's.
- ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Long> constraint_expr_ids_;
+ CORBA::Long constraint_expr_ids_;
/// A list of the constraints stored in this filter.
- ACE_Hash_Map_Manager <CosNotifyFilter::ConstraintID,
- ACE_NESTED_CLASS (TAO_NS_ETCL_Filter, TAO_NS_Constraint_Expr*),
- TAO_SYNCH_MUTEX>
- constraint_expr_list_;
-
- typedef ACE_Hash_Map_Iterator <CosNotifyFilter::ConstraintID,
- ACE_NESTED_CLASS (TAO_NS_ETCL_Filter, TAO_NS_Constraint_Expr*),
- TAO_SYNCH_MUTEX>
- CONSTRAINT_EXPR_LIST_ITER;
-
- typedef ACE_Hash_Map_Entry <CosNotifyFilter::ConstraintID,
- ACE_NESTED_CLASS (TAO_NS_ETCL_Filter,
- TAO_NS_Constraint_Expr*)>
- CONSTRAINT_EXPR_ENTRY;
+ typedef ACE_Hash_Map_Manager <CosNotifyFilter::ConstraintID,
+ ACE_NESTED_CLASS (TAO_NS_ETCL_Filter, TAO_NS_Constraint_Expr*),
+ ACE_SYNCH_NULL_MUTEX>
+ CONSTRAINT_EXPR_LIST;
+
+ CONSTRAINT_EXPR_LIST constraint_expr_list_;
};
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp
index d88d0c65a64..91f08daa78f 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp
@@ -19,8 +19,10 @@ TAO_NS_ETCL_FilterFactory::~TAO_NS_ETCL_FilterFactory ()
}
CosNotifyFilter::FilterFactory_ptr
-TAO_NS_ETCL_FilterFactory::create (ACE_ENV_SINGLE_ARG_DECL)
+TAO_NS_ETCL_FilterFactory::create (PortableServer::POA_var& filter_poa ACE_ENV_ARG_DECL)
{
+ this->filter_poa_ = filter_poa; // save the filter poa.
+
PortableServer::ServantBase_var servant_var (this);
return _this (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -47,18 +49,16 @@ TAO_NS_ETCL_FilterFactory::create_filter (const char *constraint_grammar ACE_ENV
TAO_NS_ETCL_Filter (),
CORBA::NO_MEMORY ());
- PortableServer::POA_var my_POA = _default_POA ();
-
PortableServer::ServantBase_var filter_var (filter);
PortableServer::ObjectId_var oid =
- my_POA->activate_object (filter
- ACE_ENV_ARG_PARAMETER);
+ this->filter_poa_->activate_object (filter
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (CosNotifyFilter::Filter::_nil ());
CORBA::Object_var obj =
- my_POA->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->filter_poa_->id_to_reference (oid.in ()
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (CosNotifyFilter::Filter::_nil ());
return CosNotifyFilter::Filter::_narrow (obj.in ()
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h b/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h
index d1ab3e4910b..2257259fc0a 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h
@@ -48,7 +48,7 @@ public:
///= TAO_NS_FilterFactory methods.
- virtual CosNotifyFilter::FilterFactory_ptr create (ACE_ENV_SINGLE_ARG_DECL);
+ virtual CosNotifyFilter::FilterFactory_ptr create (PortableServer::POA_var& filter_poa ACE_ENV_ARG_DECL);
///= CosNotifyFilter::FilterFactory methods
@@ -68,6 +68,10 @@ public:
CORBA::SystemException,
CosNotifyFilter::InvalidGrammar
));
+
+protected:
+ /// The POA in which to activate the Filters.
+ PortableServer::POA_var filter_poa_;
};
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp
index 80bdc5262b1..2ad47c95f8c 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp
@@ -6,42 +6,117 @@
#include "EventChannel.inl"
#endif /* __ACE_INLINE__ */
-#include "Proxy.h"
-#include "Admin.h"
+#include "Container_T.h"
#include "EventChannelFactory.h"
-#include "Notify_Service.h"
+#include "ConsumerAdmin.h"
+#include "SupplierAdmin.h"
#include "Event_Manager.h"
#include "Properties.h"
+#include "Factory.h"
#include "Builder.h"
-#include "ThreadPool_Task.h"
+#include "Find_Worker_T.h"
+#include "Seq_Worker_T.h"
ACE_RCSID(RT_Notify, TAO_NS_EventChannel, "$Id$")
- TAO_NS_EventChannel::TAO_NS_EventChannel (void)
+typedef TAO_NS_Find_Worker_T<TAO_NS_ConsumerAdmin
+ , CosNotifyChannelAdmin::ConsumerAdmin
+ , CosNotifyChannelAdmin::ConsumerAdmin_ptr
+ , CosNotifyChannelAdmin::AdminNotFound>
+TAO_NS_ConsumerAdmin_Find_Worker;
+
+typedef TAO_NS_Find_Worker_T<TAO_NS_SupplierAdmin
+ , CosNotifyChannelAdmin::SupplierAdmin
+ , CosNotifyChannelAdmin::SupplierAdmin_ptr
+ , CosNotifyChannelAdmin::AdminNotFound>
+TAO_NS_SupplierAdmin_Find_Worker;
+
+typedef TAO_NS_Seq_Worker_T<TAO_NS_ConsumerAdmin> TAO_NS_ConsumerAdmin_Seq_Worker;
+typedef TAO_NS_Seq_Worker_T<TAO_NS_SupplierAdmin> TAO_NS_SupplierAdmin_Seq_Worker;
+
+TAO_NS_EventChannel::TAO_NS_EventChannel (void)
+ : ecf_ (0)
+ , ca_container_ (0)
+ , sa_container_ (0)
{
}
TAO_NS_EventChannel::~TAO_NS_EventChannel ()
{
- delete this->event_manager_;
+ delete this->event_manager_; // The EventChannel always owns the EventManager.
+
+ this->ecf_->_decr_refcnt ();
}
void
-TAO_NS_EventChannel::init (ACE_ENV_SINGLE_ARG_DECL)
+TAO_NS_EventChannel::init (TAO_NS_EventChannelFactory* ecf
+ , const CosNotification::QoSProperties & initial_qos
+ , const CosNotification::AdminProperties & initial_admin
+ ACE_ENV_ARG_DECL)
{
- CosNotifyChannelAdmin::AdminID id;
+ this->TAO_NS_Object::init (ecf);
- this->default_consumer_admin_ =
- TAO_NS_PROPERTIES::instance()->builder ()->build_consumer_admin (this, CosNotifyChannelAdmin::OR_OP, id ACE_ENV_ARG_PARAMETER);
+ this->ecf_ = ecf;
- this->default_supplier_admin_ =
- TAO_NS_PROPERTIES::instance()->builder ()->build_supplier_admin (this, CosNotifyChannelAdmin::OR_OP, id ACE_ENV_ARG_PARAMETER);
-}
+ this->ecf_->_incr_refcnt ();
-PortableServer::Servant
-TAO_NS_EventChannel::servant (void)
-{
- return this;
+ // Init ca_container_
+ ACE_NEW_THROW_EX (this->ca_container_,
+ TAO_NS_ConsumerAdmin_Container (),
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
+ this->ca_container_->init (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Init ca_container_
+ ACE_NEW_THROW_EX (this->sa_container_,
+ TAO_NS_SupplierAdmin_Container (),
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
+ this->sa_container_->init (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ TAO_NS_AdminProperties* admin_properties = 0;
+
+ // Set the admin properties.
+ ACE_NEW_THROW_EX (admin_properties,
+ TAO_NS_AdminProperties (),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK;
+
+ this->admin_properties_ = admin_properties;
+
+ // create the event manager. @@ use factory
+ ACE_NEW_THROW_EX (this->event_manager_,
+ TAO_NS_Event_Manager (),
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
+ this->event_manager_->init (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ const CosNotification::QoSProperties &default_ec_qos =
+ TAO_NS_PROPERTIES::instance ()->default_event_channel_qos_properties ();
+
+ this->set_qos (default_ec_qos ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->set_qos (initial_qos ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->set_admin (initial_admin ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CosNotifyChannelAdmin::AdminID id;
+
+ // Set the default ConsumerAdmin.
+ this->default_consumer_admin_ = this->new_for_consumers (CosNotifyChannelAdmin::OR_OP, id ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Set the default SupplierAdmin.
+ this->default_supplier_admin_ = this->new_for_suppliers (CosNotifyChannelAdmin::OR_OP, id ACE_ENV_ARG_PARAMETER);
}
void
@@ -63,40 +138,51 @@ TAO_NS_EventChannel::release (void)
//@@ inform factory
}
+int
+TAO_NS_EventChannel::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (TAO_NS_Object::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return 1;
+
+ this->ca_container_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (1);
+
+ this->sa_container_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (1);
+
+ delete this->ca_container_;
+ delete this->sa_container_;
+
+ this->event_manager_->shutdown ();
+
+ return 0;
+}
+
void
TAO_NS_EventChannel::destroy (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
))
{
- if (this->inherited::destroy (this ACE_ENV_ARG_PARAMETER) == 1)
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
return;
- this->event_manager_->shutdown ();
+ ACE_CHECK;
+
+ this->ecf_->remove (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
}
void
-TAO_NS_EventChannel::insert (TAO_NS_Admin* admin ACE_ENV_ARG_DECL)
+TAO_NS_EventChannel::remove (TAO_NS_ConsumerAdmin* consumer_admin ACE_ENV_ARG_DECL)
{
- inherited::insert (admin ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (admin->type () == TAO_NS_Admin::CONSUMER_ADMIN)
- this->consumer_admin_id_list_.insert (admin->id ());
- else
- this->supplier_admin_id_list_.insert (admin->id ());
+ this->ca_container_->remove (consumer_admin ACE_ENV_ARG_PARAMETER);
}
void
-TAO_NS_EventChannel::remove (TAO_NS_Admin* admin ACE_ENV_ARG_DECL)
+TAO_NS_EventChannel::remove (TAO_NS_SupplierAdmin* supplier_admin ACE_ENV_ARG_DECL)
{
- inherited::remove (admin ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (admin->type () == TAO_NS_Admin::CONSUMER_ADMIN)
- this->consumer_admin_id_list_.remove (admin->id ());
- else
- this->supplier_admin_id_list_.remove (admin->id ());
+ this->sa_container_->remove (supplier_admin ACE_ENV_ARG_PARAMETER);
}
void
@@ -124,15 +210,7 @@ TAO_NS_EventChannel::MyFactory (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- CORBA::Object_var object = this->parent_->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannelFactory::_nil ());
-
- CosNotifyChannelAdmin::EventChannelFactory_var ecf_ret;
-
- ecf_ret = CosNotifyChannelAdmin::EventChannelFactory::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannelFactory::_nil ());
-
- return ecf_ret._retn ();
+ return this->ecf_->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
}
CosNotifyChannelAdmin::ConsumerAdmin_ptr
@@ -158,7 +236,7 @@ TAO_NS_EventChannel::default_supplier_admin (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
CORBA::SystemException
))
{
- return this->parent_->get_default_filter_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->ecf_->get_default_filter_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
}
::CosNotifyChannelAdmin::ConsumerAdmin_ptr
@@ -170,8 +248,7 @@ TAO_NS_EventChannel::new_for_consumers (CosNotifyChannelAdmin::InterFilterGroupO
))
{
- /// Builder for ConsumerAdmins
- return TAO_NS_PROPERTIES::instance()->builder ()->build_consumer_admin (this, op, id ACE_ENV_ARG_PARAMETER);
+ return TAO_NS_PROPERTIES::instance()->builder()->build_consumer_admin (this, op, id ACE_ENV_ARG_PARAMETER);
}
::CosNotifyChannelAdmin::SupplierAdmin_ptr
@@ -183,8 +260,7 @@ TAO_NS_EventChannel::new_for_suppliers (CosNotifyChannelAdmin::InterFilterGroupO
CORBA::SystemException
))
{
- /// Builder for SupplierAdmins
- return TAO_NS_PROPERTIES::instance()->builder ()->build_supplier_admin (this, op, id ACE_ENV_ARG_PARAMETER);
+ return TAO_NS_PROPERTIES::instance()->builder()->build_supplier_admin (this, op, id ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::ConsumerAdmin_ptr
@@ -194,23 +270,9 @@ TAO_NS_EventChannel::get_consumeradmin (CosNotifyChannelAdmin::AdminID id ACE_EN
, CosNotifyChannelAdmin::AdminNotFound
))
{
- TAO_NS_Object* ns_object = this->find (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::ConsumerAdmin::_nil ());
-
- if (ns_object != 0)
- {
- CORBA::Object_var object = ns_object->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::ConsumerAdmin::_nil ());
+ TAO_NS_ConsumerAdmin_Find_Worker find_worker;
- CosNotifyChannelAdmin::ConsumerAdmin_var ca_ret;
-
- ca_ret = CosNotifyChannelAdmin::ConsumerAdmin::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::ConsumerAdmin::_nil ());
-
- return ca_ret._retn ();
- }
- else
- ACE_THROW_RETURN (CosNotifyChannelAdmin::AdminNotFound (), CosNotifyChannelAdmin::ConsumerAdmin::_nil ());
+ return find_worker.resolve (id, *this->ca_container_ ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::SupplierAdmin_ptr
@@ -220,23 +282,9 @@ TAO_NS_EventChannel::get_supplieradmin (CosNotifyChannelAdmin::AdminID id ACE_EN
, CosNotifyChannelAdmin::AdminNotFound
))
{
- TAO_NS_Object* ns_object = this->find (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::SupplierAdmin::_nil ());
-
- if (ns_object != 0)
- {
- CORBA::Object_var object = ns_object->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::SupplierAdmin::_nil ());
+ TAO_NS_SupplierAdmin_Find_Worker find_worker;
- CosNotifyChannelAdmin::SupplierAdmin_var sa_ret;
-
- sa_ret = CosNotifyChannelAdmin::SupplierAdmin::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::SupplierAdmin::_nil ());
-
- return sa_ret._retn ();
- }
- else
- ACE_THROW_RETURN (CosNotifyChannelAdmin::AdminNotFound (), CosNotifyChannelAdmin::SupplierAdmin::_nil ());
+ return find_worker.resolve (id, *this->sa_container_ ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::AdminIDSeq*
@@ -245,25 +293,9 @@ TAO_NS_EventChannel::get_all_consumeradmins (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- CosNotifyChannelAdmin::AdminIDSeq* seq_ptr;
-
- ACE_NEW_THROW_EX (seq_ptr,
- CosNotifyChannelAdmin::AdminIDSeq (),
- CORBA::NO_MEMORY ());
-
- CosNotifyChannelAdmin::AdminIDSeq_var seq (seq_ptr);
-
- seq->length (this->consumer_admin_id_list_.size ());
-
- TAO_NS_Object_Id_Seq::CONST_ITERATOR iter (this->consumer_admin_id_list_);
+ TAO_NS_ConsumerAdmin_Seq_Worker seq_worker;
- TAO_NS_Object_Id* object_id;
-
- CORBA::ULong i = 0;
- for (iter.first (); iter.next (object_id); iter.advance (), ++i)
- seq[i] = *object_id;
-
- return seq._retn ();
+ return seq_worker.create (*this->ca_container_ ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::AdminIDSeq*
@@ -272,38 +304,9 @@ TAO_NS_EventChannel::get_all_supplieradmins (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- CosNotifyChannelAdmin::AdminIDSeq* seq_ptr;
-
- ACE_NEW_THROW_EX (seq_ptr,
- CosNotifyChannelAdmin::AdminIDSeq (),
- CORBA::NO_MEMORY ());
-
- CosNotifyChannelAdmin::AdminIDSeq_var seq (seq_ptr);
-
- seq->length (this->supplier_admin_id_list_.size ());
-
- TAO_NS_Object_Id_Seq::CONST_ITERATOR iter (this->consumer_admin_id_list_);
+ TAO_NS_SupplierAdmin_Seq_Worker seq_worker;
- TAO_NS_Object_Id* object_id;
-
- CORBA::ULong i = 0;
- for (iter.first (); iter.next (object_id); iter.advance (), ++i)
- seq[i] = *object_id;
-
- return seq._retn ();
-}
-
-void
-TAO_NS_EventChannel::validate_qos (const CosNotification::QoSProperties & /*required_qos*/,
- CosNotification::NamedPropertyRangeSeq_out /*available_qos*/
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- , CosNotification::UnsupportedQoS
- ))
-{
- ACE_THROW (CORBA::NO_IMPLEMENT ());
+ return seq_worker.create (*this->sa_container_ ACE_ENV_ARG_PARAMETER);
}
void
@@ -334,31 +337,74 @@ TAO_NS_EventChannel::get_admin (ACE_ENV_SINGLE_ARG_DECL)
}
CosEventChannelAdmin::ConsumerAdmin_ptr
-TAO_NS_EventChannel::for_consumers (ACE_ENV_SINGLE_ARG_DECL)
+TAO_NS_EventChannel::for_consumers (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((
CORBA::SystemException
))
{
- CosEventChannelAdmin::ConsumerAdmin_var ca_ret;
-
- ca_ret = CosEventChannelAdmin::ConsumerAdmin::_narrow (this->default_consumer_admin_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosEventChannelAdmin::ConsumerAdmin::_nil ());
-
- return ca_ret._retn ();
-
+ return CosEventChannelAdmin::ConsumerAdmin::_duplicate (this->default_consumer_admin_.in ());
}
CosEventChannelAdmin::SupplierAdmin_ptr
-TAO_NS_EventChannel::for_suppliers (ACE_ENV_SINGLE_ARG_DECL)
+TAO_NS_EventChannel::for_suppliers (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((
CORBA::SystemException
))
{
- CosEventChannelAdmin::SupplierAdmin_var sa_ret =
- CosEventChannelAdmin::SupplierAdmin::_narrow (this->default_supplier_admin_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosEventChannelAdmin::SupplierAdmin::_nil ());
+ return CosEventChannelAdmin::SupplierAdmin::_duplicate (this->default_supplier_admin_.in ());
+}
- return sa_ret._retn ();
+void
+TAO_NS_EventChannel::validate_qos (const CosNotification::QoSProperties & /*required_qos*/,
+ CosNotification::NamedPropertyRangeSeq_out /*available_qos*/
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ , CosNotification::UnsupportedQoS
+ ))
+{
+ ACE_THROW (CORBA::NO_IMPLEMENT ());
}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class TAO_NS_Find_Worker_T<TAO_NS_ConsumerAdmin
+ , CosNotifyChannelAdmin::ConsumerAdmin
+ , CosNotifyChannelAdmin::ConsumerAdmin_ptr
+ , CosNotifyChannelAdmin::AdminNotFound>;
+template class TAO_NS_Find_Worker_T<TAO_NS_SupplierAdmin
+ , CosNotifyChannelAdmin::SupplierAdmin
+ , CosNotifyChannelAdmin::SupplierAdmin_ptr
+ , CosNotifyChannelAdmin::AdminNotFound>;
+
+template class TAO_NS_Seq_Worker_T<TAO_NS_ConsumerAdmin>;
+template class TAO_NS_Seq_Worker_T<TAO_NS_SupplierAdmin>;
+
+template class TAO_NS_Container_T <TAO_NS_ConsumerAdmin>;
+template class TAO_NS_Container_T <TAO_NS_SupplierAdmin>;
+
+template class TAO_ESF_Shutdown_Proxy<TAO_NS_ConsumerAdmin>;
+template class TAO_ESF_Shutdown_Proxy<TAO_NS_SupplierAdmin>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate TAO_NS_Find_Worker_T<TAO_NS_ConsumerAdmin
+ , CosNotifyChannelAdmin::ConsumerAdmin
+ , CosNotifyChannelAdmin::ConsumerAdmin_ptr
+ , CosNotifyChannelAdmin::AdminNotFound>
+#pragma instantiate TAO_NS_Find_Worker_T<TAO_NS_SupplierAdmin
+ , CosNotifyChannelAdmin::SupplierAdmin
+ , CosNotifyChannelAdmin::SupplierAdmin_ptr
+ , CosNotifyChannelAdmin::AdminNotFound>
+
+#pragma instantiate TAO_NS_Seq_Worker_T<TAO_NS_ConsumerAdmin>
+#pragma instantiate TAO_NS_Seq_Worker_T<TAO_NS_SupplierAdmin>
+
+#pragma instantiate TAO_NS_Container_T <TAO_NS_ConsumerAdmin>
+#pragma instantiate TAO_NS_Container_T <TAO_NS_SupplierAdmin>
+
+#pragma instantiate TAO_ESF_Shutdown_Proxy<TAO_NS_ConsumerAdmin>
+#pragma instantiate TAO_ESF_Shutdown_Proxy<TAO_NS_SupplierAdmin>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannel.h b/TAO/orbsvcs/orbsvcs/Notify/EventChannel.h
index 32435ec29a8..d49929af4fa 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/EventChannel.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannel.h
@@ -20,13 +20,12 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "orbsvcs/CosNotifyChannelAdminS.h"
-#include "orbsvcs/NotifyExtC.h"
-#include "Container_T.h"
-#include "Destroy_Callback.h"
-#include "AdminProperties.h"
-#include "EventChannelFactory.h"
+#include "Object.h"
-class TAO_NS_Admin;
+class TAO_NS_ConsumerAdmin;
+class TAO_NS_SupplierAdmin;
+class TAO_NS_EventChannelFactory;
+template <class TYPE> class TAO_NS_Container_T;
#if defined(_MSC_VER)
#if (_MSC_VER >= 1200)
@@ -41,13 +40,15 @@ class TAO_NS_Admin;
* @brief Implementation of CosNotifyChannelAdmin::EventChannel
*
*/
-class TAO_Notify_Export TAO_NS_EventChannel : public POA_CosNotifyChannelAdmin::EventChannel, public virtual TAO_NS_Container_T <TAO_NS_Admin, TAO_NS_EventChannel, TAO_NS_EventChannelFactory>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_EventChannel : public POA_CosNotifyChannelAdmin::EventChannel
+ , public virtual TAO_NS_Object
{
friend class TAO_NS_Builder;
- typedef TAO_NS_Container_T <TAO_NS_Admin, TAO_NS_EventChannel, TAO_NS_EventChannelFactory> inherited;
- typedef ACE_Unbounded_Set <TAO_NS_Object_Id> TAO_NS_Object_Id_Seq;
public:
+ typedef CosNotifyChannelAdmin::ChannelIDSeq SEQ;
+ typedef CosNotifyChannelAdmin::ChannelIDSeq_var SEQ_VAR;
+
/// Constuctor
TAO_NS_EventChannel (void);
@@ -55,26 +56,40 @@ public:
~TAO_NS_EventChannel ();
/// Init
- void init (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Insert object to this container.
- virtual void insert (TAO_NS_Admin* admin ACE_ENV_ARG_DECL);
+ void init (TAO_NS_EventChannelFactory* ecf
+ , const CosNotification::QoSProperties & initial_qos
+ , const CosNotification::AdminProperties & initial_admin
+ ACE_ENV_ARG_DECL);
- /// Remove type from container_
- virtual void remove (TAO_NS_Admin* admin ACE_ENV_ARG_DECL);
+ /// Remove ConsumerAdmin from its container.
+ void remove (TAO_NS_ConsumerAdmin* consumer_admin ACE_ENV_ARG_DECL);
- /// Return servant
- virtual PortableServer::Servant servant (void);
+ /// Remove SupplierAdmin from its container.
+ void remove (TAO_NS_SupplierAdmin* supplier_admin ACE_ENV_ARG_DECL);
/// ServantBase refcount methods.
virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL);
virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL);
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
+ /// Shutdown
+ virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
+
protected:
+ typedef TAO_NS_Container_T <TAO_NS_ConsumerAdmin> TAO_NS_ConsumerAdmin_Container;
+ typedef TAO_NS_Container_T <TAO_NS_SupplierAdmin> TAO_NS_SupplierAdmin_Container;
+
/// = Data Members
+ /// The parent object.
+ TAO_NS_EventChannelFactory* ecf_;
+
+ /// ConsumerAdmin Container.
+ TAO_NS_ConsumerAdmin_Container *ca_container_;
+
+ /// SupplierAdmin Container.
+ TAO_NS_SupplierAdmin_Container *sa_container_;
// Default Consumer Admin
CosNotifyChannelAdmin::ConsumerAdmin_var default_consumer_admin_;
@@ -82,12 +97,6 @@ protected:
// Default Supplier Admin
CosNotifyChannelAdmin::SupplierAdmin_var default_supplier_admin_;
- /// List of Consumer Admin ID's
- TAO_NS_Object_Id_Seq consumer_admin_id_list_;
-
- /// List of Supplier Admin ID's
- TAO_NS_Object_Id_Seq supplier_admin_id_list_;
-
/// =CosNotifyChannelAdmin::EventChannel methods
virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp
index d1cfc5aece4..e5efebbd2ac 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp
@@ -8,15 +8,25 @@
ACE_RCSID(RT_Notify, TAO_NS_EventChannelFactory, "$Id$")
-#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
+#include "ace/Dynamic_Service.h"
#include "Properties.h"
+#include "Factory.h"
#include "Builder.h"
-#include "Proxy.h"
-#include "Admin.h"
#include "EventChannel.h"
-#include "Notify_Service.h"
+#include "Container_T.h"
+#include "Find_Worker_T.h"
+#include "Seq_Worker_T.h"
+
+typedef TAO_NS_Find_Worker_T<TAO_NS_EventChannel
+ , CosNotifyChannelAdmin::EventChannel
+ , CosNotifyChannelAdmin::EventChannel_ptr
+ , CosNotifyChannelAdmin::ChannelNotFound>
+TAO_NS_EventChannel_Find_Worker;
+
+typedef TAO_NS_Seq_Worker_T<TAO_NS_EventChannel> TAO_NS_EventChannel_Seq_Worker;
TAO_NS_EventChannelFactory::TAO_NS_EventChannelFactory (void)
+ :ec_container_ (0)
{
}
@@ -25,15 +35,69 @@ TAO_NS_EventChannelFactory::~TAO_NS_EventChannelFactory ()
}
void
-TAO_NS_EventChannelFactory::init (ACE_ENV_SINGLE_ARG_DECL)
+TAO_NS_EventChannelFactory::destroy (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
{
- this->default_filter_factory_ = TAO_NS_PROPERTIES::instance()->builder ()->build_filter_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ this->ec_container_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ TAO_NS_Properties* properties = TAO_NS_PROPERTIES::instance();
+
+ delete this->ec_container_;
+
+ // Shutdown the ORB.
+ CORBA::ORB_var orb = properties->orb ();
+ orb->shutdown ();
+
+ // Reset references to CORBA objects.
+ properties->orb (CORBA::ORB::_nil ());
+ properties->default_poa (PortableServer::POA::_nil ());
}
-PortableServer::Servant
-TAO_NS_EventChannelFactory::servant (void)
+void
+TAO_NS_EventChannelFactory::init (PortableServer::POA_ptr poa ACE_ENV_ARG_DECL)
{
- return this;
+ this->default_filter_factory_ =
+ TAO_NS_PROPERTIES::instance()->builder()->build_filter_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Init ec_container_
+ ACE_NEW_THROW_EX (this->ec_container_,
+ TAO_NS_EventChannel_Container (),
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
+ this->ec_container_->init (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ TAO_NS_POA_Helper* object_poa = 0;
+
+ // Bootstrap initial Object POA
+ ACE_NEW_THROW_EX (object_poa,
+ TAO_NS_POA_Helper (),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK;
+
+ auto_ptr<TAO_NS_POA_Helper> auto_object_poa (object_poa);
+
+ object_poa->init (poa ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // release auto_ref.
+ auto_object_poa.release ();
+
+ this->object_poa_own (object_poa);
+
+ // We are also activated in the same Object POA.
+ this->poa_ = this->object_poa_;
+
+ // Make the Proxys acivate in this same POA.
+ this->proxy_poa_ = this->object_poa_;
}
void
@@ -55,30 +119,29 @@ TAO_NS_EventChannelFactory::release (void)
//@@ inform factory
}
-CosNotifyFilter::FilterFactory_ptr
-TAO_NS_EventChannelFactory::get_default_filter_factory (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+void
+TAO_NS_EventChannelFactory::remove (TAO_NS_EventChannel* event_channel ACE_ENV_ARG_DECL)
{
- return CosNotifyFilter::FilterFactory::_duplicate (this->default_filter_factory_.in ());
+ this->ec_container_->remove (event_channel ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
}
-void
-TAO_NS_EventChannelFactory::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
+int
+TAO_NS_EventChannelFactory::shutdown (ACE_ENV_SINGLE_ARG_DECL)
{
- if (this->inherited::destroy (this ACE_ENV_ARG_PARAMETER) == 1)
- return;
+ if (TAO_NS_Object::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return 1;
- TAO_NS_Properties* properties = TAO_NS_PROPERTIES::instance();
+ this->ec_container_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (1);
- // Shutdown the ORB.
- CORBA::ORB_var orb = properties->orb ();
- orb->shutdown ();
+ return 0;
+}
- // Reset references to CORBA objects.
- properties->orb (CORBA::ORB::_nil ());
- properties->default_poa (PortableServer::POA::_nil ());
+CosNotifyFilter::FilterFactory_ptr
+TAO_NS_EventChannelFactory::get_default_filter_factory (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ return CosNotifyFilter::FilterFactory::_duplicate (this->default_filter_factory_.in ());
}
::CosNotifyChannelAdmin::EventChannel_ptr TAO_NS_EventChannelFactory::create_channel (
@@ -87,12 +150,16 @@ TAO_NS_EventChannelFactory::destroy (ACE_ENV_SINGLE_ARG_DECL)
CosNotifyChannelAdmin::ChannelID_out id ACE_ENV_ARG_DECL
)
ACE_THROW_SPEC ((
- CORBA::SystemException
- , CosNotification::UnsupportedQoS
- , CosNotification::UnsupportedAdmin
- ))
+ CORBA::SystemException
+ , CosNotification::UnsupportedQoS
+ , CosNotification::UnsupportedAdmin
+ ))
{
- return TAO_NS_PROPERTIES::instance()->builder ()->build_event_channel (this, initial_qos, initial_admin, id ACE_ENV_ARG_PARAMETER);
+ return TAO_NS_PROPERTIES::instance()->builder()->build_event_channel (this
+ , initial_qos
+ , initial_admin
+ , id
+ ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::ChannelIDSeq*
@@ -101,23 +168,9 @@ TAO_NS_EventChannelFactory::get_all_channels (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- CosNotifyChannelAdmin::ChannelIDSeq* seq;
+ TAO_NS_EventChannel_Seq_Worker seq_worker;
- ACE_NEW_THROW_EX (seq,
- CosNotifyChannelAdmin::ChannelIDSeq (),
- CORBA::NO_MEMORY ());
-
- seq->length (this->event_channel_id_list_.size ());
-
- TAO_NS_Object_Id_Seq::CONST_ITERATOR iter (this->event_channel_id_list_);
-
- TAO_NS_Object_Id* object_id;
-
- CORBA::ULong i = 0;
- for (iter.first (); iter.next (object_id); iter.advance (), ++i)
- seq[i] = *object_id;
-
- return seq;
+ return seq_worker.create (*this->ec_container_ ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::EventChannel_ptr
@@ -127,38 +180,33 @@ TAO_NS_EventChannelFactory::get_event_channel (CosNotifyChannelAdmin::ChannelID
, CosNotifyChannelAdmin::ChannelNotFound
))
{
- TAO_NS_Object* ns_object = this->find (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil ());
-
- if (ns_object != 0)
- {
- CORBA::Object_var object = ns_object->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil ());
-
- CosNotifyChannelAdmin::EventChannel_var ec_ret =
- CosNotifyChannelAdmin::EventChannel::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil ());
-
- return ec_ret._retn ();
- }
- else
- ACE_THROW_RETURN (CosNotifyChannelAdmin::ChannelNotFound (), CosNotifyChannelAdmin::EventChannel::_nil ());
+ TAO_NS_EventChannel_Find_Worker find_worker;
+
+ return find_worker.resolve (id, *this->ec_container_ ACE_ENV_ARG_PARAMETER);
}
-void
-TAO_NS_EventChannelFactory::insert (TAO_NS_EventChannel* event_channel ACE_ENV_ARG_DECL)
-{
- inherited::insert (event_channel ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- this->event_channel_id_list_.insert (event_channel->id ());
-}
+template class TAO_NS_Find_Worker_T<TAO_NS_EventChannel
+ , CosNotifyChannelAdmin::EventChannel
+ , CosNotifyChannelAdmin::EventChannel_ptr
+ , CosNotifyChannelAdmin::ChannelNotFound>;
+template class TAO_NS_Seq_Worker_T<TAO_NS_EventChannel>;
-void
-TAO_NS_EventChannelFactory::remove (TAO_NS_EventChannel* event_channel ACE_ENV_ARG_DECL)
-{
- inherited::remove (event_channel ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+template class TAO_NS_Container_T <TAO_NS_EventChannel>;
- this->event_channel_id_list_.remove (event_channel->id ());
-}
+template class TAO_ESF_Shutdown_Proxy<TAO_NS_EventChannel>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#pragma instantiate TAO_NS_Find_Worker_T<TAO_NS_EventChannel
+ , CosNotifyChannelAdmin::EventChannel
+ , CosNotifyChannelAdmin::EventChannel_ptr
+ , CosNotifyChannelAdmin::ChannelNotFound>
+#pragma instantiate TAO_NS_Seq_Worker_T<TAO_NS_EventChannel>
+
+
+#pragma instantiate TAO_NS_Container_T <TAO_NS_EventChannel>
+
+#pragma instantiate TAO_ESF_Shutdown_Proxy<TAO_NS_EventChannel>;
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h
index d8fdfae268a..268618aaf32 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h
@@ -21,11 +21,10 @@
#include "orbsvcs/CosNotifyChannelAdminS.h"
#include "orbsvcs/NotifyExtS.h"
-#include "Container_T.h"
-#include "Destroy_Callback.h"
-#include "Notify_Service.h"
+#include "Object.h"
class TAO_NS_EventChannel;
+template <class TYPE> class TAO_NS_Container_T;
#if defined(_MSC_VER)
#if (_MSC_VER >= 1200)
@@ -40,49 +39,43 @@ class TAO_NS_EventChannel;
* @brief Implementation of CosNotifyChannelAdmin::EventChannelFactory
*
*/
-
-
-class TAO_Notify_Export TAO_NS_EventChannelFactory : public virtual POA_NotifyExt::EventChannelFactory, public TAO_NS_Container_T <TAO_NS_EventChannel, TAO_NS_EventChannelFactory, TAO_NS_Notify_Service>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_EventChannelFactory : public virtual POA_NotifyExt::EventChannelFactory
+ , public virtual TAO_NS_Object
{
friend class TAO_NS_Builder;
public:
- typedef TAO_NS_Container_T <TAO_NS_EventChannel, TAO_NS_EventChannelFactory, TAO_NS_Notify_Service> inherited;
- typedef ACE_Unbounded_Set <TAO_NS_Object_Id> TAO_NS_Object_Id_Seq;
-
/// Constuctor
TAO_NS_EventChannelFactory (void);
/// Init the factory
- void init (ACE_ENV_SINGLE_ARG_DECL);
+ void init (PortableServer::POA_ptr poa ACE_ENV_ARG_DECL);
/// Destructor
virtual ~TAO_NS_EventChannelFactory ();
- /// Return servant
- virtual PortableServer::Servant servant (void);
-
- /// Insert object to this container.
- virtual void insert (TAO_NS_EventChannel* event_channel ACE_ENV_ARG_DECL);
-
- /// Remove type from container_
- virtual void remove (TAO_NS_EventChannel* event_channel ACE_ENV_ARG_DECL);
-
/// = ServantBase Methods
virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL);
virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL);
- /// TAO_NS_Destroy_Callback methods
+ /// Release this object.
virtual void release (void);
+ /// Remove <channel> from the <ec_container_>
+ void remove (TAO_NS_EventChannel* channel ACE_ENV_ARG_DECL);
+
/// Accesor for the default filter factory shared by all EC's.
virtual CosNotifyFilter::FilterFactory_ptr get_default_filter_factory (ACE_ENV_SINGLE_ARG_DECL);
+ /// shutdown
+ virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
+
protected:
- /// = Data Members
+ typedef TAO_NS_Container_T<TAO_NS_EventChannel> TAO_NS_EventChannel_Container;
- /// List of Event Channel ID's
- TAO_NS_Object_Id_Seq event_channel_id_list_;
+ /// = Data Members
+ /// Container for Event Channels.
+ TAO_NS_EventChannel_Container *ec_container_;
/// The default filter factory.
CosNotifyFilter::FilterFactory_var default_filter_factory_;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Event_Manager.cpp b/TAO/orbsvcs/orbsvcs/Notify/Event_Manager.cpp
index b73557e9d57..b18ce49fd22 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Event_Manager.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Event_Manager.cpp
@@ -9,21 +9,10 @@
ACE_RCSID(RT_Notify, TAO_NS_Event_Manager, "$Id$")
-#include "ace/Refcounted_Auto_Ptr.h"
-#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
-
-#include "EventTypeSeq.h"
-#include "Event.h"
-#include "Peer.h"
-#include "Consumer.h"
#include "ProxyConsumer.h"
#include "ProxySupplier.h"
-#include "Proxy.h"
-#include "Admin.h"
-#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
-#include "Event_Map_T.h"
+#include "Consumer_Map.h"
+#include "Supplier_Map.h"
TAO_NS_Event_Manager::TAO_NS_Event_Manager (void)
:consumer_map_ (0), supplier_map_ (0)
@@ -217,11 +206,7 @@ template class ACE_Hash_Map_Manager_Ex<TAO_NS_EventType, TAO_NS_Event_Map_Entry_
template class ACE_Hash_Map_Manager_Ex<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxySupplier> *, ACE_Hash<TAO_NS_EventType>, ACE_Equal_To<TAO_NS_EventType>, ACE_Null_Mutex>;
template class ACE_Hash_Map_Manager<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxySupplier> *, ACE_Null_Mutex>;
template class ACE_Hash_Map_Manager<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxyConsumer> *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager<ACE_CString, CORBA_Any, ACE_Null_Mutex>;
-
-template class TAO_NS_Object_Find_Worker_T<TAO_NS_Proxy>;
-template class TAO_NS_Object_Find_Worker_T<TAO_NS_Admin>;
-template class TAO_NS_Object_Find_Worker_T<TAO_NS_EventChannel>;
+template class ACE_Hash_Map_Manager<ACE_CString, CORBA::Any, ACE_Null_Mutex>;
template class ACE_Unbounded_Set<TAO_NS_EventType>;
template class ACE_Unbounded_Set_Const_Iterator<TAO_NS_EventType>;
@@ -233,7 +218,8 @@ template class TAO_ESF_Worker<TAO_NS_ProxyConsumer>;
template class TAO_ESF_Worker<TAO_NS_Proxy>;
template class TAO_ESF_Worker<TAO_NS_Consumer>;
template class TAO_ESF_Worker<TAO_NS_Peer>;
-template class TAO_ESF_Worker<TAO_NS_Admin>;
+template class TAO_ESF_Worker<TAO_NS_SupplierAdmin>;
+template class TAO_ESF_Worker<TAO_NS_ConsumerAdmin>;
template class TAO_ESF_Worker<TAO_NS_EventChannel>;
template class ACE_Refcounted_Auto_Ptr<TAO_NS_Event, TAO_SYNCH_MUTEX>;
@@ -241,7 +227,8 @@ template class ACE_Unbounded_Queue_Iterator<ACE_Refcounted_Auto_Ptr<TAO_NS_Event
template class ACE_Node<ACE_Refcounted_Auto_Ptr<TAO_NS_Event, TAO_SYNCH_MUTEX > >;
template class ACE_Node<TAO_NS_Supplier *>;
-template class ACE_Node<TAO_NS_Admin *>;
+template class ACE_Node<TAO_NS_SupplierAdmin *>;
+template class ACE_Node<TAO_NS_ConsumerAdmin *>;
template class ACE_Node<TAO_NS_EventChannel *>;
template class ACE_Node<TAO_NS_ProxyConsumer *>;
template class ACE_Node<TAO_NS_EventType>;
@@ -251,7 +238,7 @@ template class ACE_Node<TAO_NS_Proxy *>;
template class ACE_Node<TAO_NS_Consumer *>;
template class ACE_Hash_Map_Entry<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxyConsumer> *>;
-template class ACE_Hash_Map_Entry<ACE_CString, CORBA_Any>;
+template class ACE_Hash_Map_Entry<ACE_CString, CORBA::Any>;
template class ACE_Hash_Map_Entry<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxySupplier> *>;
template class ACE_Hash_Map_Iterator_Base_Ex<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxySupplier> *, ACE_Hash<TAO_NS_EventType>, ACE_Equal_To<TAO_NS_EventType>, ACE_Null_Mutex>;
@@ -263,15 +250,11 @@ template class ACE_Hash_Map_Iterator_Ex<TAO_NS_EventType, TAO_NS_Event_Map_Entry
template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxySupplier> *, ACE_Hash<TAO_NS_EventType>, ACE_Equal_To<TAO_NS_EventType>, ACE_Null_Mutex>;
template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxyConsumer> *, ACE_Hash<TAO_NS_EventType>, ACE_Equal_To<TAO_NS_EventType>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_CString, CORBA_Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>;
-
-template class ACE_Hash_Map_Iterator_Ex<ACE_CString, CORBA_Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, CORBA_Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, CORBA_Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Manager_Ex<ACE_CString, CORBA::Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>;
-template class TAO_ESF_Shutdown_Proxy<TAO_NS_EventChannel>;
-template class TAO_ESF_Shutdown_Proxy<TAO_NS_Admin>;
-template class TAO_ESF_Shutdown_Proxy<TAO_NS_Proxy>;
+template class ACE_Hash_Map_Iterator_Ex<ACE_CString, CORBA::Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, CORBA::Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, CORBA::Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
@@ -288,11 +271,7 @@ template class TAO_ESF_Shutdown_Proxy<TAO_NS_Proxy>;
#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxySupplier> *, ACE_Hash<TAO_NS_EventType>, ACE_Equal_To<TAO_NS_EventType>, ACE_Null_Mutex>
#pragma instantiate ACE_Hash_Map_Manager<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxySupplier> *, ACE_Null_Mutex>
#pragma instantiate ACE_Hash_Map_Manager<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxyConsumer> *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, CORBA_Any, ACE_Null_Mutex>
-
-#pragma instantiate TAO_NS_Object_Find_Worker_T<TAO_NS_Proxy>
-#pragma instantiate TAO_NS_Object_Find_Worker_T<TAO_NS_Admin>
-#pragma instantiate TAO_NS_Object_Find_Worker_T<TAO_NS_EventChannel>
+#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, CORBA::Any, ACE_Null_Mutex>
#pragma instantiate ACE_Unbounded_Set<TAO_NS_EventType>
#pragma instantiate ACE_Unbounded_Set_Const_Iterator<TAO_NS_EventType>
@@ -304,7 +283,8 @@ template class TAO_ESF_Shutdown_Proxy<TAO_NS_Proxy>;
#pragma instantiate TAO_ESF_Worker<TAO_NS_Proxy>
#pragma instantiate TAO_ESF_Worker<TAO_NS_Consumer>
#pragma instantiate TAO_ESF_Worker<TAO_NS_Peer>
-#pragma instantiate TAO_ESF_Worker<TAO_NS_Admin>
+#pragma instantiate TAO_ESF_Worker<TAO_NS_ConsumerAdmin>
+#pragma instantiate TAO_ESF_Worker<TAO_NS_SupplierAdmin>
#pragma instantiate TAO_ESF_Worker<TAO_NS_EventChannel>
#pragma instantiate ACE_Refcounted_Auto_Ptr<TAO_NS_Event, TAO_SYNCH_MUTEX>
@@ -312,7 +292,8 @@ template class TAO_ESF_Shutdown_Proxy<TAO_NS_Proxy>;
#pragma instantiate ACE_Node<ACE_Refcounted_Auto_Ptr<TAO_NS_Event, TAO_SYNCH_MUTEX > >
#pragma instantiate ACE_Node<TAO_NS_Supplier *>
-#pragma instantiate ACE_Node<TAO_NS_Admin *>
+#pragma instantiate ACE_Node<TAO_NS_SupplierAdmin *>
+#pragma instantiate ACE_Node<TAO_NS_ConsumerAdmin *>
#pragma instantiate ACE_Node<TAO_NS_EventChannel *>
#pragma instantiate ACE_Node<TAO_NS_ProxyConsumer *>
#pragma instantiate ACE_Node<TAO_NS_EventType>
@@ -322,7 +303,7 @@ template class TAO_ESF_Shutdown_Proxy<TAO_NS_Proxy>;
#pragma instantiate ACE_Node<TAO_NS_Consumer *>
#pragma instantiate ACE_Hash_Map_Entry<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxyConsumer> *>
-#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, CORBA_Any>
+#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, CORBA::Any>
#pragma instantiate ACE_Hash_Map_Entry<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxySupplier> *>
#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxySupplier> *, ACE_Hash<TAO_NS_EventType>, ACE_Equal_To<TAO_NS_EventType>, ACE_Null_Mutex>
@@ -334,14 +315,9 @@ template class TAO_ESF_Shutdown_Proxy<TAO_NS_Proxy>;
#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxySupplier> *, ACE_Hash<TAO_NS_EventType>, ACE_Equal_To<TAO_NS_EventType>, ACE_Null_Mutex>
#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_NS_EventType, TAO_NS_Event_Map_Entry_T<TAO_NS_ProxyConsumer> *, ACE_Hash<TAO_NS_EventType>, ACE_Equal_To<TAO_NS_EventType>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, CORBA_Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>
-
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, CORBA_Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_CString, CORBA_Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, CORBA_Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>
-
-#pragma instantiate TAO_ESF_Shutdown_Proxy<TAO_NS_EventChannel>
-#pragma instantiate TAO_ESF_Shutdown_Proxy<TAO_NS_Admin>
-#pragma instantiate TAO_ESF_Shutdown_Proxy<TAO_NS_Proxy>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, CORBA::Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, CORBA::Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_CString, CORBA::Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, CORBA::Any, ACE_Hash<ACE_CString >, ACE_Equal_To<ACE_CString >, ACE_Null_Mutex>
#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Event_Manager.h b/TAO/orbsvcs/orbsvcs/Notify/Event_Manager.h
index 5da8ed87089..efc8b257831 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Event_Manager.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Event_Manager.h
@@ -19,10 +19,16 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "Types.h"
-#include "EventTypeSeq.h"
#include "orbsvcs/ESF/ESF_Worker.h"
+class TAO_NS_ProxySupplier;
+class TAO_NS_ProxyConsumer;
+class TAO_NS_EventTypeSeq;
+
+template <class PROXY, class ACE_LOCK> class TAO_NS_Event_Map_T;
+typedef TAO_NS_Event_Map_T<TAO_NS_ProxySupplier, TAO_SYNCH_RW_MUTEX> TAO_NS_Consumer_Map;
+typedef TAO_NS_Event_Map_T<TAO_NS_ProxyConsumer, TAO_SYNCH_RW_MUTEX> TAO_NS_Supplier_Map;
+
/**
* @class TAO_NS_Event_Manager
*
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Event_Map_Entry_T.h b/TAO/orbsvcs/orbsvcs/Notify/Event_Map_Entry_T.h
index f9981c0a093..caca41aecf3 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Event_Map_Entry_T.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Event_Map_Entry_T.h
@@ -21,9 +21,10 @@
#include "ace/Copy_Disabled.h"
#include "ace/Atomic_Op.h"
-#include "Types.h"
+#include "tao/corba.h"
template <class PROXY, class ACE_LOCK> class TAO_NS_Event_Map_T;
+template <class PROXY> class TAO_ESF_Proxy_Collection;
/**
* @class TAO_NS_Event_Map_Entry_T
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Event_Map_T.h b/TAO/orbsvcs/orbsvcs/Notify/Event_Map_T.h
index 6fe8b485bb7..b7219b3f509 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Event_Map_T.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Event_Map_T.h
@@ -20,7 +20,8 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Hash_Map_Manager.h"
-#include "Types.h"
+#include "ace/CORBA_macros.h"
+
#include "EventType.h"
#include "Event_Map_Entry_T.h"
#include "EventTypeSeq.h"
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Factory.h b/TAO/orbsvcs/orbsvcs/Notify/Factory.h
index 82ee2e282e3..2f0ee401cba 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Factory.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Factory.h
@@ -13,15 +13,13 @@
#define TAO_NS_FACTORY_H
#include "ace/pre.h"
-#include "notify_export.h"
-
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "tao/corba.h"
#include "ace/CORBA_macros.h"
-
-#include "Types.h"
+#include "ace/Service_Object.h"
class ACE_Lock;
class TAO_NS_Object;
@@ -37,6 +35,24 @@ class TAO_NS_StructuredProxyPushConsumer;
class TAO_NS_StructuredProxyPushSupplier;
class TAO_NS_SequenceProxyPushConsumer;
class TAO_NS_SequenceProxyPushSupplier;
+class TAO_NS_ProxyConsumer;
+class TAO_NS_ProxySupplier;
+class TAO_NS_ConsumerAdmin;
+class TAO_NS_SupplierAdmin;
+class TAO_NS_Proxy;
+class TAO_NS_Consumer;
+class TAO_NS_Supplier;
+class TAO_NS_Peer;
+
+template <class PROXY> class TAO_ESF_Proxy_Collection;
+
+typedef TAO_ESF_Proxy_Collection<TAO_NS_ProxyConsumer> TAO_NS_ProxyConsumer_Collection;
+typedef TAO_ESF_Proxy_Collection<TAO_NS_ProxySupplier> TAO_NS_ProxySupplier_Collection;
+
+typedef TAO_ESF_Proxy_Collection<TAO_NS_EventChannel> TAO_NS_EventChannel_Collection;
+typedef TAO_ESF_Proxy_Collection<TAO_NS_ConsumerAdmin> TAO_NS_ConsumerAdmin_Collection;
+typedef TAO_ESF_Proxy_Collection<TAO_NS_SupplierAdmin> TAO_NS_SupplierAdmin_Collection;
+typedef TAO_ESF_Proxy_Collection<TAO_NS_Proxy> TAO_NS_Proxy_Collection;
/**
* @class TAO_NS_Factory
@@ -44,70 +60,63 @@ class TAO_NS_SequenceProxyPushSupplier;
* @brief Factory interface for creating Notify Objects.
*
*/
-class TAO_Notify_Export TAO_NS_Factory
+class /*TAO_Notify_Export*/ TAO_NS_Factory : public ACE_Service_Object
{
public:
- /// Constuctor
- TAO_NS_Factory (void);
+ /// Create ProxySupplier Collection
+ virtual void create (TAO_NS_ProxySupplier_Collection*& collection ACE_ENV_ARG_DECL) = 0;
- /// Destructor
- virtual ~TAO_NS_Factory ();
+ /// Create ProxyConsumer Collection
+ virtual void create (TAO_NS_ProxyConsumer_Collection*& collection ACE_ENV_ARG_DECL) = 0;
- /// Create Object Lock.
- virtual ACE_Lock* create_object_lock (ACE_ENV_SINGLE_ARG_DECL);
+ /// Create EventChannel Collection
+ virtual void create (TAO_NS_EventChannel_Collection*& collection ACE_ENV_ARG_DECL) = 0;
- /// Create Collection
- virtual void create (TAO_NS_ProxySupplier_Collection*& collection ACE_ENV_ARG_DECL);
- virtual void create (TAO_NS_ProxyConsumer_Collection*& collection ACE_ENV_ARG_DECL);
+ /// Create ConsumerAdmin Collection
+ virtual void create (TAO_NS_ConsumerAdmin_Collection*& collection ACE_ENV_ARG_DECL) = 0;
- virtual void create (TAO_NS_EventChannel_Collection*& collection ACE_ENV_ARG_DECL);
- virtual void create (TAO_NS_Admin_Collection*& collection ACE_ENV_ARG_DECL);
- virtual void create (TAO_NS_Proxy_Collection*& collection ACE_ENV_ARG_DECL);
+ /// Create SupplierAdmin Collection
+ virtual void create (TAO_NS_SupplierAdmin_Collection*& collection ACE_ENV_ARG_DECL) = 0;
- virtual void create (TAO_NS_Peer_Collection*& collection ACE_ENV_ARG_DECL);
- virtual void create (TAO_NS_Consumer_Collection*& collection ACE_ENV_ARG_DECL);
- virtual void create (TAO_NS_Supplier_Collection*& collection ACE_ENV_ARG_DECL);
+ /// Create Proxy Collection
+ virtual void create (TAO_NS_Proxy_Collection*& collection ACE_ENV_ARG_DECL) = 0;
/// Create EventChannelFactory
- virtual void create (TAO_NS_EventChannelFactory*& channel_factory ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_EventChannelFactory*& channel_factory ACE_ENV_ARG_DECL) = 0;
/// Create EventChannel
- virtual void create (TAO_NS_EventChannel*& channel ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_EventChannel*& channel ACE_ENV_ARG_DECL) = 0;
/// Create SupplierAdmin
- virtual void create (TAO_NS_SupplierAdmin*& admin ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_SupplierAdmin*& admin ACE_ENV_ARG_DECL) = 0;
/// Create ConsumerAdmin
- virtual void create (TAO_NS_ConsumerAdmin*& admin ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_ConsumerAdmin*& admin ACE_ENV_ARG_DECL) = 0;
/// Create ProxyPushConsumer
- virtual void create (TAO_NS_ProxyPushConsumer*& proxy ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_ProxyPushConsumer*& proxy ACE_ENV_ARG_DECL) = 0;
/// Create ProxyPushSupplier
- virtual void create (TAO_NS_ProxyPushSupplier*& proxy ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_ProxyPushSupplier*& proxy ACE_ENV_ARG_DECL) = 0;
/// Create CosEC_ProxyPushConsumer
- virtual void create (TAO_NS_CosEC_ProxyPushConsumer*& proxy ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_CosEC_ProxyPushConsumer*& proxy ACE_ENV_ARG_DECL) = 0;
/// Create CosEC_ProxyPushSupplier
- virtual void create (TAO_NS_CosEC_ProxyPushSupplier*& proxy ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_CosEC_ProxyPushSupplier*& proxy ACE_ENV_ARG_DECL) = 0;
/// Create StructuredProxyPushConsumer
- virtual void create (TAO_NS_StructuredProxyPushConsumer*& proxy ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_StructuredProxyPushConsumer*& proxy ACE_ENV_ARG_DECL) = 0;
/// Create StructuredProxyPushSupplier
- virtual void create (TAO_NS_StructuredProxyPushSupplier*& proxy ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_StructuredProxyPushSupplier*& proxy ACE_ENV_ARG_DECL) = 0;
/// Create SequenceProxyPushConsumer
- virtual void create (TAO_NS_SequenceProxyPushConsumer*& proxy ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_SequenceProxyPushConsumer*& proxy ACE_ENV_ARG_DECL) = 0;
/// Create SequenceProxyPushSupplier
- virtual void create (TAO_NS_SequenceProxyPushSupplier*& proxy ACE_ENV_ARG_DECL);
+ virtual void create (TAO_NS_SequenceProxyPushSupplier*& proxy ACE_ENV_ARG_DECL) = 0;
};
-#if defined (__ACE_INLINE__)
-#include "Factory.inl"
-#endif /* __ACE_INLINE__ */
-
#include "ace/post.h"
#endif /* TAO_NS_FACTORY_H */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.cpp b/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.cpp
index 48872e9abb7..bf3798f31ab 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.cpp
@@ -21,9 +21,12 @@ TAO_NS_FilterAdmin::match (const TAO_NS_Event_var &event ACE_ENV_ARG_DECL)
CosNotifyFilter::UnsupportedFilterableData
))
{
- // If no filter is active, treat it as a '*' i.e, let all events pass.
- // or if its the special type, let it pass.
- if (this->filter_list_.current_size () == 0) // || event.is_special_event_type ())
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
+ // If no filter is active, match is successfull.
+ if (this->filter_list_.current_size () == 0)
return 1;
// We want to return true if atleast one constraint matches.
@@ -50,26 +53,33 @@ TAO_NS_FilterAdmin::add_filter (CosNotifyFilter::Filter_ptr new_filter ACE_ENV_A
if (CORBA::is_nil (new_filter))
ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0);
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
CosNotifyFilter::FilterID new_id = this->filter_ids_.id ();
CosNotifyFilter::Filter_var new_filter_var =
CosNotifyFilter::Filter::_duplicate (new_filter);
if (this->filter_list_.bind (new_id, new_filter_var) == -1)
- ACE_THROW_RETURN (CORBA::INTERNAL (),
- 0);
+ ACE_THROW_RETURN (CORBA::INTERNAL (),
+ 0);
else
- {
- return new_id;
- }
+ return new_id;
}
-void TAO_NS_FilterAdmin::remove_filter (CosNotifyFilter::FilterID filter_id ACE_ENV_ARG_DECL)
+void
+TAO_NS_FilterAdmin::remove_filter (CosNotifyFilter::FilterID filter_id ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException,
CosNotifyFilter::FilterNotFound
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
if (this->filter_list_.unbind (filter_id) == -1)
ACE_THROW (CosNotifyFilter::FilterNotFound ());
}
@@ -81,6 +91,10 @@ TAO_NS_FilterAdmin::get_filter (CosNotifyFilter::FilterID filter_id ACE_ENV_ARG_
CosNotifyFilter::FilterNotFound
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (CosNotifyFilter::Filter::_nil ());
+
CosNotifyFilter::Filter_var filter_var;
if (this->filter_list_.find (filter_id,
@@ -97,6 +111,10 @@ TAO_NS_FilterAdmin::get_all_filters (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
// Figure out the length of the list.
size_t len = this->filter_list_.current_size ();
@@ -112,8 +130,8 @@ TAO_NS_FilterAdmin::get_all_filters (ACE_ENV_SINGLE_ARG_DECL)
list->length (len);
- FILTER_LIST_ITER iter (this->filter_list_);
- FILTER_LIST_ENTRY *entry;
+ FILTER_LIST::ITERATOR iter (this->filter_list_);
+ FILTER_LIST::ENTRY *entry;
u_int index;
@@ -126,30 +144,34 @@ TAO_NS_FilterAdmin::get_all_filters (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_NS_FilterAdmin::remove_all_filters (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+TAO_NS_FilterAdmin::remove_all_filters (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
this->filter_list_.unbind_all ();
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Hash_Map_Entry<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var>;
-template class ACE_Hash_Map_Manager<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Manager_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Iterator<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Iterator_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Iterator_Base_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Reverse_Iterator<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,TAO_SYNCH_MUTEX>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,TAO_SYNCH_MUTEX>;
+template class ACE_Hash_Map_Manager<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Manager_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Base_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,ACE_Null_Mutex>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Hash_Map_Entry<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var>
-#pragma instantiate ACE_Hash_Map_Manager<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Iterator<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,TAO_SYNCH_MUTEX>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,TAO_SYNCH_MUTEX>
+#pragma instantiate ACE_Hash_Map_Manager<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<CosNotifyFilter::FilterID,CosNotifyFilter::Filter_var,ACE_Hash<CosNotifyFilter::FilterID>, ACE_Equal_To<CosNotifyFilter::FilterID>,ACE_Null_Mutex>
#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.h b/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.h
index b31b3371f9c..89998714834 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.h
@@ -21,7 +21,6 @@
#include "ID_Factory.h"
#include "Event.h"
#include "notify_export.h"
-#include "Types.h"
/**
* @class TAO_NS_FilterAdmin
@@ -73,9 +72,10 @@ class TAO_Notify_Export TAO_NS_FilterAdmin
));
private:
- typedef ACE_Hash_Map_Manager <CosNotifyFilter::FilterID, CosNotifyFilter::Filter_var, TAO_SYNCH_MUTEX> FILTER_LIST;
- typedef ACE_Hash_Map_Iterator <CosNotifyFilter::FilterID, CosNotifyFilter::Filter_var, TAO_SYNCH_MUTEX> FILTER_LIST_ITER;
- typedef ACE_Hash_Map_Entry <CosNotifyFilter::FilterID, CosNotifyFilter::Filter_var> FILTER_LIST_ENTRY;
+ typedef ACE_Hash_Map_Manager <CosNotifyFilter::FilterID, CosNotifyFilter::Filter_var, ACE_SYNCH_NULL_MUTEX> FILTER_LIST;
+
+ /// Mutex to serialize access to data members.
+ TAO_SYNCH_MUTEX lock_;
/// List of filters
FILTER_LIST filter_list_;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/FilterFactory.h b/TAO/orbsvcs/orbsvcs/Notify/FilterFactory.h
index 0f6b520589b..27708b31cd9 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/FilterFactory.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/FilterFactory.h
@@ -20,6 +20,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Service_Object.h"
+#include "tao/PortableServer/PortableServer.h"
/**
* @class TAO_NS_FilterFactory
@@ -31,8 +32,8 @@ class /*TAO_Notify_Export*/ TAO_NS_FilterFactory : public ACE_Service_Object
{
public:
/// Factory method to create a FilterFactory reference
- /// The Factory is activated in the default POA.
- virtual CosNotifyFilter::FilterFactory_ptr create (ACE_ENV_SINGLE_ARG_DECL) = 0;
+ /// The Factory is activated in the default POA. The filters created are activated in the <filter_poa>.
+ virtual CosNotifyFilter::FilterFactory_ptr create (PortableServer::POA_var& filter_poa ACE_ENV_ARG_DECL) = 0;
};
#include "ace/post.h"
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ID_Factory.h b/TAO/orbsvcs/orbsvcs/Notify/ID_Factory.h
index 014516164e2..21a0136b7ba 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ID_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/ID_Factory.h
@@ -19,8 +19,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "Types.h"
#include "ace/Atomic_Op.h"
+#include "Object.h"
/**
* @class TAO_NS_ID_Factory
@@ -35,12 +35,12 @@ public:
TAO_NS_ID_Factory (void);
/// Destructor
- ~TAO_NS_ID_Factory ();
+ ~TAO_NS_ID_Factory ();
- TAO_NS_Object_Id id (void);
+ TAO_NS_Object::ID id (void);
private:
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, TAO_NS_Object_Id> seed_;
+ ACE_Atomic_Op<TAO_SYNCH_MUTEX, TAO_NS_Object::ID> seed_;
};
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ID_Factory.inl b/TAO/orbsvcs/orbsvcs/Notify/ID_Factory.inl
index 5756b006767..3520fc9bb7a 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ID_Factory.inl
+++ b/TAO/orbsvcs/orbsvcs/Notify/ID_Factory.inl
@@ -1,6 +1,6 @@
// $Id$
-ACE_INLINE TAO_NS_Object_Id
+ACE_INLINE TAO_NS_Object::ID
TAO_NS_ID_Factory::id (void)
{
return ++seed_;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Method_Request.h b/TAO/orbsvcs/orbsvcs/Notify/Method_Request.h
index f16879b53e6..4124b82b21e 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Method_Request.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Method_Request.h
@@ -22,8 +22,6 @@
#include "ace/Message_Block.h"
#include "ace/Refcounted_Auto_Ptr.h"
#include "Event.h"
-#include "Types.h"
-#include "Refcountable.h"
/**
* @class TAO_NS_Method_Request
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch.cpp b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch.cpp
index 0f9c02bf6f1..caa1d7de399 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch.cpp
@@ -11,11 +11,8 @@ ACE_RCSID(RT_Notify, TAO_NS_Method_Request_Dispatch, "$Id$")
#include "tao/debug.h"
#include "ProxySupplier.h"
#include "Consumer.h"
-#include "Proxy.h"
#include "Admin.h"
-#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
+#include "ConsumerAdmin.h"
TAO_NS_Method_Request_Dispatch::TAO_NS_Method_Request_Dispatch (const TAO_NS_Event_var& event, TAO_NS_ProxySupplier* proxy_supplier)
: TAO_NS_Method_Request_Event (event), proxy_supplier_ (proxy_supplier), refcountable_guard_ (*proxy_supplier)
@@ -39,7 +36,12 @@ TAO_NS_Method_Request_Dispatch::execute (ACE_ENV_SINGLE_ARG_DECL)
if (this->proxy_supplier_->has_shutdown ())
return 0; // If we were shutdown while waiting in the queue, return with no action.
- CORBA::Boolean val = this->proxy_supplier_->check_filters (this->event_ ACE_ENV_ARG_PARAMETER);
+ TAO_NS_Admin* parent = this->proxy_supplier_->consumer_admin ();
+
+ CORBA::Boolean val = this->proxy_supplier_->check_filters (this->event_,
+ parent->filter_admin (),
+ parent->filter_operator ()
+ ACE_ENV_ARG_PARAMETER);
if (TAO_debug_level > 1)
ACE_DEBUG ((LM_DEBUG, "Proxysupplier %x filter eval result = %d",this->proxy_supplier_ , val));
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch.h b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch.h
index 5e8c2de2223..862608c46a3 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch.h
@@ -20,7 +20,9 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "Method_Request.h"
-#include "Types.h"
+#include "Refcountable.h"
+
+class TAO_NS_ProxySupplier;
/**
* @class TAO_NS_Method_Request_Dispatch
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch_No_Filtering.cpp b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch_No_Filtering.cpp
index f90b566f39b..83626a87a1c 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch_No_Filtering.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch_No_Filtering.cpp
@@ -11,11 +11,6 @@ ACE_RCSID(RT_Notify, TAO_NS_Method_Request_Dispatch_No_Filtering, "$Id$")
#include "tao/debug.h"
#include "ProxySupplier.h"
#include "Consumer.h"
-#include "Proxy.h"
-#include "Admin.h"
-#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
TAO_NS_Method_Request_Dispatch_No_Filtering::TAO_NS_Method_Request_Dispatch_No_Filtering (const TAO_NS_Event_var& event, TAO_NS_ProxySupplier* proxy_supplier)
: TAO_NS_Method_Request_Event (event), proxy_supplier_ (proxy_supplier), refcountable_guard_ (*proxy_supplier)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch_No_Filtering.h b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch_No_Filtering.h
index 8056e7f4d86..153caadc5d5 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch_No_Filtering.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Dispatch_No_Filtering.h
@@ -20,7 +20,9 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "Method_Request.h"
-#include "Types.h"
+#include "Refcountable.h"
+
+class TAO_NS_ProxySupplier;
/**
* @class TAO_NS_Method_Request_Dispatch_No_Filtering
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Lookup.cpp b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Lookup.cpp
index 54f9bb38702..5dc8208a752 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Lookup.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Lookup.cpp
@@ -9,15 +9,12 @@
ACE_RCSID(RT_Notify, TAO_NS_Method_Request_Lookup, "$Id$")
#include "tao/debug.h"
-#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
-#include "Event_Map_T.h"
+#include "Consumer_Map.h"
#include "ProxySupplier.h"
#include "ProxyConsumer.h"
#include "Proxy.h"
#include "Admin.h"
-#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
+#include "SupplierAdmin.h"
TAO_NS_Method_Request_Lookup::TAO_NS_Method_Request_Lookup (const TAO_NS_Event_var& event, TAO_NS_ProxyConsumer* proxy_consumer, TAO_NS_Consumer_Map* map)
: TAO_NS_Method_Request_Event (event), proxy_consumer_ (proxy_consumer), map_ (map),
@@ -42,7 +39,12 @@ TAO_NS_Method_Request_Lookup::execute (ACE_ENV_SINGLE_ARG_DECL)
if (this->proxy_consumer_->has_shutdown ())
return 0; // If we were shutdown while waiting in the queue, return with no action.
- CORBA::Boolean val = this->proxy_consumer_->check_filters (this->event_ ACE_ENV_ARG_PARAMETER);
+ TAO_NS_Admin* parent = this->proxy_consumer_->supplier_admin ();
+
+ CORBA::Boolean val = this->proxy_consumer_->check_filters (this->event_,
+ parent->filter_admin (),
+ parent->filter_operator ()
+ ACE_ENV_ARG_PARAMETER);
if (TAO_debug_level > 1)
ACE_DEBUG ((LM_DEBUG, "Proxyconsumer %x filter eval result = %d",this->proxy_consumer_ , val));
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Lookup.h b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Lookup.h
index 9d22e5acf02..4de8749c7e9 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Lookup.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Lookup.h
@@ -21,7 +21,10 @@
#include "orbsvcs/ESF/ESF_Worker.h"
#include "Method_Request.h"
-#include "Types.h"
+#include "ProxySupplier.h"
+#include "Consumer_Map.h"
+
+class TAO_NS_ProxyConsumer;
/**
* @class TAO_NS_Method_Request_Lookup
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.h b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.h
index 00e68a21f18..282b5df3097 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.h
@@ -20,13 +20,15 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "Method_Request.h"
-#include "Types.h"
#include "EventTypeSeq.h"
+#include "Refcountable.h"
+
+class TAO_NS_Proxy;
/**
* @class TAO_NS_Method_Request_Updates
*
- * @brief
+ * @brief Command Object to send updates to proxys.
*
*/
class TAO_Notify_Export TAO_NS_Method_Request_Updates : public TAO_NS_Method_Request
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Default_POA_Factory.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_Default_POA_Factory.h
index c2dc512c414..260305bc972 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Notify_Default_POA_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Default_POA_Factory.h
@@ -25,7 +25,7 @@
*
* @brief Maintained for backward compatibility.
*/
-class TAO_Notify_Export TAO_Notify_Default_POA_Factory
+class TAO_Notify_Export TAO_Notify_Default_POA_Factory
{
public:
/// Helper function to register the default factory into the service
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.cpp
index d2c836538e2..21bd6f97f15 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.cpp
@@ -12,7 +12,7 @@ TAO_Notify_EventChannelFactory_i::create (PortableServer::POA_ptr default_POA AC
{
CosNotifyChannelAdmin::EventChannelFactory_var notify_factory;
- TAO_NS_Service* notify_service = ACE_Dynamic_Service<TAO_NS_Service>::instance (TAO_NS_COS_NOTIFICATION_SERVICE_NAME);
+ TAO_Notify_Service* notify_service = ACE_Dynamic_Service<TAO_Notify_Service>::instance (TAO_NS_COS_NOTIFICATION_SERVICE_NAME);
if (notify_service == 0)
{
@@ -38,10 +38,10 @@ TAO_Notify_EventChannelFactory_i::create (PortableServer::POA_ptr default_POA AC
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Dynamic_Service<TAO_NS_Service>;
+template class ACE_Dynamic_Service<TAO_Notify_Service>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Dynamic_Service<TAO_NS_Service>
+#pragma instantiate ACE_Dynamic_Service<TAO_Notify_Service>
#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Object.cpp b/TAO/orbsvcs/orbsvcs/Notify/Object.cpp
index ff30657d816..825f6ab6075 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Object.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Object.cpp
@@ -16,39 +16,57 @@
ACE_RCSID(RT_Notify, TAO_NS_Object, "$Id$")
TAO_NS_Object::TAO_NS_Object (void)
- :event_manager_ (0), admin_properties_ (0), id_ (0), poa_ (0), worker_task_ (0), own_worker_task_ (0), proxy_poa_ (0), own_proxy_poa_ (0), shutdown_ (0)
+ : event_manager_ (0)
+ , admin_properties_ (0)
+ , id_ (0)
+ , poa_ (0)
+ , proxy_poa_ (0)
+ , own_proxy_poa_ (0)
+ , object_poa_ (0)
+ , own_object_poa_ (0)
+ , worker_task_ (0)
+ , own_worker_task_ (0)
+ , shutdown_ (0)
{
- if (TAO_debug_level > 1 )
+ if (TAO_debug_level > 2 )
ACE_DEBUG ((LM_DEBUG,"object:%x created\n", this ));
}
TAO_NS_Object::~TAO_NS_Object ()
{
- if (TAO_debug_level > 1 )
+ if (TAO_debug_level > 2 )
ACE_DEBUG ((LM_DEBUG,"object:%x destroyed\n", this ));
}
void
-TAO_NS_Object::init (TAO_NS_POA_Helper* poa, TAO_NS_POA_Helper* proxy_poa, TAO_NS_Worker_Task* worker_task)
+TAO_NS_Object::init (TAO_NS_Object* parent)
{
- poa_ = poa;
- proxy_poa_ = proxy_poa;
- worker_task_ = worker_task;
+ this->event_manager_ = parent->event_manager_;
+ this->admin_properties_ = parent->admin_properties_;
+
+ this->poa_ = parent->poa_;
+ this->object_poa_ = parent->object_poa_;
+ this->proxy_poa_ = parent->proxy_poa_;
+ this->worker_task_ = parent->worker_task_;
if (this->worker_task_)
this->worker_task_->_incr_refcnt ();
+
+ // Pass QoS
+ parent->qos_properties_.transfer (this->qos_properties_);
+ this->qos_changed (this->qos_properties_);
}
CORBA::Object_ptr
-TAO_NS_Object::activate (ACE_ENV_SINGLE_ARG_DECL)
+TAO_NS_Object::activate (PortableServer::Servant servant ACE_ENV_ARG_DECL)
{
- return poa_->activate (this->servant (), id_ ACE_ENV_ARG_PARAMETER);
+ return this->poa_->activate (servant, this->id_ ACE_ENV_ARG_PARAMETER);
}
void
TAO_NS_Object::deactivate (ACE_ENV_SINGLE_ARG_DECL)
{
- poa_->deactivate (id_ ACE_ENV_ARG_PARAMETER);
+ this->poa_->deactivate (this->id_ ACE_ENV_ARG_PARAMETER);
}
int
@@ -74,14 +92,14 @@ TAO_NS_Object::shutdown (ACE_ENV_SINGLE_ARG_DECL)
CORBA::Object_ptr
TAO_NS_Object::ref (ACE_ENV_SINGLE_ARG_DECL)
{
- return poa_->id_to_reference (id_ ACE_ENV_ARG_PARAMETER);
+ return this->poa_->id_to_reference (this->id_ ACE_ENV_ARG_PARAMETER);
}
void
TAO_NS_Object::shutdown_worker_task (void)
{
// Only do this if we are the owner.
- if (own_worker_task_ == 1)
+ if (this->own_worker_task_ == 1)
{
this->worker_task_->shutdown (); // the worker deletes itself when its <close> hook is eventually called.
}
@@ -93,11 +111,44 @@ TAO_NS_Object::shutdown_worker_task (void)
void
TAO_NS_Object::shutdown_proxy_poa (void)
{
- if (own_proxy_poa_ == 1)
+ if (this->own_proxy_poa_ == 1)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- proxy_poa_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- delete proxy_poa_;
+ ACE_TRY_NEW_ENV
+ {
+ this->proxy_poa_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ delete this->proxy_poa_;
+ }
+ ACE_CATCHANY
+ {
+ if (TAO_debug_level > 2)
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Proxy shutdown error (%P|%t)\n");
+ }
+ ACE_ENDTRY;
+ }
+}
+
+void
+TAO_NS_Object::shutdown_object_poa (void)
+{
+ if (this->own_object_poa_ == 1)
+ {
+ ACE_TRY_NEW_ENV
+ {
+ this->object_poa_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ delete this->object_poa_;
+ }
+ ACE_CATCHANY
+ {
+ if (TAO_debug_level > 2)
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Proxy shutdown error (%P|%t)\n");
+ }
+ ACE_ENDTRY;
}
}
@@ -125,9 +176,9 @@ TAO_NS_Object::worker_task (TAO_NS_Worker_Task* worker_task)
}
void
-TAO_NS_Object::proxy_poa (TAO_NS_POA_Helper* proxy_poa)
+TAO_NS_Object::proxy_poa_own (TAO_NS_POA_Helper* proxy_poa)
{
- // shutdown current poa.
+ // shutdown current proxy poa.
this->shutdown_proxy_poa ();
this->proxy_poa_ = proxy_poa;
@@ -137,78 +188,54 @@ TAO_NS_Object::proxy_poa (TAO_NS_POA_Helper* proxy_poa)
}
void
+TAO_NS_Object::object_poa_own (TAO_NS_POA_Helper* object_poa)
+{
+ // shutdown current object poa.
+ this->shutdown_object_poa ();
+
+ // shutdown current object poa
+ this->object_poa_ = object_poa;
+
+ // claim ownership.
+ this->own_object_poa_ = 1;
+}
+
+void
TAO_NS_Object::set_qos (const CosNotification::QoSProperties & qos ACE_ENV_ARG_DECL)
{
CosNotification::PropertyErrorSeq err_seq;
- TAO_NS_QoSProperties qos_properties;
+ TAO_NS_QoSProperties new_qos_properties;
- qos_properties.init (qos, err_seq);
+ if (new_qos_properties.init (qos, err_seq) == -1)
+ ACE_THROW (CORBA::INTERNAL ());
// Apply the appropriate concurrency QoS
- if (qos_properties.thread_pool ().is_valid ())
+ if (new_qos_properties.thread_pool ().is_valid ())
{
- if (qos_properties.thread_pool ().value ().static_threads == 0)
- this->apply_reactive_concurrency (ACE_ENV_SINGLE_ARG_PARAMETER);
+ if (new_qos_properties.thread_pool ().value ().static_threads == 0)
+ TAO_NS_PROPERTIES::instance()->builder()->apply_reactive_concurrency (*this ACE_ENV_ARG_PARAMETER);
else
- this->apply_thread_pool_concurrency (qos_properties.thread_pool ().value () ACE_ENV_ARG_PARAMETER);
+ TAO_NS_PROPERTIES::instance()->builder()->
+ apply_thread_pool_concurrency (*this, new_qos_properties.thread_pool ().value () ACE_ENV_ARG_PARAMETER);
}
- else if (qos_properties.thread_pool_lane ().is_valid ())
- this->apply_lane_concurrency (qos_properties.thread_pool_lane ().value () ACE_ENV_ARG_PARAMETER);
+ else if (new_qos_properties.thread_pool_lane ().is_valid ())
+ TAO_NS_PROPERTIES::instance()->builder()->
+ apply_lane_concurrency (*this, new_qos_properties.thread_pool_lane ().value () ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
// Update the Thread Task's QoS properties..
- this->worker_task_->update_qos_properties (qos_properties);
+ this->worker_task_->update_qos_properties (new_qos_properties);
// Inform subclasses of QoS changed.
- this->qos_changed (qos_properties);
+ this->qos_changed (new_qos_properties);
// Init the the overall QoS on this object.
- if (this->qos_properties_.init (qos, err_seq) == 1) // Unsupported Property
- ACE_THROW (CosNotification::UnsupportedQoS (err_seq));
-}
-
-void
-TAO_NS_Object::apply_reactive_concurrency (ACE_ENV_SINGLE_ARG_DECL)
-{
- TAO_NS_Reactive_Task* worker_task;
-
- ACE_NEW_THROW_EX (worker_task,
- TAO_NS_Reactive_Task (),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- worker_task->init (this->admin_properties_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->worker_task_own (worker_task);
+ if (new_qos_properties.copy (this->qos_properties_) == -1)
+ ACE_THROW (CORBA::INTERNAL ());
- this->worker_task_->_decr_refcnt ();
-}
-
-void
-TAO_NS_Object::apply_thread_pool_concurrency (const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL)
-{
- TAO_NS_ThreadPool_Task* worker_task;
-
- ACE_NEW_THROW_EX (worker_task,
- TAO_NS_ThreadPool_Task (),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- worker_task->init (tp_params, this->admin_properties_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->worker_task_own (worker_task);
-
- this->worker_task_->_decr_refcnt ();
-}
-
-void
-TAO_NS_Object::apply_lane_concurrency (const NotifyExt::ThreadPoolLanesParams& /*tpl_params*/ ACE_ENV_ARG_DECL)
-{
- // No lane support
- ACE_THROW (CORBA::NO_IMPLEMENT ());
+ if (err_seq.length () > 0) // Unsupported Property
+ ACE_THROW (CosNotification::UnsupportedQoS (err_seq));
}
CosNotification::QoSProperties*
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Object.h b/TAO/orbsvcs/orbsvcs/Notify/Object.h
index 5c071d37d48..43c2906996b 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Object.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Object.h
@@ -19,10 +19,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "tao/corba.h"
#include "tao/PortableServer/Servant_Base.h"
#include "orbsvcs/NotifyExtC.h"
-#include "Types.h"
#include "QoSProperties.h"
#include "AdminProperties.h"
#include "Refcountable.h"
@@ -33,14 +31,6 @@ class TAO_NS_Event_Manager;
class TAO_NS_Timer;
/**
- * @class TAO_NS_Object_Id
- *
- * @brief Id for Objects.
- *
- */
-typedef CORBA::Long TAO_NS_Object_Id;
-
-/**
* @class TAO_NS_Object
*
* @brief Base Object for RT_Notify's CORBA Objects.
@@ -51,24 +41,27 @@ class TAO_Notify_Export TAO_NS_Object : public TAO_NS_Refcountable
friend class TAO_NS_Builder;
public:
+ /// Id for Objects.
+ typedef CORBA::Long ID;
+
/// Constuctor
TAO_NS_Object (void);
/// Destructor
virtual ~TAO_NS_Object (void);
- /// Init.
- void init (TAO_NS_POA_Helper* poa, TAO_NS_POA_Helper* proxy_poa, TAO_NS_Worker_Task* worker_task);
-
/// This Object's ID
- CORBA::Long id (void);
+ ID id (void);
/// Activate
- CORBA::Object_ptr activate (ACE_ENV_SINGLE_ARG_DECL);
+ virtual CORBA::Object_ptr activate (PortableServer::Servant servant ACE_ENV_ARG_DECL);
/// Deactivate
void deactivate (ACE_ENV_SINGLE_ARG_DECL);
+ /// Have we been shutdown. returns 1 if shutdown.
+ int has_shutdown (void);
+
/// Get CORBA Ref.
CORBA::Object_ptr ref (ACE_ENV_SINGLE_ARG_DECL);
@@ -79,54 +72,51 @@ public:
TAO_NS_POA_Helper* poa (void);
/// Setting the proxy_poa_ gives ownership to this class.
- void proxy_poa (TAO_NS_POA_Helper* proxy_poa);
+ void proxy_poa_own (TAO_NS_POA_Helper* proxy_poa);
/// Accessor for the proxy_poa_
TAO_NS_POA_Helper* proxy_poa (void);
+ /// Setting the object_poa_ gives ownership to this class.
+ void object_poa_own (TAO_NS_POA_Helper* object_poa);
+
+ /// Accessor for the object_poa_
+ TAO_NS_POA_Helper* object_poa (void);
+
/// Set Worker Task. This object assume ownership of the set object.
void worker_task_own (TAO_NS_Worker_Task* worker_task);
/// Set Worker Task. Does not assume ownership.
void worker_task (TAO_NS_Worker_Task* worker_task);
- /// Get the QoS Properties.
- CosNotification::QoSProperties* get_qos (ACE_ENV_SINGLE_ARG_DECL);
-
- /// shutdown
- virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Have we been shutdown. returns 1 if shutdown.
- int has_shutdown (void);
-
/// Set the QoS Properties.
virtual void set_qos (const CosNotification::QoSProperties & qos ACE_ENV_ARG_DECL);
+ /// Get the QoS Properties.
+ CosNotification::QoSProperties* get_qos (ACE_ENV_SINGLE_ARG_DECL);
+
/// Obtain the Timer manager associated with this object.
virtual TAO_NS_Timer* timer (void);
+ /// shutdown. Returns 1 ifif the shutdown was already run once before.
+ virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
+
protected:
+ /// Init this object with data from <rhs>.
+ void init (TAO_NS_Object* parent);
+
/// Shutdown the current worker task and delete it if we own it.
void shutdown_worker_task (void);
/// Shutdown the current proxy poa.
void shutdown_proxy_poa (void);
+ /// Shutdown the current object poa.
+ void shutdown_object_poa (void);
+
/// Notification that can be overridden by subclasses to be informed that <qos_properties_> have been modified.
virtual void qos_changed (const TAO_NS_QoSProperties& qos_properties);
- /// Servant which we use. This must be implemented by subclasses.
- virtual PortableServer::Servant servant (void) = 0;
-
- /// Apply Reactive concurrency.
- virtual void apply_reactive_concurrency (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Apply Thread Pools.
- virtual void apply_thread_pool_concurrency (const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL);
-
- /// Apply Thread Pools with Lanes.
- virtual void apply_lane_concurrency (const NotifyExt::ThreadPoolLanesParams& tpl_params ACE_ENV_ARG_DECL);
-
///= Protected data members.
/// The event manager.
@@ -139,23 +129,29 @@ protected:
TAO_NS_QoSProperties qos_properties_;
/// Id assigned to this object
- TAO_NS_Object_Id id_;
+ ID id_;
/// The POA in which the object is activated.
TAO_NS_POA_Helper* poa_;
- /// Worker Task.
- TAO_NS_Worker_Task* worker_task_;
-
- /// Ownership flag
- int own_worker_task_;
-
/// The POA in which the proxys are activated.
TAO_NS_POA_Helper* proxy_poa_;
/// Flag that indicates if we own <proxy_poa_>
int own_proxy_poa_;
+ /// The POA in which the object's children are activated.
+ TAO_NS_POA_Helper* object_poa_;
+
+ /// Flag that indicates if we own <object_poa_>
+ int own_object_poa_;
+
+ /// Worker Task.
+ TAO_NS_Worker_Task* worker_task_;
+
+ /// Ownership flag
+ int own_worker_task_;
+
/// Are we shutdown (i,e. scheduled for destroy).
int shutdown_;
};
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Object.inl b/TAO/orbsvcs/orbsvcs/Notify/Object.inl
index 03cc08ab9a2..251c0655e6d 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Object.inl
+++ b/TAO/orbsvcs/orbsvcs/Notify/Object.inl
@@ -19,6 +19,12 @@ TAO_NS_Object::poa (void)
}
ACE_INLINE TAO_NS_POA_Helper*
+TAO_NS_Object::object_poa (void)
+{
+ return this->object_poa_;
+}
+
+ACE_INLINE TAO_NS_POA_Helper*
TAO_NS_Object::proxy_poa (void)
{
return this->proxy_poa_;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp b/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp
index 34a959d79fc..36b950eec2b 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp
@@ -39,7 +39,6 @@ TAO_NS_POA_Helper::init (PortableServer::POA_ptr parent_poa ACE_ENV_ARG_DECL)
this->init (parent_poa, child_poa_name ACE_ENV_ARG_PARAMETER);
}
-
void
TAO_NS_POA_Helper::set_policy (PortableServer::POA_ptr parent_poa, CORBA::PolicyList &policy_list ACE_ENV_ARG_DECL)
{
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Peer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Peer.cpp
index c3d84fdf1ed..4a26d732d85 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Peer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Peer.cpp
@@ -10,11 +10,6 @@ ACE_RCSID(Notify, TAO_NS_Peer, "$id$")
#include "tao/debug.h"
#include "Proxy.h"
-#include "Proxy.h"
-#include "Admin.h"
-#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
TAO_NS_Peer::TAO_NS_Peer (void)
{
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Peer.h b/TAO/orbsvcs/orbsvcs/Notify/Peer.h
index ecebddc287b..13dd08e5ab2 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Peer.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Peer.h
@@ -20,14 +20,12 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "orbsvcs/CosNotificationC.h"
-#include "Destroy_Callback.h"
#include "EventTypeSeq.h"
class TAO_NS_Proxy;
class TAO_NS_QoSProperties;
class TAO_NS_Peer;
-
/**
* @class TAO_NS_Peer
*
@@ -35,7 +33,7 @@ class TAO_NS_Peer;
* This object delegates its reference count to its creator proxy object.
*
*/
-class TAO_Notify_Export TAO_NS_Peer : public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_Peer
{
public:
/// Constuctor
@@ -48,6 +46,9 @@ public:
CORBA::ULong _incr_refcnt (void);
CORBA::ULong _decr_refcnt (void);
+ /// Release
+ virtual void release (void) = 0;
+
/// Shutdown the peer.
virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL);
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Proxy.cpp b/TAO/orbsvcs/orbsvcs/Notify/Proxy.cpp
index 906d4442389..f8a9d298565 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Proxy.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Proxy.cpp
@@ -10,13 +10,10 @@ ACE_RCSID(RT_Notify, TAO_NS_Proxy, "$Id$")
#include "Peer.h"
#include "Proxy.h"
-#include "Admin.h"
-#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
#include "Method_Request_Updates.h"
#include "Worker_Task.h"
#include "Properties.h"
+#include "POA_Helper.h"
TAO_NS_Proxy::TAO_NS_Proxy (void)
:updates_off_ (0)
@@ -27,6 +24,21 @@ TAO_NS_Proxy::~TAO_NS_Proxy ()
{
}
+CORBA::Object_ptr
+TAO_NS_Proxy::activate (PortableServer::Servant servant ACE_ENV_ARG_DECL)
+{
+ // Set the POA that we use to return our <ref>
+ this->poa_ = this->proxy_poa_;
+
+ return this->proxy_poa_->activate (servant, this->id_ ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_NS_Proxy::deactivate (ACE_ENV_SINGLE_ARG_DECL)
+{
+ this->proxy_poa_->deactivate (this->id_ ACE_ENV_ARG_PARAMETER);
+}
+
void
TAO_NS_Proxy::subscribed_types (TAO_NS_EventTypeSeq& subscribed_types ACE_ENV_ARG_DECL)
{
@@ -55,16 +67,19 @@ TAO_NS_Proxy::types_changed (const TAO_NS_EventTypeSeq& added, const TAO_NS_Even
}
CORBA::Boolean
-TAO_NS_Proxy::check_filters (const TAO_NS_Event_var &event ACE_ENV_ARG_DECL)
+TAO_NS_Proxy::check_filters (const TAO_NS_Event_var &event
+ , TAO_NS_FilterAdmin& parent_filter_admin
+ , CosNotifyChannelAdmin::InterFilterGroupOperator filter_operator
+ ACE_ENV_ARG_DECL)
{
// check if it passes the parent filter.
CORBA::Boolean parent_val =
- this->parent_->filter_admin ().match (event ACE_ENV_ARG_PARAMETER);
+ parent_filter_admin.match (event ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
CORBA::Boolean val = 0;
- if (this->parent_->filter_operator () == CosNotifyChannelAdmin::AND_OP)
+ if (filter_operator == CosNotifyChannelAdmin::AND_OP)
{
val = parent_val && this->filter_admin_.match (event ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Proxy.h b/TAO/orbsvcs/orbsvcs/Notify/Proxy.h
index 6fb58b71f10..454235ab477 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Proxy.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Proxy.h
@@ -19,7 +19,7 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "Object_T.h"
+#include "Object.h"
#include "EventTypeSeq.h"
#include "FilterAdmin.h"
#include "Admin.h"
@@ -33,22 +33,34 @@ class TAO_NS_Peer;
* @brief Base class proxy for all proxys in NS.
*
*/
-class TAO_Notify_Export TAO_NS_Proxy : public virtual TAO_NS_Object_T <TAO_NS_Proxy, TAO_NS_Admin>
+class TAO_Notify_Export TAO_NS_Proxy : public virtual TAO_NS_Object
{
friend class TAO_NS_Peer;
public:
+ typedef CosNotifyChannelAdmin::ProxyIDSeq SEQ;
+ typedef CosNotifyChannelAdmin::ProxyIDSeq_var SEQ_VAR;
+
/// Constuctor
TAO_NS_Proxy (void);
/// Destructor
~TAO_NS_Proxy ();
+ /// Activate
+ virtual CORBA::Object_ptr activate (PortableServer::Servant servant ACE_ENV_ARG_DECL);
+
+ /// Deactivate
+ void deactivate (ACE_ENV_SINGLE_ARG_DECL);
+
/// Obtain the Proxy's subscribed types.
void subscribed_types (TAO_NS_EventTypeSeq& subscribed_types ACE_ENV_ARG_DECL);
/// Check if this event passes the admin and proxy filters.
- CORBA::Boolean check_filters (const TAO_NS_Event_var &event ACE_ENV_ARG_DECL);
+ CORBA::Boolean check_filters (const TAO_NS_Event_var &event
+ , TAO_NS_FilterAdmin& parent_filter_admin
+ , CosNotifyChannelAdmin::InterFilterGroupOperator filter_operator
+ ACE_ENV_ARG_DECL);
/// Inform this proxy that the following types are being advertised.
void types_changed (const TAO_NS_EventTypeSeq& added, const TAO_NS_EventTypeSeq& removed ACE_ENV_ARG_DECL);
@@ -78,7 +90,6 @@ public:
virtual void qos_changed (const TAO_NS_QoSProperties& qos_properties);
protected:
- typedef TAO_NS_Object_T <TAO_NS_Proxy, TAO_NS_Admin> inherited;
/// Filter Administration
TAO_NS_FilterAdmin filter_admin_;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp
index cd7bfab096a..aa2a58f83fd 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp
@@ -14,21 +14,21 @@ ACE_RCSID(RT_Notify, TAO_NS_ProxyConsumer, "$Id$")
#include "AdminProperties.h"
#include "Property.h"
#include "Proxy.h"
-#include "Admin.h"
-#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
#include "Event_Manager.h"
#include "Method_Request_Lookup.h"
#include "Worker_Task.h"
+#include "Properties.h"
+#include "SupplierAdmin.h"
TAO_NS_ProxyConsumer::TAO_NS_ProxyConsumer (void)
- :supplier_ (0)
+ : supplier_admin_ (0)
+ , supplier_ (0)
{
}
TAO_NS_ProxyConsumer::~TAO_NS_ProxyConsumer ()
{
+ this->supplier_admin_->_decr_refcnt ();
}
TAO_NS_Peer*
@@ -38,6 +38,22 @@ TAO_NS_ProxyConsumer::peer (void)
}
void
+TAO_NS_ProxyConsumer::init (TAO_NS_SupplierAdmin* supplier_admin ACE_ENV_ARG_DECL)
+{
+ TAO_NS_Proxy::init (supplier_admin ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->supplier_admin_ = supplier_admin;
+
+ this->supplier_admin_->_incr_refcnt ();
+
+ const CosNotification::QoSProperties &default_ps_qos =
+ TAO_NS_PROPERTIES::instance ()->default_proxy_consumer_qos_properties ();
+
+ this->set_qos (default_ps_qos ACE_ENV_ARG_PARAMETER);
+}
+
+void
TAO_NS_ProxyConsumer::connect (TAO_NS_Supplier *supplier ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
@@ -64,7 +80,7 @@ TAO_NS_ProxyConsumer::connect (TAO_NS_Supplier *supplier ACE_ENV_ARG_DECL)
supplier_ = supplier;
- this->parent_->subscribed_types (this->subscribed_types_ ACE_ENV_ARG_PARAMETER); // get the parents subscribed types.
+ this->supplier_admin_->subscribed_types (this->subscribed_types_ ACE_ENV_ARG_PARAMETER); // get the parents subscribed types.
ACE_CHECK;
}
@@ -101,7 +117,7 @@ TAO_NS_ProxyConsumer::disconnect (ACE_ENV_SINGLE_ARG_DECL)
int
TAO_NS_ProxyConsumer::shutdown (ACE_ENV_SINGLE_ARG_DECL)
{
- if (this->inherited::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ if (this->TAO_NS_Object::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
return 1;
ACE_CHECK_RETURN (1);
@@ -116,6 +132,18 @@ TAO_NS_ProxyConsumer::shutdown (ACE_ENV_SINGLE_ARG_DECL)
}
void
+TAO_NS_ProxyConsumer::destroy (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
+
+ this->supplier_admin_->remove (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
TAO_NS_ProxyConsumer::push (TAO_NS_Event_var &event)
{
TAO_NS_Method_Request_Lookup request (event, this, this->event_manager_->consumer_map ());
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.h
index 976e82d8b99..807bcf152f3 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.h
@@ -21,10 +21,12 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "Event.h"
-#include "Supplier.h"
#include "Proxy.h"
#include "orbsvcs/CosEventChannelAdminC.h"
+class TAO_NS_SupplierAdmin;
+class TAO_NS_Supplier;
+
/**
* @class TAO_NS_ProxyConsumer
*
@@ -40,6 +42,9 @@ public:
/// Destructor
~TAO_NS_ProxyConsumer ();
+ /// Init
+ void init (TAO_NS_SupplierAdmin* supplier_admin ACE_ENV_ARG_DECL);
+
/// Connect
void connect (TAO_NS_Supplier* supplier ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((
@@ -53,6 +58,9 @@ public:
/// Shutdown (TAO_NS_Container_T method)
virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
+ /// Destroy this object.
+ virtual void destroy (ACE_ENV_SINGLE_ARG_DECL);
+
/// Start event propagation.
virtual void push (TAO_NS_Event_var &event);
@@ -65,7 +73,14 @@ public:
/// Return 1 if connected
int is_connected (void);
+ /// The SA parent.
+ TAO_NS_SupplierAdmin* supplier_admin (void);
+
protected:
+ ///= Data Members.
+ /// The SA parent.
+ TAO_NS_SupplierAdmin* supplier_admin_;
+
/// The Supplier that we're connect to.
TAO_NS_Supplier* supplier_;
};
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.inl b/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.inl
index b8dc2b1357f..ea4b07f8474 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.inl
+++ b/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.inl
@@ -11,3 +11,9 @@ TAO_NS_ProxyConsumer::supplier (void)
{
return this->supplier_;
}
+
+ACE_INLINE TAO_NS_SupplierAdmin*
+TAO_NS_ProxyConsumer::supplier_admin (void)
+{
+ return this->supplier_admin_;
+}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer_T.cpp
index 90a166ec142..7c75dd56b49 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer_T.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer_T.cpp
@@ -4,6 +4,7 @@
#define TAO_NS_PROXYCONSUMER_T_CPP
#include "ProxyConsumer_T.h"
+#include "SupplierAdmin.h"
#if ! defined (__ACE_INLINE__)
#include "ProxyConsumer_T.inl"
@@ -39,7 +40,7 @@ TAO_NS_ProxyConsumer_T<SERVANT_TYPE>::MyAdmin (ACE_ENV_SINGLE_ARG_DECL)
{
CosNotifyChannelAdmin::SupplierAdmin_var ret;
- CORBA::Object_var object = this->parent_->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
+ CORBA::Object_var object = this->supplier_admin_->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (ret._retn ());
ret = CosNotifyChannelAdmin::SupplierAdmin::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.cpp b/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.cpp
index cb24b194385..a663ed3b7ed 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.cpp
@@ -12,27 +12,37 @@ ACE_RCSID(RT_Notify, TAO_NS_ProxySupplier, "$Id$")
#include "Event_Manager.h"
#include "AdminProperties.h"
#include "Consumer.h"
-#include "Proxy.h"
-#include "Admin.h"
-#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
#include "Method_Request_Dispatch.h"
#include "Worker_Task.h"
#include "Buffering_Strategy.h"
+#include "Properties.h"
+#include "ConsumerAdmin.h"
TAO_NS_ProxySupplier::TAO_NS_ProxySupplier (void)
- :consumer_ (0)
+ : consumer_admin_ (0)
+ , consumer_ (0)
{
}
TAO_NS_ProxySupplier::~TAO_NS_ProxySupplier ()
{
+ this->consumer_admin_->_decr_refcnt ();
}
void
-TAO_NS_ProxySupplier::init_ps (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+TAO_NS_ProxySupplier::init (TAO_NS_ConsumerAdmin* consumer_admin ACE_ENV_ARG_DECL)
{
+ TAO_NS_Proxy::init (consumer_admin ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->consumer_admin_ = consumer_admin;
+
+ this->consumer_admin_->_incr_refcnt ();
+
+ const CosNotification::QoSProperties &default_ps_qos =
+ TAO_NS_PROPERTIES::instance ()->default_proxy_supplier_qos_properties ();
+
+ this->set_qos (default_ps_qos ACE_ENV_ARG_PARAMETER);
}
TAO_NS_Peer*
@@ -68,7 +78,7 @@ TAO_NS_ProxySupplier::connect (TAO_NS_Consumer *consumer ACE_ENV_ARG_DECL)
consumer_ = consumer;
- this->parent_->subscribed_types (this->subscribed_types_ ACE_ENV_ARG_PARAMETER); // get the parents subscribed types.
+ this->consumer_admin_->subscribed_types (this->subscribed_types_ ACE_ENV_ARG_PARAMETER); // get the parents subscribed types.
ACE_CHECK;
}
@@ -104,7 +114,7 @@ TAO_NS_ProxySupplier::disconnect (ACE_ENV_SINGLE_ARG_DECL)
int
TAO_NS_ProxySupplier::shutdown (ACE_ENV_SINGLE_ARG_DECL)
{
- if (this->inherited::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ if (this->TAO_NS_Object::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
return 1;
ACE_CHECK_RETURN (1);
@@ -119,6 +129,18 @@ TAO_NS_ProxySupplier::shutdown (ACE_ENV_SINGLE_ARG_DECL)
}
void
+TAO_NS_ProxySupplier::destroy (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
+
+ this->consumer_admin_->remove (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
TAO_NS_ProxySupplier::push (const TAO_NS_Event_var &event)
{
TAO_NS_Method_Request_Dispatch request (event, this);
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.h b/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.h
index 102ce63077d..dfb5bb590b9 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.h
@@ -24,6 +24,7 @@
#include "orbsvcs/CosEventChannelAdminC.h"
class TAO_NS_Consumer;
+class TAO_NS_ConsumerAdmin;
/**
* @class TAO_NS_ProxySupplier
@@ -42,8 +43,8 @@ public:
/// Destructor
virtual ~TAO_NS_ProxySupplier ();
- /// Init method.
- virtual void init_ps (ACE_ENV_SINGLE_ARG_DECL);
+ /// Init
+ virtual void init (TAO_NS_ConsumerAdmin* consumer_admin ACE_ENV_ARG_DECL);
/// Connect
void connect (TAO_NS_Consumer* consumer ACE_ENV_ARG_DECL)
@@ -63,6 +64,9 @@ public:
/// Override TAO_NS_Container_T::shutdown method
virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
+ /// Destroy this object.
+ virtual void destroy (ACE_ENV_SINGLE_ARG_DECL);
+
/// Override, TAO_NS_Proxy::qos_changed to apply MaxEventssPerConsumer QoS.
virtual void qos_changed (const TAO_NS_QoSProperties& qos_properties);
@@ -72,10 +76,18 @@ public:
/// Access the Consumer
TAO_NS_Consumer* consumer (void);
-protected:
/// Return 1 if connected
int is_connected (void);
+ /// The CA parent.
+ TAO_NS_ConsumerAdmin* consumer_admin (void);
+
+protected:
+
+ ///= Data Members.
+ /// The CA parent.
+ TAO_NS_ConsumerAdmin* consumer_admin_;
+
/// The Consumer that we're connect to.
TAO_NS_Consumer* consumer_;
};
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.inl b/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.inl
index e2aae869cd7..3c7852c9858 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.inl
+++ b/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier.inl
@@ -11,3 +11,9 @@ TAO_NS_ProxySupplier::consumer (void)
{
return this->consumer_;
}
+
+ACE_INLINE TAO_NS_ConsumerAdmin*
+TAO_NS_ProxySupplier::consumer_admin (void)
+{
+ return this->consumer_admin_;
+}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier_T.cpp
index 7db52521e8b..04db7d0d999 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier_T.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier_T.cpp
@@ -19,6 +19,7 @@ ACE_RCSID(Notify, TAO_NS_ProxySupplier_T, "$id$")
#include "Method_Request_Dispatch_No_Filtering.h"
#include "Worker_Task.h"
#include "Event_Manager.h"
+#include "ConsumerAdmin.h"
template <class SERVANT_TYPE>
TAO_NS_ProxySupplier_T<SERVANT_TYPE>::TAO_NS_ProxySupplier_T (void)
@@ -171,7 +172,7 @@ TAO_NS_ProxySupplier_T<SERVANT_TYPE>::MyAdmin (ACE_ENV_SINGLE_ARG_DECL)
{
CosNotifyChannelAdmin::ConsumerAdmin_var ret;
- CORBA::Object_var object = this->parent_->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
+ CORBA::Object_var object = this->consumer_admin_->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (ret._retn ());
ret = CosNotifyChannelAdmin::ConsumerAdmin::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Proxy_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Proxy_T.cpp
index 06291c3cf14..dd340c2b592 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Proxy_T.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Proxy_T.cpp
@@ -55,6 +55,10 @@ TAO_NS_Proxy_T<SERVANT_TYPE>::get_qos (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
return this->TAO_NS_Object::get_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
}
@@ -65,6 +69,9 @@ TAO_NS_Proxy_T<SERVANT_TYPE>::set_qos (const CosNotification::QoSProperties & qo
CosNotification::UnsupportedQoS
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+
this->TAO_NS_Object::set_qos (qos ACE_ENV_ARG_PARAMETER);
}
@@ -88,6 +95,10 @@ TAO_NS_Proxy_T<SERVANT_TYPE>::add_filter (CosNotifyFilter::Filter_ptr new_filter
CORBA::SystemException
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
return this->filter_admin_.add_filter (new_filter ACE_ENV_ARG_PARAMETER);
}
@@ -101,6 +112,9 @@ TAO_NS_Proxy_T<SERVANT_TYPE>::remove_filter (
CosNotifyFilter::FilterNotFound
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+
this->filter_admin_.remove_filter (filter ACE_ENV_ARG_PARAMETER);
}
@@ -111,6 +125,10 @@ TAO_NS_Proxy_T<SERVANT_TYPE>::get_filter (CosNotifyFilter::FilterID filter ACE_E
CosNotifyFilter::FilterNotFound
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (CosNotifyFilter::Filter::_nil ());
+
return this->filter_admin_.get_filter (filter ACE_ENV_ARG_PARAMETER);
}
@@ -120,6 +138,10 @@ TAO_NS_Proxy_T<SERVANT_TYPE>::get_all_filters (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
return this->filter_admin_.get_all_filters (ACE_ENV_SINGLE_ARG_PARAMETER);
}
@@ -129,6 +151,9 @@ TAO_NS_Proxy_T<SERVANT_TYPE>::remove_all_filters (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+
this->filter_admin_.remove_all_filters (ACE_ENV_SINGLE_ARG_PARAMETER);
}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/QoSProperties.cpp b/TAO/orbsvcs/orbsvcs/Notify/QoSProperties.cpp
index 2a8672aa1f6..ca2e0da3330 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/QoSProperties.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/QoSProperties.cpp
@@ -75,8 +75,8 @@ TAO_NS_QoSProperties::init (const CosNotification::PropertySeq& prop_seq, CosNot
return err_index == -1 ? 0 : 1;
}
-void
-TAO_NS_QoSProperties::transfer (TAO_NS_QoSProperties& qos_properties)
+int
+TAO_NS_QoSProperties::copy (TAO_NS_QoSProperties& qos_properties)
{
qos_properties.priority_ = this->priority_;
qos_properties.timeout_ = this->timeout_;
@@ -89,12 +89,24 @@ TAO_NS_QoSProperties::transfer (TAO_NS_QoSProperties& qos_properties)
for (; iter.next (entry); iter.advance ())
{
- qos_properties.property_map_.bind (entry->ext_id_, entry->int_id_);
+ if (qos_properties.property_map_.rebind (entry->ext_id_, entry->int_id_) == -1)
+ return -1;
}
+ return 0;
+}
+
+int
+TAO_NS_QoSProperties::transfer (TAO_NS_QoSProperties& qos_properties)
+{
+ if (this->copy (qos_properties) == -1)
+ return -1;
+
// unbind the properties that we don't want to transfer.
qos_properties.property_map_.unbind (NotifyExt::ThreadPool);
qos_properties.property_map_.unbind (NotifyExt::ThreadPoolLanes);
+
+ return 0;
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/QoSProperties.h b/TAO/orbsvcs/orbsvcs/Notify/QoSProperties.h
index 08911f86ef4..0b65e375865 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/QoSProperties.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/QoSProperties.h
@@ -42,8 +42,11 @@ public:
/// Return 0 on success, 1 if unsupported properties were detected and -1 on error.
int init (const CosNotification::PropertySeq& prop_seq, CosNotification::PropertyErrorSeq& err_seq);
- /// Populate <qos_properties> with properties that can be transfered.
- void transfer (TAO_NS_QoSProperties& qos_properties);
+ /// Populate <qos_properties> with all properties from this object. Returns -1 on error.
+ int copy (TAO_NS_QoSProperties& qos_properties);
+
+ /// Populate <qos_properties> with properties that can be transfered.Returns -1 on error.
+ int transfer (TAO_NS_QoSProperties& qos_properties);
///= Accessors
/// ThreadPool
diff --git a/TAO/orbsvcs/orbsvcs/Notify/README b/TAO/orbsvcs/orbsvcs/Notify/README
index 05684cec2d4..1f7797efc39 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/README
+++ b/TAO/orbsvcs/orbsvcs/Notify/README
@@ -1,4 +1,4 @@
-$Id$
+README,v 1.5 2000/12/07 05:56:27 pradeep Exp
README for the Notification Service
-----------------------------------
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Builder.cpp b/TAO/orbsvcs/orbsvcs/Notify/RT_Builder.cpp
new file mode 100644
index 00000000000..3b564912b81
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Builder.cpp
@@ -0,0 +1,76 @@
+// $Id$
+
+#include "RT_Builder.h"
+
+#include "ace/Auto_Ptr.h"
+#include "ace/Dynamic_Service.h"
+#include "ETCL_FilterFactory.h"
+#include "RT_POA_Helper.h"
+#include "Properties.h"
+#include "orbsvcs/NotifyExtC.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "RT_Builder.inl"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(RT_Notify, TAO_NS_RT_Builder, "$Id$")
+
+TAO_NS_RT_Builder::TAO_NS_RT_Builder (void)
+{
+}
+
+TAO_NS_RT_Builder::~TAO_NS_RT_Builder ()
+{
+}
+
+void
+TAO_NS_RT_Builder::apply_thread_pool_concurrency (TAO_NS_Object& object
+ , const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL)
+{
+ TAO_NS_RT_POA_Helper* proxy_poa = 0;
+
+ // Bootstrap EC Proxy POA
+ ACE_NEW_THROW_EX (proxy_poa,
+ TAO_NS_RT_POA_Helper (),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK;
+
+ auto_ptr<TAO_NS_POA_Helper> auto_proxy_poa (proxy_poa);
+
+ PortableServer::POA_var default_poa = TAO_NS_PROPERTIES::instance ()->default_poa ();
+
+ proxy_poa->init (default_poa.in (), tp_params ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Give ownership of proxy_poa
+ object.proxy_poa_own (proxy_poa);
+
+ // release auto ref.
+ auto_proxy_poa.release ();
+}
+
+void
+TAO_NS_RT_Builder::apply_lane_concurrency (TAO_NS_Object& object
+ , const NotifyExt::ThreadPoolLanesParams& tpl_params ACE_ENV_ARG_DECL)
+{
+ TAO_NS_RT_POA_Helper* proxy_poa = 0;
+
+ // Bootstrap EC Proxy POA
+ ACE_NEW_THROW_EX (proxy_poa,
+ TAO_NS_RT_POA_Helper (),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK;
+
+ auto_ptr<TAO_NS_POA_Helper> auto_proxy_poa (proxy_poa);
+
+ PortableServer::POA_var default_poa = TAO_NS_PROPERTIES::instance ()->default_poa ();
+
+ proxy_poa->init (default_poa.in (), tpl_params ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Give ownership of proxy_poa
+ object.proxy_poa_own (proxy_poa);
+
+ // release auto ref.
+ auto_proxy_poa.release ();
+}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Builder.h b/TAO/orbsvcs/orbsvcs/Notify/RT_Builder.h
new file mode 100644
index 00000000000..ca8beb37ad6
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Builder.h
@@ -0,0 +1,51 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_Builder.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_BUILDER_H
+#define TAO_NS_RT_BUILDER_H
+#include "ace/pre.h"
+
+#include "rt_notify_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Builder.h"
+
+/**
+ * @class TAO_NS_RT_Builder
+ *
+ * @brief Builder for RT specific classes.
+ *
+ */
+class TAO_RT_Notify_Export TAO_NS_RT_Builder : public TAO_NS_Builder
+{
+public:
+ /// Constuctor
+ TAO_NS_RT_Builder (void);
+
+ /// Destructor
+ virtual ~TAO_NS_RT_Builder ();
+
+ /// Apply Thread Pools.
+ virtual void apply_thread_pool_concurrency (TAO_NS_Object& object, const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL);
+
+ /// Apply Thread Pools with Lanes.
+ virtual void apply_lane_concurrency (TAO_NS_Object& object, const NotifyExt::ThreadPoolLanesParams& tpl_params ACE_ENV_ARG_DECL);
+};
+
+#if defined (__ACE_INLINE__)
+#include "RT_Builder.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_NS_RT_BUILDER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Builder.inl b/TAO/orbsvcs/orbsvcs/Notify/RT_Builder.inl
new file mode 100644
index 00000000000..1ce3c730804
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Builder.inl
@@ -0,0 +1,3 @@
+// $Id$
+
+#include "RT_Builder.h"
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.cpp b/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.cpp
new file mode 100644
index 00000000000..5467527c8fc
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.cpp
@@ -0,0 +1,29 @@
+// $Id$
+
+#include "RT_Factory.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "RT_Factory.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "Structured/RT_StructuredProxyPushSupplier.h"
+
+ACE_RCSID(RT_Notify, TAO_NS_RT_Factory, "$Id$")
+
+TAO_NS_RT_Factory::TAO_NS_RT_Factory (void)
+{
+}
+
+TAO_NS_RT_Factory::~TAO_NS_RT_Factory ()
+{
+}
+
+void
+TAO_NS_RT_Factory::create (TAO_NS_StructuredProxyPushSupplier*& proxy ACE_ENV_ARG_DECL)
+{
+ ACE_NEW_THROW_EX (proxy,
+ TAO_NS_RT_StructuredProxyPushSupplier (),
+ CORBA::NO_MEMORY ());
+}
+
+ACE_FACTORY_DECLARE (TAO_Notify, TAO_NS_RT_Factory)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.h b/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.h
new file mode 100644
index 00000000000..f447f01f0ca
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.h
@@ -0,0 +1,50 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_Factory.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_FACTORY_H
+#define TAO_NS_RT_FACTORY_H
+#include "ace/pre.h"
+
+#include "rt_notify_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Default_Factory.h"
+
+/**
+ * @class TAO_NS_RT_Factory
+ *
+ * @brief The Factory for the RT aware Notify classes.
+ *
+ */
+class TAO_RT_Notify_Export TAO_NS_RT_Factory : public TAO_NS_Default_Factory
+{
+public:
+ /// Constuctor
+ TAO_NS_RT_Factory (void);
+
+ /// Destructor
+ virtual ~TAO_NS_RT_Factory ();
+
+ /// Create StructuredProxyPushSupplier
+ virtual void create (TAO_NS_StructuredProxyPushSupplier*& proxy ACE_ENV_ARG_DECL);
+};
+
+ACE_FACTORY_DECLARE (TAO_Notify, TAO_NS_RT_Factory)
+
+#if defined (__ACE_INLINE__)
+#include "RT_Factory.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_NS_RT_FACTORY_H */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.inl b/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.inl
new file mode 100644
index 00000000000..adb4497a7fa
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.inl
@@ -0,0 +1,3 @@
+// $Id$
+
+#include "RT_Factory.h"
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.cpp b/TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.cpp
new file mode 100644
index 00000000000..80eedfa5ff0
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.cpp
@@ -0,0 +1,97 @@
+// $Id$
+
+#include "RT_Notify_Service.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "RT_Notify_Service.inl"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(RT_Notify, TAO_NS_RT_Notify_Service, "$Id$")
+
+#include "ace/Dynamic_Service.h"
+#include "Properties.h"
+#include "RT_Properties.h"
+#include "RT_Factory.h"
+#include "RT_Builder.h"
+
+TAO_RT_Notify_Service::TAO_RT_Notify_Service (void)
+{
+}
+
+TAO_RT_Notify_Service::~TAO_RT_Notify_Service ()
+{
+}
+
+void
+TAO_RT_Notify_Service::init (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
+{
+ ACE_DEBUG ((LM_DEBUG, "Loading the Real-Time Notification Service...\n"));
+
+ this->init_i (orb ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_RT_Notify_Service::init_i (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
+{
+ //Init the base class.
+ TAO_CosNotify_Service::init_i (orb ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ TAO_NS_RT_Properties* properties = TAO_NS_RT_PROPERTIES::instance();
+
+ // Resolve RTORB
+ CORBA::Object_var object =
+ orb->resolve_initial_references ("RTORB"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ RTCORBA::RTORB_var rt_orb =
+ RTCORBA::RTORB::_narrow (object.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Resolve RTCurrent
+ object =
+ orb->resolve_initial_references ("RTCurrent"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ RTCORBA::Current_var current =
+ RTCORBA::Current::_narrow (object.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ /// Set the properties
+ properties->rt_orb (rt_orb.in ());
+ properties->current (current.in ());
+}
+
+void
+TAO_RT_Notify_Service::init_factory (ACE_ENV_SINGLE_ARG_DECL)
+{
+ this->factory_ = ACE_Dynamic_Service<TAO_NS_Factory>::instance ("TAO_NS_Factory");
+
+ if (this->factory_ == 0)
+ {
+ ACE_NEW_THROW_EX (this->factory_,
+ TAO_NS_RT_Factory (),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK;
+ }
+
+ TAO_NS_PROPERTIES::instance()->factory (this->factory_);
+}
+
+void
+TAO_RT_Notify_Service::init_builder (ACE_ENV_SINGLE_ARG_DECL)
+{
+ ACE_NEW_THROW_EX (this->builder_,
+ TAO_NS_RT_Builder (),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK;
+
+ TAO_NS_PROPERTIES::instance()->builder (this->builder_);
+}
+
+ACE_FACTORY_DEFINE (TAO_RT_Notify,TAO_RT_Notify_Service)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.h b/TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.h
new file mode 100644
index 00000000000..fc54827ae41
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.h
@@ -0,0 +1,60 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_Notify_Service.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_NOTIFY_SERVICE_H
+#define TAO_NS_RT_NOTIFY_SERVICE_H
+
+#include "ace/pre.h"
+#include "rt_notify_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "CosNotify_Service.h"
+
+/**
+ * @class TAO_RT_Notify_Service
+ *
+ * @brief Implemetation of the TAO_NS_Service interface for RT Notification.
+ *
+ */
+class TAO_RT_Notify_Export TAO_RT_Notify_Service : public TAO_CosNotify_Service
+{
+public:
+ /// Constuctor
+ TAO_RT_Notify_Service (void);
+
+ /// Destructor
+ ~TAO_RT_Notify_Service ();
+
+ /// Init the service.
+ virtual void init (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL);
+
+protected:
+ /// Init the data members
+ virtual void init_i (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL);
+
+ /// Create the Factory for RT Notify objects.
+ virtual void init_factory (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Creates the Builder for RT Notify objects.
+ virtual void init_builder (ACE_ENV_SINGLE_ARG_DECL);
+};
+
+ACE_FACTORY_DECLARE (TAO_RT_Notify,TAO_RT_Notify_Service)
+
+#if defined (__ACE_INLINE__)
+#include "RT_Notify_Service.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_NS_RT_NOTIFY_SERVICE_H */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.inl b/TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.inl
new file mode 100644
index 00000000000..2274b4dbd69
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Notify_Service.inl
@@ -0,0 +1,3 @@
+// $Id$
+
+#include "RT_Notify_Service.h"
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.cpp b/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.cpp
new file mode 100644
index 00000000000..16e29c5d437
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.cpp
@@ -0,0 +1,154 @@
+// $Id$
+
+#include "RT_POA_Helper.h"
+#include "tao/RTCORBA/RTCORBA.h"
+#include "tao/debug.h"
+#include "orbsvcs/NotifyExtC.h"
+#include "RT_Properties.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "RT_POA_Helper.inl"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(RT_Notify, TAO_NS_RT_POA_Helper, "$Id$")
+
+TAO_NS_RT_POA_Helper::~TAO_NS_RT_POA_Helper ()
+{
+}
+
+void
+TAO_NS_RT_POA_Helper::init (PortableServer::POA_ptr parent_poa, const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL)
+{
+ char child_poa_name[32];
+ ACE_OS_String::itoa (ACE_OS::rand (), child_poa_name, 10);
+
+ this->init (parent_poa, child_poa_name, tp_params ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_NS_RT_POA_Helper::init (PortableServer::POA_ptr parent_poa, const char* poa_name
+ , const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL)
+{
+ CORBA::PolicyList policy_list (4);
+
+ this->set_policy (parent_poa, policy_list ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ RTCORBA::RTORB_var rt_orb = TAO_NS_RT_PROPERTIES::instance ()->rt_orb ();
+
+ policy_list.length (3);
+ policy_list[2] =
+ rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
+ 0
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "Creating threadpool: static threads = %d, def. prio = %d\n"
+ , tp_params.static_threads, tp_params.default_priority));
+
+ // Create the thread-pool.
+ RTCORBA::ThreadpoolId threadpool_id =
+ rt_orb->create_threadpool (tp_params.stacksize,
+ tp_params.static_threads,
+ tp_params.dynamic_threads,
+ tp_params.default_priority,
+ tp_params.allow_request_buffering,
+ tp_params.max_buffered_requests,
+ tp_params.max_request_buffer_size
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ policy_list.length (4);
+ policy_list[3] =
+ rt_orb->create_threadpool_policy (threadpool_id
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->create_i (parent_poa, poa_name, policy_list ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_NS_RT_POA_Helper::init (PortableServer::POA_ptr parent_poa, const NotifyExt::ThreadPoolLanesParams& tpl_params ACE_ENV_ARG_DECL)
+{
+ char child_poa_name[32];
+ ACE_OS_String::itoa (ACE_OS::rand (), child_poa_name, 10);
+
+ this->init (parent_poa, child_poa_name, tpl_params ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_NS_RT_POA_Helper::init (PortableServer::POA_ptr parent_poa, const char* poa_name
+ , const NotifyExt::ThreadPoolLanesParams& tpl_params ACE_ENV_ARG_DECL)
+{
+ CORBA::PolicyList policy_list (4);
+
+ this->set_policy (parent_poa, policy_list ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ RTCORBA::RTORB_var rt_orb = TAO_NS_RT_PROPERTIES::instance ()->rt_orb ();
+
+ policy_list.length (3);
+ policy_list[2] =
+ rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
+ 0
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Populate RTCORBA Lanes.
+ RTCORBA::ThreadpoolLanes lanes (tpl_params.lanes.length ());
+ lanes.length (tpl_params.lanes.length ());
+
+ for (CORBA::ULong index = 0; index < tpl_params.lanes.length (); ++index)
+ {
+ if (TAO_debug_level > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Creating threadpool lane %d: priority = %d, static threads = %d\n",
+ index, tpl_params.lanes[index].lane_priority, tpl_params.lanes[index].static_threads));
+ }
+
+ lanes[index].lane_priority = tpl_params.lanes[index].lane_priority;
+ lanes[index].static_threads = tpl_params.lanes[index].static_threads;
+ lanes[index].dynamic_threads = tpl_params.lanes[index].dynamic_threads;
+ }
+
+ // Create the thread-pool.
+ RTCORBA::ThreadpoolId threadpool_id =
+ rt_orb->create_threadpool_with_lanes (tpl_params.stacksize,
+ lanes,
+ tpl_params.allow_borrowing,
+ tpl_params.allow_request_buffering,
+ tpl_params.max_buffered_requests,
+ tpl_params.max_request_buffer_size
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ policy_list.length (4);
+ policy_list[3] =
+ rt_orb->create_threadpool_policy (threadpool_id
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->create_i (parent_poa, poa_name, policy_list ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_NS_RT_POA_Helper::init (PortableServer::POA_ptr parent_poa ACE_ENV_ARG_DECL)
+{
+ CORBA::PolicyList policy_list (1);
+
+ RTCORBA::RTORB_var rt_orb = TAO_NS_RT_PROPERTIES::instance ()->rt_orb ();
+
+ policy_list.length (1);
+
+ policy_list[0] =
+ rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
+ 0
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ char child_poa_name[32];
+ ACE_OS_String::itoa (ACE_OS::rand (), child_poa_name, 10);
+
+ this->create_i (parent_poa, child_poa_name, policy_list ACE_ENV_ARG_PARAMETER);
+}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.h b/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.h
new file mode 100644
index 00000000000..63150165467
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.h
@@ -0,0 +1,64 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_POA_Helper.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_POA_Helper_H
+#define TAO_NS_RT_POA_Helper_H
+#include "ace/pre.h"
+
+#include "rt_notify_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "POA_Helper.h"
+#include "orbsvcs/NotifyExtC.h"
+
+/**
+ * @class TAO_NS_RT_POA_Helper
+ *
+ * @brief Helper for creating RT POA objects.
+ *
+ */
+class TAO_RT_Notify_Export TAO_NS_RT_POA_Helper : public TAO_NS_POA_Helper
+{
+public:
+ /// Destructor
+ ~TAO_NS_RT_POA_Helper ();
+
+ /// Create a new PortableServer::POA.
+ /// The UNIQUE_ID, USER_ID , CLIENT_PROPAGATED and thread pool policy is applied to the new POA.
+ void init (PortableServer::POA_ptr parent_poa, const char* poa_name, const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL);
+
+ /// Create a new PortableServer::POA. The name is chosen at random.
+ /// The UNIQUE_ID, USER_ID , CLIENT_PROPAGATED and thread pool policy is applied to the new POA.
+ void init (PortableServer::POA_ptr parent_poa, const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL);
+
+ /// Create a new PortableServer::POA.
+ /// The UNIQUE_ID, USER_ID , CLIENT_PROPAGATED and thread lane policy is applied to the new POA.
+ void init (PortableServer::POA_ptr parent_poa, const char* poa_name,
+ const NotifyExt::ThreadPoolLanesParams& tpl_params ACE_ENV_ARG_DECL);
+
+ /// Create a new PortableServer::POA. The name is chosen at random.
+ /// The UNIQUE_ID, USER_ID , CLIENT_PROPAGATED and thread lane policy is applied to the new POA.
+ void init (PortableServer::POA_ptr parent_poa, const NotifyExt::ThreadPoolLanesParams& tpl_params ACE_ENV_ARG_DECL);
+
+ /// Create a new PortableServer::POA. The name is chosen at random.
+ /// The CLIENT_PROPAGATED policy is applied to the new POA.
+ void init (PortableServer::POA_ptr parent_poa ACE_ENV_ARG_DECL);
+};
+
+#if defined (__ACE_INLINE__)
+#include "RT_POA_Helper.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_NS_RT_POA_Helper_H */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.inl b/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.inl
new file mode 100644
index 00000000000..a06831e3235
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.inl
@@ -0,0 +1,3 @@
+// $Id$
+
+#include "RT_POA_Helper.h"
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Properties.cpp b/TAO/orbsvcs/orbsvcs/Notify/RT_Properties.cpp
new file mode 100644
index 00000000000..bb82f40736a
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Properties.cpp
@@ -0,0 +1,27 @@
+// $Id$
+
+#include "RT_Properties.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "RT_Properties.inl"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(RT_Notify, TAO_NS_RT_Properties, "$Id$")
+
+TAO_NS_RT_Properties::TAO_NS_RT_Properties (void)
+{
+}
+
+TAO_NS_RT_Properties::~TAO_NS_RT_Properties ()
+{
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class TAO_Singleton<TAO_NS_RT_Properties, TAO_SYNCH_MUTEX>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate TAO_Singleton<TAO_NS_RT_Properties, TAO_SYNCH_MUTEX>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Properties.h b/TAO/orbsvcs/orbsvcs/Notify/RT_Properties.h
new file mode 100644
index 00000000000..415d0dbd79c
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Properties.h
@@ -0,0 +1,65 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_Properties.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_PROPERTIES_H
+#define TAO_NS_RT_PROPERTIES_H
+#include "ace/pre.h"
+
+#include "rt_notify_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/TAO_Singleton.h"
+#include "tao/RTCORBA/RTCORBA.h"
+
+/**
+ * @class TAO_NS_RT_Properties
+ *
+ * @brief RT specifc global properties are stored here.
+ *
+ */
+class TAO_RT_Notify_Export TAO_NS_RT_Properties
+{
+ friend class TAO_Singleton<TAO_NS_RT_Properties, TAO_SYNCH_MUTEX>;
+
+public:
+ /// Constuctor
+ TAO_NS_RT_Properties (void);
+
+ /// Destructor
+ ~TAO_NS_RT_Properties ();
+
+ RTCORBA::RTORB_ptr rt_orb (void);
+ void rt_orb (RTCORBA::RTORB_ptr rt_orb);
+
+ RTCORBA::Current_ptr current (void);
+ void current (RTCORBA::Current_ptr current);
+
+protected:
+ /// RT-ORB
+ RTCORBA::RTORB_var rt_orb_;
+
+ /// Current
+ RTCORBA::Current_var current_;
+};
+
+typedef TAO_Singleton<TAO_NS_RT_Properties, TAO_SYNCH_MUTEX> TAO_NS_RT_PROPERTIES;
+
+TAO_RT_NOTIFY_SINGLETON_DECLARE (TAO_Singleton, TAO_NS_RT_Properties, TAO_SYNCH_MUTEX);
+
+#if defined (__ACE_INLINE__)
+#include "RT_Properties.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_NS_RT_PROPERTIES_H */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Properties.inl b/TAO/orbsvcs/orbsvcs/Notify/RT_Properties.inl
new file mode 100644
index 00000000000..77ba96126a0
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Properties.inl
@@ -0,0 +1,27 @@
+// $Id$
+
+#include "RT_Properties.h"
+
+ACE_INLINE RTCORBA::RTORB_ptr
+TAO_NS_RT_Properties::rt_orb (void)
+{
+ return RTCORBA::RTORB::_duplicate (rt_orb_.in ());
+}
+
+ACE_INLINE void
+TAO_NS_RT_Properties::rt_orb (RTCORBA::RTORB_ptr rt_orb)
+{
+ rt_orb_ = RTCORBA::RTORB::_duplicate (rt_orb);
+}
+
+ACE_INLINE RTCORBA::Current_ptr
+TAO_NS_RT_Properties::current (void)
+{
+ return RTCORBA::Current::_duplicate (current_.in());
+}
+
+ACE_INLINE void
+TAO_NS_RT_Properties::current (RTCORBA::Current_ptr current)
+{
+ current_ = RTCORBA::Current::_duplicate (current);
+}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.cpp b/TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.cpp
index a665780ed0c..705ebf295f9 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.cpp
@@ -13,7 +13,6 @@ ACE_RCSID(RT_Notify, TAO_NS_Reactive_Task, "$Id$")
TAO_NS_Reactive_Task::TAO_NS_Reactive_Task (void)
:timer_ (0)
{
- this->destroy_callback (this); // The <release> method is called to release memory.
}
TAO_NS_Reactive_Task::~TAO_NS_Reactive_Task ()
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.h b/TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.h
index 76e3491692a..98d77a6c39c 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.h
@@ -21,7 +21,6 @@
#include "Worker_Task.h"
#include "AdminProperties.h"
-#include "Destroy_Callback.h"
class TAO_NS_Timer_Reactor;
@@ -31,7 +30,7 @@ class TAO_NS_Timer_Reactor;
* @brief A reactive worker task. Simply executes the command in the caller's context.
*
*/
-class TAO_Notify_Export TAO_NS_Reactive_Task : public TAO_NS_Worker_Task, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_Reactive_Task : public TAO_NS_Worker_Task
{
public:
/// Constuctor
@@ -40,7 +39,7 @@ public:
/// Destructor
~TAO_NS_Reactive_Task ();
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
/// Init the reactive task.
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Refcountable.cpp b/TAO/orbsvcs/orbsvcs/Notify/Refcountable.cpp
index a703e29f2a4..a5c277a611d 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Refcountable.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Refcountable.cpp
@@ -1,8 +1,6 @@
// $Id$
#include "Refcountable.h"
-#include "Destroy_Callback.h"
-
#include "tao/debug.h"
#include "ace/Log_Msg.h"
@@ -47,14 +45,7 @@ TAO_NS_Refcountable::_decr_refcnt (void)
return this->refcount_;
}
- if (this->destroy_callback_ != 0)
- this->destroy_callback_->release ();
+ this->release ();
return 0;
}
-
-void
-TAO_NS_Refcountable::destroy_callback (TAO_NS_Destroy_Callback* destroy_callback)
-{
- destroy_callback_ = destroy_callback;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Refcountable.h b/TAO/orbsvcs/orbsvcs/Notify/Refcountable.h
index aa30f82be58..77a45cd16fa 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Refcountable.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Refcountable.h
@@ -23,12 +23,10 @@
#include "tao/orbconf.h"
#include "tao/corbafwd.h"
-class TAO_NS_Destroy_Callback;
-
/**
* @class TAO_NS_Refcountable
*
- * @brief Thread-safe refounting, calls a Destroy_Callback when refcount falls to 0.
+ * @brief Thread-safe refounting, calls the <release> method when refcount falls to 0.
*
*/
class TAO_Notify_Export TAO_NS_Refcountable
@@ -38,24 +36,21 @@ public:
TAO_NS_Refcountable (void);
/// Destructor
- ~TAO_NS_Refcountable ();
-
- /// Set the destroy callback.
- void destroy_callback (TAO_NS_Destroy_Callback* destroy_callback);
+ virtual ~TAO_NS_Refcountable ();
/// This method sigantures deliberately match the RefCounting methods required for ESF Proxy
CORBA::ULong _incr_refcnt (void);
CORBA::ULong _decr_refcnt (void);
+ /// The release method is called when the refcount reaches 0.
+ virtual void release (void) = 0;
+
protected:
/// The reference count.
CORBA::ULong refcount_;
/// The mutex to serialize access to state variables.
TAO_SYNCH_MUTEX lock_;
-
- /// The callback when refcount falls to 0.
- TAO_NS_Destroy_Callback* destroy_callback_;
};
/***********************************************************************/
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.cpp
index 9101583601c..c1b7ea4bdfa 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.cpp
@@ -8,10 +8,8 @@
ACE_RCSID(Notify, TAO_NS_SequenceProxyPushConsumer, "$id$")
-#include "ace/Refcounted_Auto_Ptr.h"
#include "tao/debug.h"
#include "SequencePushSupplier.h"
-#include "../Admin.h"
#include "../AdminProperties.h"
#include "../Structured/StructuredEvent.h"
@@ -40,7 +38,10 @@ TAO_NS_SequenceProxyPushConsumer::destroy (ACE_ENV_SINGLE_ARG_DECL)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "In TAO_NS_SequenceProxyPushConsumer::destroy \n"));
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
}
CosNotifyChannelAdmin::ProxyType
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.h
index 647ce01b185..068d39067ac 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.h
@@ -21,7 +21,6 @@
#include "orbsvcs/CosNotifyChannelAdminS.h"
#include "../ProxyConsumer_T.h"
-#include "../Destroy_Callback.h"
#if defined(_MSC_VER)
#if (_MSC_VER >= 1200)
@@ -36,7 +35,7 @@
* @brief
*
*/
-class TAO_Notify_Export TAO_NS_SequenceProxyPushConsumer : public virtual TAO_NS_ProxyConsumer_T <POA_CosNotifyChannelAdmin::SequenceProxyPushConsumer>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_SequenceProxyPushConsumer : public virtual TAO_NS_ProxyConsumer_T <POA_CosNotifyChannelAdmin::SequenceProxyPushConsumer>
{
friend class TAO_NS_Builder;
public:
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.cpp b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.cpp
index f92380f1260..8660198e8f2 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.cpp
@@ -10,12 +10,6 @@ ACE_RCSID(Notify, TAO_NS_SequenceProxyPushSupplier, "$id$")
#include "tao/debug.h"
#include "SequencePushConsumer.h"
-#include "../Proxy.h"
-#include "../Admin.h"
-#include "../EventChannel.h"
-#include "../EventChannelFactory.h"
-#include "../Notify_Service.h"
-
TAO_NS_SequenceProxyPushSupplier::TAO_NS_SequenceProxyPushSupplier (void)
{
@@ -31,7 +25,10 @@ TAO_NS_SequenceProxyPushSupplier::destroy (ACE_ENV_SINGLE_ARG_DECL)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "In TAO_NS_SequenceProxyPushConsumer::destroy \n"));
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
}
void
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h
index 722aecf4b8f..49ee0d951c8 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h
@@ -41,7 +41,7 @@ TAO_NS_ProxySupplier_T<POA_CosNotifyChannelAdmin::SequenceProxyPushSupplier>;
*
*
*/
-class TAO_Notify_Export TAO_NS_SequenceProxyPushSupplier : public virtual TAO_NS_ProxySupplier_T <POA_CosNotifyChannelAdmin::SequenceProxyPushSupplier>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_SequenceProxyPushSupplier : public virtual TAO_NS_ProxySupplier_T <POA_CosNotifyChannelAdmin::SequenceProxyPushSupplier>
{
friend class TAO_NS_Builder;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushSupplier.h b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushSupplier.h
index b83256362da..e981c1b9fae 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushSupplier.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushSupplier.h
@@ -21,7 +21,6 @@
#include "orbsvcs/CosNotifyCommC.h"
#include "../Supplier.h"
-#include "../Destroy_Callback.h"
class TAO_NS_ProxyConsumer;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Service.h b/TAO/orbsvcs/orbsvcs/Notify/Service.h
index af8a28a2fd2..a6848386f76 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Service.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Service.h
@@ -19,19 +19,20 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "ace/Service_Object.h"
#include "ace/Service_Config.h"
#include "orbsvcs/CosNotifyChannelAdminS.h"
#include "tao/PortableServer/PortableServer.h"
/**
- * @class TAO_NS_Service
+ * @class TAO_Notify_Service
*
* @brief Abstract ACE_Service_Object interface that is a
* factory for creating a Notify EventChannelFactory.
* Note that a Service creates only 1 Factory object.
*
*/
-class TAO_Notify_Export TAO_NS_Service : public ACE_Service_Object
+class TAO_Notify_Export TAO_Notify_Service : public ACE_Service_Object
{
public:
/// Define Service_Object method otherwise SunCC compiler complains.
@@ -47,7 +48,12 @@ public:
};
#define TAO_NOTIFY_DEF_EMO_FACTORY_NAME "Notify_Default_Event_Manager_Objects_Factory"
-#define TAO_NS_COS_NOTIFICATION_SERVICE_NAME "CosNotify_Service"
+
+#define TAO_NS_NOTIFICATION_SERVICE_NAME "TAO_Notify_Service"
+
+#define TAO_NS_COS_NOTIFICATION_SERVICE_NAME "TAO_CosNotify_Service"
+
+#define TAO_NS_RT_NOTIFICATION_SERVICE_NAME "TAO_RT_Notify_Service"
#include "ace/post.h"
#endif /* TAO_NS_SERVICE_H */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.cpp b/TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.cpp
new file mode 100644
index 00000000000..1129cf9c763
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.cpp
@@ -0,0 +1,44 @@
+// $Id$
+
+#include "RT_StructuredProxyPushSupplier.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "RT_StructuredProxyPushSupplier.inl"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(Notify, TAO_NS_RT_StructuredProxyPushSupplier, "$id$")
+
+TAO_NS_RT_StructuredProxyPushSupplier::TAO_NS_RT_StructuredProxyPushSupplier (void)
+{
+}
+
+TAO_NS_RT_StructuredProxyPushSupplier::~TAO_NS_RT_StructuredProxyPushSupplier ()
+{
+}
+
+CORBA::Object_ptr
+TAO_NS_RT_StructuredProxyPushSupplier::activate (PortableServer::Servant servant ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = TAO_NS_Proxy::activate (servant ACE_ENV_ARG_DECL);
+ ACE_CHECK_RETURN (CORBA::Object::_nil ());
+
+ // Obtain our ref.
+ CORBA::Object_var obj = this->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CORBA::Object::_nil ());
+
+ this->event_forwarder_ = Event_Forwarder::StructuredProxyPushSupplier::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
+
+ return object._retn ();
+}
+
+void
+TAO_NS_RT_StructuredProxyPushSupplier::push (const TAO_NS_Event_var &event)
+{
+ event->push (this->event_forwarder_.in () ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_NS_RT_StructuredProxyPushSupplier::push_no_filtering (const TAO_NS_Event_var &event)
+{
+ event->push_no_filtering (this->event_forwarder_.in () ACE_ENV_ARG_PARAMETER);
+}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.h b/TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.h
new file mode 100644
index 00000000000..a183a8193c7
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.h
@@ -0,0 +1,58 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_StructuredProxyPushSupplier.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_STRUCTUREDPROXYPUSHSUPPLIER_H
+#define TAO_NS_RT_STRUCTUREDPROXYPUSHSUPPLIER_H
+#include "ace/pre.h"
+
+#include "../rt_notify_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "StructuredProxyPushSupplier.h"
+
+/**
+ * @class TAO_NS_RT_StructuredProxyPushSupplier
+ *
+ * @brief
+ *
+ */
+class TAO_RT_Notify_Export TAO_NS_RT_StructuredProxyPushSupplier : public virtual TAO_NS_StructuredProxyPushSupplier
+{
+public:
+ /// Constuctor
+ TAO_NS_RT_StructuredProxyPushSupplier (void);
+
+ /// Destructor
+ ~TAO_NS_RT_StructuredProxyPushSupplier ();
+
+ /// Activate this object and obtain the Event_Forwarder interface.
+ virtual CORBA::Object_ptr activate (PortableServer::Servant servant ACE_ENV_ARG_DECL);
+
+ /// Override TAO_NS_ProxySupplier::push
+ virtual void push (const TAO_NS_Event_var &event);
+
+ /// Dispatch Event to consumer, no filtering
+ virtual void push_no_filtering (const TAO_NS_Event_var &event);
+
+private:
+ /// Our ref.
+ Event_Forwarder::StructuredProxyPushSupplier_var event_forwarder_;
+};
+
+#if defined (__ACE_INLINE__)
+#include "RT_StructuredProxyPushSupplier.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_NS_RT_STRUCTUREDPROXYPUSHSUPPLIER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.inl b/TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.inl
new file mode 100644
index 00000000000..2387811a56a
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/Structured/RT_StructuredProxyPushSupplier.inl
@@ -0,0 +1,3 @@
+// $Id$
+
+#include "RT_StructuredProxyPushSupplier.h"
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.cpp
index e3f177563e3..858f2f518ef 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.cpp
@@ -14,11 +14,6 @@ ACE_RCSID(RT_Notify, TAO_NS_StructuredProxyPushConsumer, "$Id$")
#include "StructuredPushSupplier.h"
#include "StructuredEvent.h"
#include "../AdminProperties.h"
-#include "../Proxy.h"
-#include "../Admin.h"
-#include "../EventChannel.h"
-#include "../EventChannelFactory.h"
-#include "../Notify_Service.h"
TAO_NS_StructuredProxyPushConsumer::TAO_NS_StructuredProxyPushConsumer (void)
{
@@ -26,7 +21,6 @@ TAO_NS_StructuredProxyPushConsumer::TAO_NS_StructuredProxyPushConsumer (void)
TAO_NS_StructuredProxyPushConsumer::~TAO_NS_StructuredProxyPushConsumer ()
{
-
}
void
@@ -45,7 +39,10 @@ TAO_NS_StructuredProxyPushConsumer::destroy (ACE_ENV_SINGLE_ARG_DECL)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "In TAO_NS_StructuredProxyPushConsumer::destroy \n"));
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
}
CosNotifyChannelAdmin::ProxyType
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.h
index 1ece4fba9ab..70ddb535673 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushConsumer.h
@@ -21,7 +21,6 @@
#include "orbsvcs/CosNotifyChannelAdminS.h"
#include "../ProxyConsumer_T.h"
-#include "../Destroy_Callback.h"
#if defined(_MSC_VER)
#if (_MSC_VER >= 1200)
@@ -36,7 +35,7 @@
* @brief CosNotifyChannelAdmin::StructuredProxyPushConsumer implementation.
*
*/
-class TAO_Notify_Export TAO_NS_StructuredProxyPushConsumer : public virtual TAO_NS_ProxyConsumer_T <POA_CosNotifyChannelAdmin::StructuredProxyPushConsumer>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_StructuredProxyPushConsumer : public virtual TAO_NS_ProxyConsumer_T <POA_CosNotifyChannelAdmin::StructuredProxyPushConsumer>
{
friend class TAO_NS_Builder;
@@ -47,7 +46,7 @@ public:
/// Destructor
~TAO_NS_StructuredProxyPushConsumer ();
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
/// Destroy this object.
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushSupplier.cpp b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushSupplier.cpp
index 6bec03def5d..4072b24f681 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushSupplier.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushSupplier.cpp
@@ -5,12 +5,6 @@
#include "tao/debug.h"
#include "StructuredPushConsumer.h"
-#include "../Event_Manager.h"
-#include "../Proxy.h"
-#include "../Admin.h"
-#include "../EventChannel.h"
-#include "../EventChannelFactory.h"
-#include "../Notify_Service.h"
#if ! defined (__ACE_INLINE__)
#include "StructuredProxyPushSupplier.inl"
@@ -32,7 +26,10 @@ TAO_NS_StructuredProxyPushSupplier::destroy (ACE_ENV_SINGLE_ARG_DECL)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "In TAO_NS_StructuredProxyPushConsumer::destroy \n"));
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
}
void
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushSupplier.h b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushSupplier.h
index c650e451deb..922122dc849 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushSupplier.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredProxyPushSupplier.h
@@ -42,7 +42,7 @@ TAO_NS_ProxySupplier_T<POA_Event_Forwarder::StructuredProxyPushSupplier>;
*
*
*/
-class TAO_Notify_Export TAO_NS_StructuredProxyPushSupplier : public virtual TAO_NS_ProxySupplier_T <POA_Event_Forwarder::StructuredProxyPushSupplier>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_StructuredProxyPushSupplier : public virtual TAO_NS_ProxySupplier_T <POA_Event_Forwarder::StructuredProxyPushSupplier>
{
friend class TAO_NS_Builder;
@@ -56,7 +56,7 @@ public:
/// Destroy this object.
virtual void destroy (ACE_ENV_SINGLE_ARG_DECL);
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
/// = Servant methods
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredPushConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredPushConsumer.h
index 64cff330f84..28fb81439da 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredPushConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredPushConsumer.h
@@ -21,7 +21,6 @@
#include "orbsvcs/CosNotifyCommC.h"
#include "../Consumer.h"
-#include "../Destroy_Callback.h"
class TAO_NS_ProxySupplier;
@@ -43,7 +42,7 @@ public:
/// Destructor
~TAO_NS_StructuredPushConsumer ();
- /// TAO_NS_Destroy_Callback methods.
+ /// Release
virtual void release (void);
/// Push <event> to this consumer.
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredPushSupplier.h b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredPushSupplier.h
index 4308e4a99d3..6c9456befb7 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredPushSupplier.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Structured/StructuredPushSupplier.h
@@ -21,7 +21,6 @@
#include "orbsvcs/CosNotifyCommC.h"
#include "../Supplier.h"
-#include "../Destroy_Callback.h"
class TAO_NS_ProxyConsumer;
@@ -43,7 +42,7 @@ public:
/// Init
void init (CosNotifyComm::StructuredPushSupplier_ptr push_supplier ACE_ENV_ARG_DECL);
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
protected:
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Supplier.cpp b/TAO/orbsvcs/orbsvcs/Notify/Supplier.cpp
index 28d6883d524..f03f91207e2 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Supplier.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Supplier.cpp
@@ -10,10 +10,6 @@ ACE_RCSID(RT_Notify, TAO_NS_Supplier, "$Id$")
#include "ProxyConsumer.h"
#include "Proxy.h"
-#include "Admin.h"
-#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
TAO_NS_Supplier::TAO_NS_Supplier (TAO_NS_ProxyConsumer* proxy)
:proxy_ (proxy)
diff --git a/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp b/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp
index 84ff5247e87..aa6e7bca21d 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp
@@ -11,15 +11,21 @@ ACE_RCSID(RT_Notify, TAO_NS_SupplierAdmin, "$Id$")
#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
#include "Builder.h"
#include "Proxy.h"
-#include "Admin.h"
#include "EventChannel.h"
-#include "EventChannelFactory.h"
-#include "Notify_Service.h"
#include "Subscription_Change_Worker.h"
+#include "Find_Worker_T.h"
+#include "Seq_Worker_T.h"
#include "Properties.h"
+typedef TAO_NS_Find_Worker_T<TAO_NS_Proxy
+ , CosNotifyChannelAdmin::ProxyConsumer
+ , CosNotifyChannelAdmin::ProxyConsumer_ptr
+ , CosNotifyChannelAdmin::ProxyNotFound>
+TAO_NS_ProxyConsumer_Find_Worker;
+
+typedef TAO_NS_Seq_Worker_T<TAO_NS_Proxy> TAO_NS_Proxy_Seq_Worker;
+
TAO_NS_SupplierAdmin::TAO_NS_SupplierAdmin (void)
-:TAO_NS_Admin (TAO_NS_Admin::SUPPLIER_ADMIN)
{
}
@@ -27,10 +33,16 @@ TAO_NS_SupplierAdmin::~TAO_NS_SupplierAdmin ()
{
}
-PortableServer::Servant
-TAO_NS_SupplierAdmin::servant (void)
+void
+TAO_NS_SupplierAdmin::init (TAO_NS_EventChannel *ec ACE_ENV_ARG_DECL)
{
- return this;
+ TAO_NS_Admin::init (ec ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ const CosNotification::QoSProperties &default_sa_qos =
+ TAO_NS_PROPERTIES::instance ()->default_supplier_admin_qos_properties ();
+
+ this->set_qos (default_sa_qos ACE_ENV_ARG_PARAMETER);
}
void
@@ -58,7 +70,13 @@ TAO_NS_SupplierAdmin::destroy (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
+
+ this->ec_->remove (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
}
void
@@ -81,16 +99,51 @@ TAO_NS_SupplierAdmin::get_qos (ACE_ENV_SINGLE_ARG_DECL)
}
CosNotifyChannelAdmin::ProxyConsumer_ptr
-TAO_NS_SupplierAdmin::obtain_notification_push_consumer (CosNotifyChannelAdmin::ClientType ctype, CosNotifyChannelAdmin::ProxyID_out proxy_id ACE_ENV_ARG_DECL)
+TAO_NS_SupplierAdmin::obtain_notification_push_consumer (CosNotifyChannelAdmin::ClientType ctype
+ , CosNotifyChannelAdmin::ProxyID_out proxy_id
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ , CosNotifyChannelAdmin::AdminLimitExceeded
+ ))
+
+{
+ CosNotification::QoSProperties initial_qos;
+
+ return TAO_NS_PROPERTIES::instance()->builder()->build_proxy (this
+ , ctype
+ , proxy_id
+ , initial_qos
+ ACE_ENV_ARG_PARAMETER);
+}
+
+CosNotifyChannelAdmin::ProxyConsumer_ptr
+TAO_NS_SupplierAdmin::obtain_notification_push_consumer_with_qos (CosNotifyChannelAdmin::ClientType ctype,
+ CosNotifyChannelAdmin::ProxyID_out proxy_id,
+ const CosNotification::QoSProperties & initial_qos
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
ACE_THROW_SPEC ((
CORBA::SystemException
, CosNotifyChannelAdmin::AdminLimitExceeded
+ , CosNotification::UnsupportedQoS
))
+{
+ return TAO_NS_PROPERTIES::instance()->builder()->build_proxy (this
+ , ctype
+ , proxy_id,
+ initial_qos
+ ACE_ENV_ARG_PARAMETER);
+}
+
+CosEventChannelAdmin::ProxyPushConsumer_ptr
+TAO_NS_SupplierAdmin::obtain_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
{
- return TAO_NS_PROPERTIES::instance()->builder ()->build_notification_push_consumer (this,
- ctype,
- proxy_id ACE_ENV_ARG_PARAMETER);
+ return TAO_NS_PROPERTIES::instance()->builder()->build_proxy (this ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::AdminID
@@ -108,15 +161,7 @@ TAO_NS_SupplierAdmin::MyChannel (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- CORBA::Object_var object = this->parent_->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil ());
-
- CosNotifyChannelAdmin::EventChannel_var ec_ret;
-
- ec_ret = CosNotifyChannelAdmin::EventChannel::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil ());
-
- return ec_ret._retn ();
+ return this->ec_->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
}
::CosNotifyChannelAdmin::InterFilterGroupOperator
@@ -134,25 +179,9 @@ TAO_NS_SupplierAdmin::push_consumers (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- CosNotifyChannelAdmin::ProxyIDSeq* seq_ptr;
-
- ACE_NEW_THROW_EX (seq_ptr,
- CosNotifyChannelAdmin::ProxyIDSeq (),
- CORBA::NO_MEMORY ());
-
- CosNotifyChannelAdmin::ProxyIDSeq_var seq (seq_ptr);
-
- seq->length (this->proxy_id_list_.size ());
-
- TAO_NS_Object_Id_Seq::CONST_ITERATOR iter (this->proxy_id_list_);
-
- TAO_NS_Object_Id* object_id;
+ TAO_NS_Proxy_Seq_Worker seq_worker;
- CORBA::ULong i = 0;
- for (iter.first (); iter.next (object_id); iter.advance (), ++i)
- seq[i] = *object_id;
-
- return seq._retn ();
+ return seq_worker.create (*this->proxy_container_ ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::ProxyConsumer_ptr
@@ -162,23 +191,9 @@ TAO_NS_SupplierAdmin::get_proxy_consumer (CosNotifyChannelAdmin::ProxyID proxy_i
, CosNotifyChannelAdmin::ProxyNotFound
))
{
- TAO_NS_Object* ns_object = this->find (proxy_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxyConsumer::_nil ());
-
- if (ns_object != 0)
- {
- CORBA::Object_var object = ns_object->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxyConsumer::_nil ());
-
- CosNotifyChannelAdmin::ProxyConsumer_var pc_ret;
-
- pc_ret = CosNotifyChannelAdmin::ProxyConsumer::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxyConsumer::_nil ());
+ TAO_NS_ProxyConsumer_Find_Worker find_worker;
- return pc_ret._retn ();
- }
- else
- ACE_THROW_RETURN (CosNotifyChannelAdmin::ProxyNotFound (), CosNotifyChannelAdmin::ProxyConsumer::_nil ());
+ return find_worker.resolve (proxy_id, *this->proxy_container_ ACE_ENV_ARG_PARAMETER);
}
void
@@ -201,11 +216,11 @@ TAO_NS_SupplierAdmin::offer_change (const CosNotification::EventTypeSeq & added,
ACE_CHECK;
this->subscribed_types_.init (seq_added, seq_removed);
- }
- TAO_NS_Subscription_Change_Worker worker (added, removed);
+ TAO_NS_Subscription_Change_Worker worker (added, removed);
- this->collection_->for_each (&worker ACE_ENV_ARG_PARAMETER);
+ this->proxy_container_->collection ()->for_each (&worker ACE_ENV_ARG_PARAMETER);
+ }
}
CosNotifyFilter::FilterID
@@ -255,15 +270,6 @@ TAO_NS_SupplierAdmin::remove_all_filters (ACE_ENV_SINGLE_ARG_DECL)
this->filter_admin_.remove_all_filters (ACE_ENV_SINGLE_ARG_PARAMETER);
}
-CosEventChannelAdmin::ProxyPushConsumer_ptr
-TAO_NS_SupplierAdmin::obtain_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return TAO_NS_PROPERTIES::instance()->builder ()->build_push_consumer (this ACE_ENV_ARG_PARAMETER);
-}
-
/************** UNIMPLEMENTED METHODS ***************/
CosEventChannelAdmin::ProxyPullConsumer_ptr
@@ -308,3 +314,22 @@ TAO_NS_SupplierAdmin::obtain_notification_pull_consumer (CosNotifyChannelAdmin::
{
ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosNotifyChannelAdmin::ProxyConsumer::_nil ());
}
+
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class TAO_NS_Find_Worker_T<TAO_NS_Proxy
+ , CosNotifyChannelAdmin::ProxyConsumer
+ , CosNotifyChannelAdmin::ProxyConsumer_ptr
+ , CosNotifyChannelAdmin::ProxyNotFound>;
+template class TAO_NS_Seq_Worker_T<TAO_NS_Proxy>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate TAO_NS_Find_Worker_T<TAO_NS_Proxy
+ , CosNotifyChannelAdmin::ProxyConsumer
+ , CosNotifyChannelAdmin::ProxyConsumer_ptr
+ , CosNotifyChannelAdmin::ProxyNotFound>
+#pragma instantiate TAO_NS_Seq_Worker_T<TAO_NS_Proxy>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.h b/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.h
index 76e27a6ff51..90ace4712ff 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.h
@@ -19,9 +19,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "orbsvcs/CosNotifyChannelAdminS.h"
+#include "orbsvcs/NotifyExtS.h"
#include "Admin.h"
-#include "Destroy_Callback.h"
#if defined(_MSC_VER)
#if (_MSC_VER >= 1200)
@@ -36,9 +35,9 @@
* @brief Implementation of CosNotifyChannelAdmin::SupplierAdmin
*
*/
-class TAO_Notify_Export TAO_NS_SupplierAdmin : public virtual POA_CosNotifyChannelAdmin::SupplierAdmin, public virtual TAO_NS_Admin, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_SupplierAdmin : public virtual POA_NotifyExt::SupplierAdmin
+ , public virtual TAO_NS_Admin
{
- friend class TAO_NS_Builder;
public:
/// Constuctor
TAO_NS_SupplierAdmin (void);
@@ -46,17 +45,31 @@ public:
/// Destructor
~TAO_NS_SupplierAdmin ();
- /// Return servant
- virtual PortableServer::Servant servant (void);
+ /// Init
+ void init (TAO_NS_EventChannel *ec ACE_ENV_ARG_DECL);
/// ServantBase refcount methods.
virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL);
virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL);
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
protected:
+
+ /// = NotifyExt::SupplierAdmin methods
+ CosNotifyChannelAdmin::ProxyConsumer_ptr
+ obtain_notification_push_consumer_with_qos (CosNotifyChannelAdmin::ClientType ctype,
+ CosNotifyChannelAdmin::ProxyID_out proxy_id,
+ const CosNotification::QoSProperties & initial_qos
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ , CosNotifyChannelAdmin::AdminLimitExceeded
+ , CosNotification::UnsupportedQoS
+ ));
+
/// = CosNotifyChannelAdmin::SupplierAdmin methods
virtual CosNotifyChannelAdmin::AdminID MyID (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.cpp b/TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.cpp
index effcf218611..5829dd3348e 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.cpp
@@ -15,7 +15,6 @@ ACE_RCSID(RT_Notify, TAO_NS_ThreadPool_Task, "$Id$")
TAO_NS_ThreadPool_Task::TAO_NS_ThreadPool_Task (void)
: buffering_strategy_ (0), shutdown_ (0), timer_ (0)
{
- this->destroy_callback (this); // The <release> method is called to release memory.
}
TAO_NS_ThreadPool_Task::~TAO_NS_ThreadPool_Task ()
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.h b/TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.h
index a742fe9d591..88c6b33462f 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/ThreadPool_Task.h
@@ -24,7 +24,6 @@
#include "ace/Reactor.h"
#include "AdminProperties.h"
#include "Worker_Task.h"
-#include "Destroy_Callback.h"
class TAO_NS_Buffering_Strategy;
class TAO_NS_Timer_Queue;
@@ -35,7 +34,7 @@ class TAO_NS_Timer_Queue;
* @brief Implements a Thread Pool Worker Task.
*
*/
-class TAO_Notify_Export TAO_NS_ThreadPool_Task : public TAO_NS_Worker_Task, ACE_Task<ACE_NULL_SYNCH>, public TAO_NS_Destroy_Callback
+class TAO_Notify_Export TAO_NS_ThreadPool_Task : public TAO_NS_Worker_Task, ACE_Task<ACE_NULL_SYNCH>
{
friend class TAO_NS_Method_Request_Shutdown;
@@ -51,7 +50,7 @@ public:
virtual int close (u_long flags);
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
/// Activate the threadpool
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Timer_Queue.cpp b/TAO/orbsvcs/orbsvcs/Notify/Timer_Queue.cpp
index b7d4bbcd16e..aa80ab73163 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Timer_Queue.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Timer_Queue.cpp
@@ -8,10 +8,8 @@
ACE_RCSID(Notify, TAO_NS_Timer_Queue, "$id$")
-
TAO_NS_Timer_Queue::TAO_NS_Timer_Queue (void)
{
- this->destroy_callback (this);
}
TAO_NS_Timer_Queue::~TAO_NS_Timer_Queue ()
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Timer_Queue.h b/TAO/orbsvcs/orbsvcs/Notify/Timer_Queue.h
index 3e8bbdb30f3..52dea61911b 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Timer_Queue.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Timer_Queue.h
@@ -20,7 +20,6 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "Timer.h"
-#include "Destroy_Callback.h"
#include "ace/Timer_Queue.h"
#include "ace/Timer_Heap.h"
@@ -32,7 +31,6 @@
*
*/
class TAO_Notify_Export TAO_NS_Timer_Queue : public TAO_NS_Timer
- , public TAO_NS_Destroy_Callback
{
public:
/// Constuctor
@@ -41,7 +39,7 @@ public:
/// Destructor
virtual ~TAO_NS_Timer_Queue ();
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
/// Schedule a timer
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Timer_Reactor.cpp b/TAO/orbsvcs/orbsvcs/Notify/Timer_Reactor.cpp
index 6e57a1cdd62..41709be90df 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Timer_Reactor.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Timer_Reactor.cpp
@@ -15,9 +15,7 @@ ACE_RCSID(Notify, TAO_NS_Timer_Reactor, "$id$")
TAO_NS_Timer_Reactor::TAO_NS_Timer_Reactor (void)
:reactor_ (0)
{
- this->destroy_callback (this);
-
- // Get the ORB
+ // Get the ORB
CORBA::ORB_var orb = TAO_NS_PROPERTIES::instance()->orb ();
this->reactor_ = orb->orb_core ()->reactor ();
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Timer_Reactor.h b/TAO/orbsvcs/orbsvcs/Notify/Timer_Reactor.h
index eb0cb6e40d2..67953bb5576 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Timer_Reactor.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Timer_Reactor.h
@@ -20,7 +20,6 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "Timer.h"
-#include "Destroy_Callback.h"
class ACE_Reactor;
@@ -31,7 +30,6 @@ class ACE_Reactor;
*
*/
class TAO_Notify_Export TAO_NS_Timer_Reactor : public TAO_NS_Timer
- , public TAO_NS_Destroy_Callback
{
public:
/// Constuctor
@@ -40,7 +38,7 @@ public:
/// Destructor
virtual ~TAO_NS_Timer_Reactor ();
- /// TAO_NS_Destroy_Callback methods
+ /// Release
virtual void release (void);
/// Schedule a timer
diff --git a/TAO/orbsvcs/orbsvcs/Notify/rt_notify_export.h b/TAO/orbsvcs/orbsvcs/Notify/rt_notify_export.h
new file mode 100644
index 00000000000..288a67cb67f
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/rt_notify_export.h
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl
+// ------------------------------
+#ifndef TAO_RT_NOTIFY_EXPORT_H
+#define TAO_RT_NOTIFY_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if defined (TAO_AS_STATIC_LIBS)
+# if !defined (TAO_RT_NOTIFY_HAS_DLL)
+# define TAO_RT_NOTIFY_HAS_DLL 0
+# endif /* ! TAO_RT_NOTIFY_HAS_DLL */
+#else
+# if !defined (TAO_RT_NOTIFY_HAS_DLL)
+# define TAO_RT_NOTIFY_HAS_DLL 1
+# endif /* ! TAO_RT_NOTIFY_HAS_DLL */
+#endif
+
+#if defined (TAO_RT_NOTIFY_HAS_DLL) && (TAO_RT_NOTIFY_HAS_DLL == 1)
+# if defined (TAO_RT_NOTIFY_BUILD_DLL)
+# define TAO_RT_Notify_Export ACE_Proper_Export_Flag
+# define TAO_RT_NOTIFY_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define TAO_RT_NOTIFY_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* TAO_RT_NOTIFY_BUILD_DLL */
+# define TAO_RT_Notify_Export ACE_Proper_Import_Flag
+# define TAO_RT_NOTIFY_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define TAO_RT_NOTIFY_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* TAO_RT_NOTIFY_BUILD_DLL */
+#else /* TAO_RT_NOTIFY_HAS_DLL == 1 */
+# define TAO_RT_Notify_Export
+# define TAO_RT_NOTIFY_SINGLETON_DECLARATION(T)
+# define TAO_RT_NOTIFY_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* TAO_RT_NOTIFY_HAS_DLL == 1 */
+
+#endif /* TAO_RT_NOTIFY_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/NotifyExt.idl b/TAO/orbsvcs/orbsvcs/NotifyExt.idl
index bfe41763349..d21979e6f0f 100644
--- a/TAO/orbsvcs/orbsvcs/NotifyExt.idl
+++ b/TAO/orbsvcs/orbsvcs/NotifyExt.idl
@@ -22,7 +22,7 @@
*/
module NotifyExt
{
- // Priority defs. same as RTCORBA
+ // Priority defs. same as RTCORBA
typedef short Priority;
const Priority minPriority = 0;
const Priority maxPriority = 32767;
@@ -75,6 +75,52 @@ module NotifyExt
{
void destroy ();
};
+
+ interface ConsumerAdmin : CosNotifyChannelAdmin::ConsumerAdmin
+ {
+ // Create a new push-style proxy supplier
+ /**
+ * @param ctype The event format that the ProxyConsumer should
+ * support
+ * @param proxy_id The ID assigned to the new proxy supplier
+ * @param initial_qos Configure the initial QoS properties of the
+ * new Proxy.
+ * @return The new ProxySupplier
+ * @throws AdminLimitExceeded if a limit in this admin is reached,
+ * such as the maximum number of proxies.
+ * @throws CosNotification::UnsupportedQoS if the requested QoS
+ * properties cannot be satisfied or are invalid
+ */
+ CosNotifyChannelAdmin::ProxySupplier obtain_notification_push_supplier_with_qos (in CosNotifyChannelAdmin::ClientType ctype,
+ out CosNotifyChannelAdmin::ProxyID proxy_id,
+ in CosNotification::QoSProperties initial_qos)
+ raises ( CosNotifyChannelAdmin::AdminLimitExceeded,
+ CosNotification::UnsupportedQoS
+ );
+ };
+
+ interface SupplierAdmin : CosNotifyChannelAdmin::SupplierAdmin
+ {
+ // Create a new push-style proxy supplier
+ /**
+ * @param ctype The event format that the ProxyConsumer should
+ * support
+ * @param proxy_id The ID assigned to the new proxy supplier
+ * @param initial_qos Configure the initial QoS properties of the
+ * new Proxy.
+ * @return The new ProxyConsumer
+ * @throws AdminLimitExceeded if a limit in this admin is reached,
+ * such as the maximum number of proxies.
+ * @throws CosNotification::UnsupportedQoS if the requested QoS
+ * properties cannot be satisfied or are invalid
+ */
+ CosNotifyChannelAdmin::ProxyConsumer obtain_notification_push_consumer_with_qos (in CosNotifyChannelAdmin::ClientType ctype,
+ out CosNotifyChannelAdmin::ProxyID proxy_id,
+ in CosNotification::QoSProperties initial_qos)
+ raises ( CosNotifyChannelAdmin::AdminLimitExceeded,
+ CosNotification::UnsupportedQoS
+ );
+ };
};
#endif /* _NOTIFY_EXT_IDL_ */
diff --git a/TAO/orbsvcs/orbsvcs/RT_Notification.bor b/TAO/orbsvcs/orbsvcs/RT_Notification.bor
new file mode 100644
index 00000000000..5261340b58b
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/RT_Notification.bor
@@ -0,0 +1,72 @@
+# Makefile for building the TAO_RT_Notification library with Borland C++ Builder
+
+NAME = TAO_RT_Notification
+
+OBJFILES = \
+ $(OBJDIR)\RT_Builder.obj \
+ $(OBJDIR)\RT_Factory.obj \
+ $(OBJDIR)\RT_Notify_Service.obj \
+ $(OBJDIR)\RT_POA_Helper.obj \
+ $(OBJDIR)\RT_Properties.obj
+
+EXTERNAL_LIBS =
+
+LFLAGS = \
+ -j$(TAO_ROOT)\orbsvcs\orbsvcs\$(CONFIG_SUBDIR) -j$(TAO_ROOT)\orbsvcs\orbsvcs \
+ -L$(TAO_ROOT)\orbsvcs\orbsvcs\$(CONFIG_SUBDIR) -L$(TAO_ROOT)\orbsvcs\orbsvcs \
+ -j$(TAO_ROOT)\tao\$(CONFIG_SUBDIR) -j$(TAO_ROOT)\tao \
+ -L$(TAO_ROOT)\tao\$(CONFIG_SUBDIR) -L$(TAO_ROOT)\tao \
+ -j$(ACE_ROOT)\ace\$(CONFIG_SUBDIR) -j$(ACE_ROOT)\ace \
+ -L$(ACE_ROOT)\ace\$(CONFIG_SUBDIR) -L$(ACE_ROOT)\ace \
+ -j$(CORE_BINDIR) \
+ -L$(CORE_BINDIR)
+
+LIBFILES = \
+ TAO_CosNotification$(LIB_DECORATOR).lib \
+ TAO_Svc_Utils$(LIB_DECORATOR).lib \
+ TAO_ETCL$(LIB_DECORATOR).lib \
+ TAO_DynamicAny$(LIB_DECORATOR).lib \
+ TAO_PortableServer$(LIB_DECORATOR).lib \
+ TAO$(LIB_DECORATOR).lib \
+ TAO_RTCORBA$(LIB_DECORATOR).lib \
+ ACE$(LIB_DECORATOR).lib \
+ $(EXTERNAL_LIBS)
+
+!ifdef STATIC
+LIB_FLAGS = -DTAO_AS_STATIC_LIBS=1 -DACE_AS_STATIC_LIBS=1
+DLL_FLAGS =
+!else
+LIB_FLAGS =
+DLL_FLAGS = -DTAO_RT_NOTIFY_BUILD_DLL=1
+!endif
+
+CFLAGS = \
+ -I$(TAO_ROOT)\orbsvcs \
+ -I$(TAO_ROOT) \
+ -I$(TAO_ROOT)\tao \
+ -I$(ACE_ROOT) \
+ $(LIB_FLAGS) \
+ $(DLL_FLAGS)
+
+CPPDIR = Notify
+
+INCLUDES = \
+ Channel_Clients_T.h \
+ Notify\RT_Builder.h \
+ Notify\RT_Factory.h \
+ Notify\RT_Notify_Service.h \
+ Notify\RT_POA_Helper.h \
+ Notify\RT_Properties.h \
+ Channel_Clients_T.cpp \
+ Channel_Clients_T.i \
+ Notify\RT_Builder.inl \
+ Notify\RT_Factory.inl \
+ Notify\RT_Notify_Service.inl \
+ Notify\RT_POA_Helper.inl \
+ Notify\RT_Properties.inl
+
+INCDIR_NAME = orbsvcs
+
+BASE_BINDIR = $(ACE_ROOT)\bin
+
+!include <$(ACE_ROOT)\include\makeinclude\build_core_library.bor>
diff --git a/TAO/orbsvcs/orbsvcs/RT_Notification.dsp b/TAO/orbsvcs/orbsvcs/RT_Notification.dsp
new file mode 100644
index 00000000000..a0b5754f0ca
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/RT_Notification.dsp
@@ -0,0 +1,323 @@
+# Microsoft Developer Studio Project File - Name="RT_Notification DLL" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=RT_Notification DLL - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
+!MESSAGE NMAKE /f "RT_Notification.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "RT_Notification.mak" CFG="RT_Notification DLL - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "RT_Notification DLL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "RT_Notification DLL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "RT_Notification DLL - Win32 Release"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "."
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /GX /O2 /MD /Zi /Ob2 /GR /I "..\..\orbsvcs" /I "..\.." /I "..\..\tao" /I "..\..\.." /D NDEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_RT_NOTIFY_BUILD_DLL=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\orbsvcs" /i "..\.." /i "..\..\tao" /i "..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_RT_Notification.bsc"
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_Svc_Utils.lib TAO_PortableServer.lib TAO.lib TAO_RTCORBA.lib TAO_CosNotification.lib TAO_CosEvent.lib ACE.lib /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao\RTCORBA" /libpath:"..\..\orbsvcs\orbsvcs" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /nologo /version:1.3.1 /subsystem:windows /dll /machine:I386 /out:"..\..\..\bin\TAO_RT_Notification.dll"
+
+!ELSEIF "$(CFG)" == "RT_Notification DLL - Win32 Debug"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "."
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /MDd /GR /Gy /I "..\..\orbsvcs" /I "..\.." /I "..\..\tao" /I "..\..\.." /D _DEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_RT_NOTIFY_BUILD_DLL=1 /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\orbsvcs" /i "..\.." /i "..\..\tao" /i "..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_RT_Notification.bsc"
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib TAO_RTCORBAd.lib TAO_CosNotificationd.lib TAO_CosEventd.lib ACEd.lib /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao\RTCORBA" /libpath:"..\..\orbsvcs\orbsvcs" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /nologo /version:1.3.1 /subsystem:windows /dll /debug /pdb:TAO_RT_Notificationd.pdb /machine:I386 /out:"..\..\..\bin\TAO_RT_Notificationd.dll"
+
+!ENDIF
+
+# Begin Target
+
+# Name "RT_Notification DLL - Win32 Release"
+# Name "RT_Notification DLL - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\Notify\RT_Builder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Factory.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Notify_Service.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_POA_Helper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Properties.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\Structured\RT_StructuredProxyPushSupplier.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hh"
+# Begin Source File
+
+SOURCE=.\Channel_Clients_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosEventChannelAdminS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosEventCommS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNamingS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotificationS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotifyChannelAdminS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotifyCommS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotifyFilterS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Event_ForwarderS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Builder.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Factory.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Notify_Service.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_POA_Helper.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Properties.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\Structured\RT_StructuredProxyPushSupplier.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\NotifyExtS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RtecBaseS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TimeBaseS_T.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+# Begin Source File
+
+SOURCE=.\Channel_Clients_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosEventChannelAdminS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosEventCommS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNamingS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotificationS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotifyChannelAdminS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotifyCommS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotifyFilterS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Event_ForwarderS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Builder.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Factory.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Notify_Service.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_POA_Helper.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\RT_Properties.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify\Structured\RT_StructuredProxyPushSupplier.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\NotifyExtS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\RtecBaseS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\TimeBaseS_T.i
+# End Source File
+# End Group
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\Channel_Clients_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosEventChannelAdminS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosEventCommS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNamingS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotificationS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotifyChannelAdminS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotifyCommS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\CosNotifyFilterS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Event_ForwarderS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\NotifyExtS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\RtecBaseS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\TimeBaseS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\RT_Notification.rc
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/orbsvcs/orbsvcs/RT_Notification.mpc b/TAO/orbsvcs/orbsvcs/RT_Notification.mpc
new file mode 100644
index 00000000000..d4eb38ad14e
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/RT_Notification.mpc
@@ -0,0 +1,22 @@
+project(RT_Notification) : orbsvcslib, core {
+ depends += Svc_Utils ETCL DynamicAny PortableServer TAO_RTCORBA CosNotification
+ sharedname = TAO_RT_Notification
+ libs += TAO_CosNotification TAO_Svc_Utils TAO_ETCL TAO_DynamicAny TAO_PortableServer TAO TAO_RTCORBA
+ idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_RT_Notify_Export -Wb,export_include=Notify/rt_notify_export.h
+ dllflags = TAO_RT_NOTIFY_BUILD_DLL
+ tagchecks = RT_Notify
+ include_dir = orbsvcs
+
+ IDL_Files {
+ }
+
+ Source_Files(ORBSVCS_COMPONENTS) {
+ RT_Notify {
+ Notify/RT_Builder.cpp
+ Notify/RT_Factory.cpp
+ Notify/RT_Notify_Service.cpp
+ Notify/RT_POA_Helper.cpp
+ Notify/RT_Properties.cpp
+ }
+ }
+}
diff --git a/TAO/orbsvcs/tests/Notify/Driver/Driver.dsp b/TAO/orbsvcs/tests/Notify/Driver/Driver.dsp
new file mode 100644
index 00000000000..bbaa2fbf8c0
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/Driver/Driver.dsp
@@ -0,0 +1,77 @@
+# Microsoft Developer Studio Project File - Name="Driver EXE" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Driver EXE - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
+!MESSAGE NMAKE /f "Driver.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "Driver.mak" CFG="Driver EXE - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Driver EXE - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Driver EXE - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Driver EXE - Win32 Release"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /GX /O2 /MD /GR /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D NDEBUG=1 /D WIN32=1 /D _CONSOLE=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_NotifyTests.lib TAO.lib ACE.lib /libpath:"..\..\..\..\tao\IORTable" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\tao\DynamicAny" /libpath:"..\..\..\..\orbsvcs\orbsvcs\ETCL" /libpath:"..\..\..\..\orbsvcs\tests\Notify\lib" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3.1 /subsystem:console /machine:I386 /out:"Notify_Tests_Driver.exe"
+
+!ELSEIF "$(CFG)" == "Driver EXE - Win32 Debug"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /MDd /GR /Gy /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D _DEBUG=1 /D WIN32=1 /D _CONSOLE=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_NotifyTestsd.lib TAOd.lib ACEd.lib /libpath:"..\..\..\..\tao\IORTable" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\tao\DynamicAny" /libpath:"..\..\..\..\orbsvcs\orbsvcs\ETCL" /libpath:"..\..\..\..\orbsvcs\tests\Notify\lib" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3.1 /subsystem:console /debug /machine:I386 /out:"Notify_Tests_Driver.exe"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Driver EXE - Win32 Release"
+# Name "Driver EXE - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\main.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/orbsvcs/tests/Notify/Driver/Driver.mpc b/TAO/orbsvcs/tests/Notify/Driver/Driver.mpc
new file mode 100644
index 00000000000..daada2aca4e
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/Driver/Driver.mpc
@@ -0,0 +1,7 @@
+project (Notify_Test_Driver): notifytest {
+ exename = Notify_Tests_Driver
+
+ Source_Files {
+ main.cpp
+ }
+} \ No newline at end of file
diff --git a/TAO/orbsvcs/tests/Notify/Driver/Driver_Static.dsp b/TAO/orbsvcs/tests/Notify/Driver/Driver_Static.dsp
new file mode 100644
index 00000000000..11d776009ff
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/Driver/Driver_Static.dsp
@@ -0,0 +1,77 @@
+# Microsoft Developer Studio Project File - Name="Driver Static EXE" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Driver Static EXE - Win32 Static Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
+!MESSAGE NMAKE /f "Driver_Static.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "Driver_Static.mak" CFG="Driver Static EXE - Win32 Static Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Driver Static EXE - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Driver Static EXE - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Driver Static EXE - Win32 Static Release"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /GX /O2 /MD /GR /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D NDEBUG=1 /D WIN32=1 /D _CONSOLE=1 /D TAO_AS_STATIC_LIBS=1 /D ACE_AS_STATIC_LIBS=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_NotifyTestss.lib TAOs.lib ACEs.lib /libpath:"..\..\..\..\tao\IORTable" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\tao\DynamicAny" /libpath:"..\..\..\..\orbsvcs\orbsvcs\ETCL" /libpath:"..\..\..\..\orbsvcs\tests\Notify\lib" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3.1 /subsystem:console /machine:I386 /out:"Notify_Tests_Driver.exe"
+
+!ELSEIF "$(CFG)" == "Driver Static EXE - Win32 Static Debug"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /MDd /GR /Gy /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D _DEBUG=1 /D WIN32=1 /D _CONSOLE=1 /D TAO_AS_STATIC_LIBS=1 /D ACE_AS_STATIC_LIBS=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_NotifyTestssd.lib TAOsd.lib ACEsd.lib /libpath:"..\..\..\..\tao\IORTable" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\tao\DynamicAny" /libpath:"..\..\..\..\orbsvcs\orbsvcs\ETCL" /libpath:"..\..\..\..\orbsvcs\tests\Notify\lib" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3.1 /subsystem:console /debug /machine:I386 /out:"Notify_Tests_Driver.exe"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Driver Static EXE - Win32 Static Release"
+# Name "Driver Static EXE - Win32 Static Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\main.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/orbsvcs/tests/Notify/Driver/main.cpp b/TAO/orbsvcs/tests/Notify/Driver/main.cpp
new file mode 100644
index 00000000000..d531e693560
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/Driver/main.cpp
@@ -0,0 +1,29 @@
+//$Id$
+
+#include "../lib/Driver.h"
+
+int
+ACE_TMAIN (int argc, char *argv[])
+{
+ TAO_NS_Driver driver;
+
+ ACE_TRY_NEW_ENV
+ {
+ if (driver.init (argc, argv ACE_ENV_ARG_PARAMETER) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_LIB_TEXT("Failed to initialize the Notify Testing Driver.\n")),
+ 1);
+
+ driver.run (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ ACE_LIB_TEXT("Failed to run the Notify Testing Driver\n"));
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/orbsvcs/tests/Notify/Lanes/README b/TAO/orbsvcs/tests/Notify/Lanes/README
new file mode 100644
index 00000000000..96b9d8d9a2a
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/Lanes/README
@@ -0,0 +1,41 @@
+RT Notification test to verify lane support
+===========================================
+This test makes sure that events are send according to the lanes
+configured on the evnt channel.
+
+Description:
+===========
+
+notify.conf:
+-----------
+The notify.conf file specifies the Test Filter Factory to be used by
+the RT Notification library.
+The Test Filter factory create special filter objects. these objects
+check if the correct lane is being used for invocations.
+
+
+supplier.conf:
+-------------
+
+An event channel is created with 4 lanes. The lowest priority lane (0 in
+continuous mapping) is used to handle the administrative invocations
+by the driver program. 3 other lanes are used to handle 3 different
+event flow "paths" in the event channel.
+
+3 Periodic suppliers are created. Each supplier is configured to
+operate in its lane.
+
+consumer.conf:
+------------
+
+An RT POA is created with 4 lanes (identical to the one setup on the
+eventchannel).
+
+3 Periodic consumers and created and activated in the local RT POA.
+
+Expected Result:
+==============
+if a request reaches a Lane that it was not supposed to, an
+error message is printed. otherwise some housekeeping messages are
+generated when the test runs.
+
diff --git a/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf b/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf
new file mode 100644
index 00000000000..e32bf7c5720
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf
@@ -0,0 +1,58 @@
+##---- Load the Factories------
+dynamic TAO_RT_ORB_Loader Service_Object *
+TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous"
+
+dynamic TAO_NS_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_NS_RT_Application_Command_Factory () ""
+##dynamic TAO_NS_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_NS_Application_Command_Factory () ""
+dynamic TAO_NS_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_NS_ConsumerAdmin_Command_Factory () ""
+
+dynamic TAO_NS_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Periodic_Consumer_Command_Factory () ""
+
+dynamic TAO_NS_Filter_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Filter_Command_Factory () ""
+
+dynamic TAO_NS_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_NS_RT_POA_Command_Factory () ""
+
+##------- Init the Application Object ----------
+static Command_Builder "Application -Init"
+
+##----------- Create an RT POA to host local consumer objects-----------
+static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -ThreadPoolLanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0"
+
+##--------- Consumer Admin 1 -------------
+static Command_Builder "ConsumerAdmin -Create ca1 ec1 -AND_OP"
+
+##--------- Consumer 1 , connected to CA 1 --------
+static Command_Builder "PeriodicConsumer -Create c1 ca1 -POA poa_1 -Proxy c1_proxy -MaxCount 5"
+static Command_Builder "PeriodicConsumer -Subscription c1 +Path1"
+
+static Command_Builder "Filter -CreateFilter f_c1 ff"
+static Command_Builder "Filter -Add_Constraint f_c1 'PoolId = 1'"
+static Command_Builder "Filter -Add_Constraint f_c1 'LaneId = 1'"
+
+static Command_Builder "Filter -Add_Filter f_c1 c1_proxy"
+
+##--------- Consumer 2 , connected to CA 1 --------
+static Command_Builder "PeriodicConsumer -Create c2 ca1 -POA poa_1 -Proxy c2_proxy -MaxCount 5"
+static Command_Builder "PeriodicConsumer -Subscription c2 +Path2"
+
+static Command_Builder "Filter -CreateFilter f_c2 ff"
+static Command_Builder "Filter -Add_Constraint f_c2 'PoolId = 1'"
+static Command_Builder "Filter -Add_Constraint f_c2 'LaneId = 2'"
+
+static Command_Builder "Filter -Add_Filter f_c2 c2_proxy"
+
+##--------- Consumer 3 , connected to CA 1 --------
+static Command_Builder "PeriodicConsumer -Create c3 ca1 -POA poa_1 -Proxy c3_proxy -MaxCount 5"
+static Command_Builder "PeriodicConsumer -Subscription c3 +Path3"
+
+static Command_Builder "Filter -CreateFilter f_c3 ff"
+static Command_Builder "Filter -Add_Constraint f_c3 'PoolId = 1'"
+static Command_Builder "Filter -Add_Constraint f_c3 'LaneId = 3'"
+
+static Command_Builder "Filter -Add_Filter f_c3 c3_proxy"
+
+##------- Run---------
+static Command_Builder "Application -SignalPeer"
+static Command_Builder "Application -Run"
+static Command_Builder "Application -WaitForEvents"
+static Command_Builder "Application -Shutdown"
diff --git a/TAO/orbsvcs/tests/Notify/Lanes/notify.conf b/TAO/orbsvcs/tests/Notify/Lanes/notify.conf
new file mode 100644
index 00000000000..fa25e57edff
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/Lanes/notify.conf
@@ -0,0 +1,5 @@
+dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous"
+
+dynamic TAO_NS_FilterFactory Service_Object* TAO_RT_NotifyTests_Filter:_make_TAO_NS_RT_Test_FilterFactory () ""
+dynamic TAO_Notify_Service Service_Object * TAO_RT_Notification:_make_TAO_RT_Notify_Service () ""
+
diff --git a/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl b/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl
new file mode 100755
index 00000000000..2f9890ee92d
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl
@@ -0,0 +1,95 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "../../../../../bin";
+use PerlACE::Run_Test;
+
+$experiment_timeout = 60;
+$startup_timeout = 60;
+$notify_conf = PerlACE::LocalFile ("notify.conf");
+$notify_ior = PerlACE::LocalFile ("notify.ior");
+$naming_ior = PerlACE::LocalFile ("naming.ior");
+$supplier_ior = PerlACE::LocalFile ("supplier.ior");
+$supplier_conf = PerlACE::LocalFile ("supplier.conf");
+$consumer_conf = PerlACE::LocalFile ("consumer.conf");
+$status = 0;
+
+$Naming = new PerlACE::Process ("../../../Naming_Service/Naming_Service",
+ "-o $naming_ior");
+
+$Notification = new PerlACE::Process ("../../../Notify_Service/Notify_Service");
+
+$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf";
+
+$Supplier = new PerlACE::Process ("../Driver/Notify_Tests_Driver");
+
+$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf";
+
+$Consumer = new PerlACE::Process ("../Driver/Driver");
+
+$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf";
+
+unlink $naming_ior;
+$Naming->Spawn ();
+
+if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the naming service to start\n";
+ $Naming->Kill ();
+ exit 1;
+}
+
+unlink $notify_ior;
+$Notification->Arguments ($Notify_Args);
+$args = $Notification->Arguments ();
+print STDERR "Running Notification with arguments: $args\n";
+$Notification->Spawn ();
+
+if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the notify service to start\n";
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+}
+
+unlink $supplier_ior;
+$Supplier->Arguments ($Supplier_Args);
+$args = $Supplier->Arguments ();
+print STDERR "Running Supplier with arguments: $args\n";
+$Supplier->Spawn ();
+
+if (PerlACE::waitforfile_timed ($supplier_ior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the supplier to start\n";
+ $Supplier->Kill ();
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+}
+
+$Consumer->Arguments ($Consumer_Args);
+$args = $Consumer->Arguments ();
+print STDERR "Running Consumer with arguments: $args\n";
+$status = $Consumer->SpawnWaitKill ($experiment_timeout);
+
+if ($status != 0)
+ {
+ print STDERR "ERROR: Consumer returned $status\n";
+ $Supplier->Kill ();
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+ }
+
+$Supplier->Kill ();
+unlink $supplier_ior;
+
+$Notification->Kill ();
+unlink $notify_ior;
+
+$Naming->Kill ();
+unlink $naming_ior;
+
+exit $status;
diff --git a/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf b/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf
new file mode 100644
index 00000000000..55da7ac14cc
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf
@@ -0,0 +1,62 @@
+## $Id$
+## This file has the following configuration:
+## EventChannel ec1 with 1 Thread
+## SupplierAdmim sa1 with 1 Thread
+## SupplierAdmin sa2
+##
+## Supplier s1 has 1 Thread and is connected to sa1
+## Supplier s2 is connected to sa1
+##
+## Supplier s3 is connected to sa2
+##
+
+##---- Load the Factories------
+dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous"
+
+dynamic TAO_NS_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_NS_RT_Application_Command_Factory () ""
+##dynamic TAO_NS_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_NS_Application_Command_Factory () ""
+dynamic TAO_NS_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_NS_EventChannel_Command_Factory () ""
+dynamic TAO_NS_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_SupplierAdmin_Command_Factory () ""
+
+dynamic TAO_NS_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Periodic_Supplier_Command_Factory () ""
+dynamic TAO_NS_Filter_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Filter_Command_Factory () ""
+
+##------- Init the Application Object ----------
+static Command_Builder "Application -Init"
+
+##------- Create Event Channel ---------------
+static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory"
+static Command_Builder "EventChannel -Set_QoS ec1 -ThreadPoolLanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0"
+static Command_Builder "Filter -CreateFactory ff ec1"
+
+### --- Create Supplier Admin 1 ----
+static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP"
+
+### --- Create Supplier s1 connected to sa1. -----
+static Command_Builder "PeriodicSupplier -Create s1 sa1 -Proxy s1_proxy -EventType Path1 -Priority 1 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 "
+
+static Command_Builder "Filter -CreateFilter f1 ff"
+static Command_Builder "Filter -Add_Constraint f1 'PoolId = 1'"
+static Command_Builder "Filter -Add_Constraint f1 'LaneId = 1'"
+static Command_Builder "Filter -Add_Filter f1 s1_proxy"
+
+### --- Create Supplier s2 connected to sa1 ----
+static Command_Builder "PeriodicSupplier -Create s2 sa1 -Proxy s2_proxy -EventType Path2 -Priority 2 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 "
+
+static Command_Builder "Filter -CreateFilter f2 ff"
+static Command_Builder "Filter -Add_Constraint f2 'PoolId = 1'"
+static Command_Builder "Filter -Add_Constraint f2 'LaneId = 2'"
+static Command_Builder "Filter -Add_Filter f2 s2_proxy"
+
+### --- Create Supplier s3 connected to sa2 ----
+static Command_Builder "PeriodicSupplier -Create s3 sa1 -Proxy s3_proxy -EventType Path3 -Priority 3 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 "
+static Command_Builder "Filter -CreateFilter f3 ff"
+static Command_Builder "Filter -Add_Constraint f3 'PoolId = 1'"
+static Command_Builder "Filter -Add_Constraint f3 'LaneId = 3'"
+static Command_Builder "Filter -Add_Filter f3 s3_proxy"
+
+##--------- Run -------------
+static Command_Builder "Application -WaitToStart"
+static Command_Builder "Application -Run"
+static Command_Builder "Application -WaitForEvents"
+static Command_Builder "Application -Shutdown"
diff --git a/TAO/orbsvcs/tests/Notify/ThreadPool/README b/TAO/orbsvcs/tests/Notify/ThreadPool/README
new file mode 100644
index 00000000000..d690937f041
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/ThreadPool/README
@@ -0,0 +1,52 @@
+ThreadPool test
+===============
+
+This test verifies the ThreadPool support in the RT Notification
+Service.
+
+Description:
+===========
+
+notify.conf:
+-----------
+The notify.conf file specifies the Test Filter Factory to be used by
+the RT Notification library.
+The Test Filter factory create special filter objects. these objects
+check if the correct thread pool is being used for invocations.
+
+supplier.conf:
+-------------
+
+This creates the following -
+- An EventChannel with a threadpool.
+- A SupplierAdmin (SA1)with a threadpool.
+- Another SupplierAdmin (SA2) with no threadpool.
+
+- A ProxyConsumer(1) is connected to SA1 with a threadpool.
+- A ProxyConsumer(2) is connected to SA1 with no threadpool.
+- A ProxyConsumer(3) is connected to SA2 with no threadpool.
+
+Periodic Suppliers are associated with each Proxy and send events at
+different priorities.
+
+consumer.conf:
+-------------
+
+This creates:
+- A ConsumerAdmin (CA1)with a threadpool.
+- Another ConsumerAdmin (CA2) with no threadpool.
+
+An RT POA is created in which the ProxySuppliers are activated.
+
+- A ProxySupplier(1) is connected to CA1 with a threadpool.
+- A ProxySupplier(2) is connected to CA1 with no threadpool.
+- A ProxySupplier(3) is connected to CA2 with no threadpool.
+
+Periodic Consumers are associated with each Proxy and receive events at
+different priorities.
+
+Expected Result:
+==============
+if a request reaches a threadpool that it was not supposed to, an
+error message is printed. otherwise some housekeeping messages are
+generated when the test runs. \ No newline at end of file
diff --git a/TAO/orbsvcs/tests/Notify/ThreadPool/consumer.conf b/TAO/orbsvcs/tests/Notify/ThreadPool/consumer.conf
new file mode 100644
index 00000000000..2cc9e9c4ab9
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/ThreadPool/consumer.conf
@@ -0,0 +1,50 @@
+##---- Load the Factories------
+dynamic TAO_RT_ORB_Loader Service_Object * TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous"
+
+dynamic TAO_NS_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_NS_RT_Application_Command_Factory () ""
+##dynamic TAO_NS_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_NS_Application_Command_Factory () ""
+dynamic TAO_NS_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_NS_ConsumerAdmin_Command_Factory () ""
+
+dynamic TAO_NS_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Periodic_Consumer_Command_Factory () ""
+
+dynamic TAO_NS_Filter_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Filter_Command_Factory () ""
+
+dynamic TAO_NS_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_NS_RT_POA_Command_Factory () ""
+
+##------- Init the Application Object ----------
+static Command_Builder "Application -Init"
+
+##----------- Create an RT POA to host local consumer objects-----------
+static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -ThreadPool 1 0"
+
+##--------- Consumer Admin 1 -------------
+static Command_Builder "ConsumerAdmin -Create ca1 ec1 -AND_OP"
+static Command_Builder "ConsumerAdmin -Set_QoS ca1 -ThreadPool -Threads 1 -Priority 5"
+
+##--------- Consumer 1 , connected to CA 1 --------
+static Command_Builder "PeriodicConsumer -Create c1 ca1 -POA poa_1 -Set_QoS -ThreadPool -Threads 1 -Priority 5 -Proxy c1_proxy -MaxCount 15"
+static Command_Builder "Filter -CreateFilter f_c1 ff"
+static Command_Builder "Filter -Add_Constraint f_c1 'PoolId = 5'"
+static Command_Builder "Filter -Add_Filter f_c1 c1_proxy"
+
+##--------- Consumer 2 , connected to CA 1 --------
+static Command_Builder "PeriodicConsumer -Create c2 ca1 -POA poa_1 -Proxy c2_proxy -MaxCount 15"
+static Command_Builder "Filter -CreateFilter f_c2 ff"
+static Command_Builder "Filter -Add_Constraint f_c2 'PoolId = 4'"
+static Command_Builder "Filter -Add_Filter f_c2 c2_proxy"
+
+##--------- Consumer Admin 2 -------------
+static Command_Builder "ConsumerAdmin -Create ca2 ec1 -AND_OP"
+
+##--------- Consumer 3 , connected to CA 2 --------
+static Command_Builder "PeriodicConsumer -Create c3 ca2 -POA poa_1 -Proxy c3_proxy -MaxCount 15"
+
+static Command_Builder "Filter -CreateFilter f_c3 ff"
+static Command_Builder "Filter -Add_Constraint f_c3 'PoolId = 1'"
+static Command_Builder "Filter -Add_Filter f_c3 c3_proxy"
+
+##------- Run---------
+static Command_Builder "Application -SignalPeer"
+static Command_Builder "Application -Run"
+static Command_Builder "Application -WaitForEvents"
+static Command_Builder "Application -Shutdown"
diff --git a/TAO/orbsvcs/tests/Notify/ThreadPool/notify.conf b/TAO/orbsvcs/tests/Notify/ThreadPool/notify.conf
new file mode 100644
index 00000000000..84adfec9ca5
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/ThreadPool/notify.conf
@@ -0,0 +1,5 @@
+dynamic TAO_RT_ORB_Loader Service_Object * TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous"
+
+dynamic TAO_NS_FilterFactory Service_Object* TAO_RT_NotifyTests_Filter:_make_TAO_NS_RT_Test_FilterFactory () ""
+dynamic TAO_Notify_Service Service_Object * TAO_RT_Notification:_make_TAO_RT_Notify_Service () ""
+
diff --git a/TAO/orbsvcs/tests/Notify/ThreadPool/run_test.pl b/TAO/orbsvcs/tests/Notify/ThreadPool/run_test.pl
new file mode 100755
index 00000000000..2f9890ee92d
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/ThreadPool/run_test.pl
@@ -0,0 +1,95 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "../../../../../bin";
+use PerlACE::Run_Test;
+
+$experiment_timeout = 60;
+$startup_timeout = 60;
+$notify_conf = PerlACE::LocalFile ("notify.conf");
+$notify_ior = PerlACE::LocalFile ("notify.ior");
+$naming_ior = PerlACE::LocalFile ("naming.ior");
+$supplier_ior = PerlACE::LocalFile ("supplier.ior");
+$supplier_conf = PerlACE::LocalFile ("supplier.conf");
+$consumer_conf = PerlACE::LocalFile ("consumer.conf");
+$status = 0;
+
+$Naming = new PerlACE::Process ("../../../Naming_Service/Naming_Service",
+ "-o $naming_ior");
+
+$Notification = new PerlACE::Process ("../../../Notify_Service/Notify_Service");
+
+$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf";
+
+$Supplier = new PerlACE::Process ("../Driver/Notify_Tests_Driver");
+
+$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf";
+
+$Consumer = new PerlACE::Process ("../Driver/Driver");
+
+$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf";
+
+unlink $naming_ior;
+$Naming->Spawn ();
+
+if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the naming service to start\n";
+ $Naming->Kill ();
+ exit 1;
+}
+
+unlink $notify_ior;
+$Notification->Arguments ($Notify_Args);
+$args = $Notification->Arguments ();
+print STDERR "Running Notification with arguments: $args\n";
+$Notification->Spawn ();
+
+if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the notify service to start\n";
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+}
+
+unlink $supplier_ior;
+$Supplier->Arguments ($Supplier_Args);
+$args = $Supplier->Arguments ();
+print STDERR "Running Supplier with arguments: $args\n";
+$Supplier->Spawn ();
+
+if (PerlACE::waitforfile_timed ($supplier_ior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the supplier to start\n";
+ $Supplier->Kill ();
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+}
+
+$Consumer->Arguments ($Consumer_Args);
+$args = $Consumer->Arguments ();
+print STDERR "Running Consumer with arguments: $args\n";
+$status = $Consumer->SpawnWaitKill ($experiment_timeout);
+
+if ($status != 0)
+ {
+ print STDERR "ERROR: Consumer returned $status\n";
+ $Supplier->Kill ();
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+ }
+
+$Supplier->Kill ();
+unlink $supplier_ior;
+
+$Notification->Kill ();
+unlink $notify_ior;
+
+$Naming->Kill ();
+unlink $naming_ior;
+
+exit $status;
diff --git a/TAO/orbsvcs/tests/Notify/ThreadPool/supplier.conf b/TAO/orbsvcs/tests/Notify/ThreadPool/supplier.conf
new file mode 100644
index 00000000000..0c8ef84a5f1
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/ThreadPool/supplier.conf
@@ -0,0 +1,63 @@
+## $Id$
+## This file has the following configuration:
+## EventChannel ec1 with 1 Thread
+## SupplierAdmim sa1 with 1 Thread
+## SupplierAdmin sa2
+##
+## Supplier s1 has 1 Thread and is connected to sa1
+## Supplier s2 is connected to sa1
+##
+## Supplier s3 is connected to sa2
+##
+
+##---- Load the Factories------
+dynamic TAO_RT_ORB_Loader Service_Object * TAO_RTCORBAd:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous"
+
+dynamic TAO_NS_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTestsd:_make_TAO_NS_RT_Application_Command_Factory () ""
+##dynamic TAO_NS_Application_Command_Factory Service_Object * TAO_NotifyTestsd:_make_TAO_NS_Application_Command_Factory () ""
+dynamic TAO_NS_EventChannel_Command_Factory Service_Object *TAO_NotifyTestsd:_make_TAO_NS_EventChannel_Command_Factory () ""
+dynamic TAO_NS_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTestsd:_make_TAO_NS_SupplierAdmin_Command_Factory () ""
+
+dynamic TAO_NS_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTestsd:_make_TAO_NS_Periodic_Supplier_Command_Factory () ""
+dynamic TAO_NS_Filter_Command_Factory Service_Object* TAO_NotifyTestsd:_make_TAO_NS_Filter_Command_Factory () ""
+
+##------- Init the Application Object ----------
+static Command_Builder "Application -Init"
+
+##------- Create Event Channel ---------------
+static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory"
+static Command_Builder "EventChannel -Set_QoS ec1 -ThreadPool -Threads 1 -Priority 0"
+static Command_Builder "Filter -CreateFactory ff ec1"
+
+### --- Create Supplier Admin 1 ----
+static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP"
+static Command_Builder "SupplierAdmin -Set_QoS sa1 -ThreadPool -Threads 1 -Priority 2"
+
+### --- Create Supplier s1 connected to sa1. It has its own Thread ----
+static Command_Builder "PeriodicSupplier -Create s1 sa1 -Set_QoS -ThreadPool -Threads 1 -Priority 5 -Proxy s1_proxy -Priority 1 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 "
+
+static Command_Builder "Filter -CreateFilter f1 ff"
+static Command_Builder "Filter -Add_Constraint f1 'PoolId = 3'"
+static Command_Builder "Filter -Add_Filter f1 s1_proxy"
+
+### --- Create Supplier s2 connected to sa1 ----
+static Command_Builder "PeriodicSupplier -Create s2 sa1 -Proxy s2_proxy -Priority 3 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 "
+
+static Command_Builder "Filter -CreateFilter f2 ff"
+static Command_Builder "Filter -Add_Constraint f2 'PoolId = 2'"
+static Command_Builder "Filter -Add_Filter f2 s2_proxy"
+
+### --- Create Supplier Admin 2 ----
+static Command_Builder "SupplierAdmin -Create sa2 ec1 -AND_OP"
+
+### --- Create Supplier s3 connected to sa2 ----
+static Command_Builder "PeriodicSupplier -Create s3 sa2 -Proxy s3_proxy -Priority 6 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 "
+static Command_Builder "Filter -CreateFilter f3 ff"
+static Command_Builder "Filter -Add_Constraint f3 'PoolId = 1'"
+static Command_Builder "Filter -Add_Filter f3 s3_proxy"
+
+##--------- Run -------------
+static Command_Builder "Application -WaitToStart"
+static Command_Builder "Application -Run"
+static Command_Builder "Application -WaitForEvents"
+static Command_Builder "Application -Shutdown"
diff --git a/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.cpp b/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.cpp
new file mode 100644
index 00000000000..9c90cef1f55
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.cpp
@@ -0,0 +1,319 @@
+// $Id$
+
+#include "Activation_Manager.h"
+
+ACE_RCSID(lib, TAO_Activation_Manager, "$id$")
+
+#include "LookupManager.h"
+#include "Command_Builder.h"
+#include "Name.h"
+
+TAO_NS_Activation_Manager::TAO_NS_Activation_Manager (void)
+ : active_suppliers_ (0)
+ , active_consumers_ (0)
+ , active_done_ (lock_)
+ , ior_output_file_ (0)
+ , started_ (0)
+ , started_condition_ (lock_)
+{
+ LOOKUP_MANAGER->_register (this);
+}
+
+TAO_NS_Activation_Manager::~TAO_NS_Activation_Manager ()
+{
+ delete this->barrier_;
+
+ if (this->ior_output_file_)
+ ACE_OS::fclose(this->ior_output_file_);
+}
+
+int
+TAO_NS_Activation_Manager::ior_output_file (const ACE_TCHAR *file_name)
+{
+ this->ior_output_file_ = ACE_OS::fopen (file_name, ACE_LIB_TEXT("w"));
+
+ if (this->ior_output_file_ == 0)
+ return -1;
+ else
+ return 0;
+}
+
+int
+TAO_NS_Activation_Manager::ior_input_file (const ACE_TCHAR *file_name)
+{
+ this->ior_input_file_ = file_name;
+ return 0;
+}
+
+void
+TAO_NS_Activation_Manager::done (TAO_NS_Periodic_Supplier* /*supplier*/)
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_);
+
+ --active_suppliers_;
+
+ if (active_suppliers_ == 0)
+ this->active_done_.broadcast ();
+}
+
+void
+TAO_NS_Activation_Manager::done (TAO_NS_Periodic_Consumer* /*consumer*/)
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_);
+
+ --active_consumers_;
+
+ if (active_consumers_ == 0)
+ this->active_done_.broadcast ();
+}
+
+void
+TAO_NS_Activation_Manager::wait_for_completion (void)
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_);
+
+ while (active_suppliers_ != 0 || active_consumers_ != 0)
+ this->active_done_.wait (); //@@ use timed wait.
+}
+
+int
+TAO_NS_Activation_Manager::supplier_count (void)
+{
+ return this->supplier_map_.current_size ();
+}
+
+int
+TAO_NS_Activation_Manager::consumer_count (void)
+{
+ return this->consumer_map_.current_size ();
+}
+
+void
+TAO_NS_Activation_Manager::_register (TAO_NS_Periodic_Supplier* supplier, const char* obj_name ACE_ENV_ARG_DECL_NOT_USED)
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_);
+
+ // Register in supplier map.
+ ACE_CString name (obj_name);
+
+ if (this->supplier_map_.bind (name, supplier) == -1)
+ ACE_ERROR ((LM_ERROR, "Failed to bind supplier %s in LookupMap\n", obj_name));
+
+ // Designate application manager as the callback object.
+ supplier->task_callback (this);
+
+ active_suppliers_++;
+}
+
+void
+TAO_NS_Activation_Manager::_register (TAO_NS_Periodic_Consumer* consumer, const char* obj_name ACE_ENV_ARG_DECL_NOT_USED)
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_);
+
+ // Register in consumer map.
+ ACE_CString name (obj_name);
+
+ if (this->consumer_map_.bind (name, consumer) == -1)
+ ACE_ERROR ((LM_ERROR, "Failed to bind consumer %s in LookupMap\n", obj_name));
+
+ // Designate application manager as the callback object.
+ consumer->task_callback (this);
+
+ active_consumers_++;
+}
+
+void
+TAO_NS_Activation_Manager::resolve (TAO_NS_Periodic_Supplier*& supplier, const char* obj_name ACE_ENV_ARG_DECL_NOT_USED)
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_);
+
+ ACE_CString name (obj_name);
+
+ if (this->supplier_map_.find (name, supplier) == -1)
+ ACE_ERROR ((LM_ERROR, "Failed to find supplier %s in LookupMap\n", obj_name));
+}
+
+void
+TAO_NS_Activation_Manager::resolve (TAO_NS_Periodic_Consumer*& consumer, const char* obj_name ACE_ENV_ARG_DECL_NOT_USED)
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_);
+
+ ACE_CString name (obj_name);
+
+ if (this->consumer_map_.find (name, consumer) == -1)
+ ACE_ERROR ((LM_ERROR, "Failed to find consumer %s in LookupMap\n", obj_name));
+}
+
+int
+TAO_NS_Activation_Manager::activate_suppliers (void)
+{
+ TAO_NS_PeriodicSupplier_Iterator iter(this->supplier_map_);
+
+ TAO_NS_PeriodicSupplier_Entry* entry;
+
+ // Create the barrier to synch activated auppiers.
+ this->barrier_ = new ACE_Barrier (this->supplier_count () + 1);
+
+ // For each supplier : activate
+ TAO_NS_Periodic_Supplier* supplier = 0;
+
+ for (u_int index = 0; iter.done () == 0; iter.advance (), ++index)
+ {
+ if (iter.next (entry) != 0)
+ {
+ supplier = entry->int_id_;
+
+ if (supplier->activate (this->barrier_) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Supplier list activation failed\n"));
+ return -1;
+ }
+ }
+ }
+
+ this->barrier_->wait ();
+ return 0;
+}
+
+void
+TAO_NS_Activation_Manager::dump_stats (void)
+{
+ /// dump suppliers:
+ char msg[BUFSIZ];
+ ACE_OS::sprintf (msg, "# Stats generated on --\n");
+
+ TAO_NS_PeriodicSupplier_Iterator sup_iter(this->supplier_map_);
+
+ TAO_NS_PeriodicSupplier_Entry* sup_entry;
+
+ // For each supplier
+ TAO_NS_Periodic_Supplier* supplier = 0;
+
+ u_int index = 0;
+ for (; sup_iter.done () == 0; sup_iter.advance (), ++index)
+ {
+ if (sup_iter.next (sup_entry) != 0)
+ {
+ supplier = sup_entry->int_id_;
+ supplier->dump_stats (msg);
+ }
+ }
+
+ // dump consumers
+ TAO_NS_PeriodicConsumer_Iterator cons_iter(this->consumer_map_);
+
+ TAO_NS_PeriodicConsumer_Entry* cons_entry;
+
+ TAO_NS_Periodic_Consumer* consumer = 0;
+ for (index = 0; cons_iter.done () == 0; cons_iter.advance (), ++index)
+ {
+ if (cons_iter.next (cons_entry) != 0)
+ {
+ consumer = cons_entry->int_id_;
+ consumer->dump_stats (msg);
+ }
+ }
+}
+
+void
+TAO_NS_Activation_Manager::write_ior (ACE_ENV_SINGLE_ARG_DECL)
+{
+ PortableServer::ServantBase_var servant_var (this);
+
+ Notify_Test::Activation_Manager_var am_object = _this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CORBA::ORB_var orb;
+ LOOKUP_MANAGER->resolve (orb);
+
+ // Write IOR to a file, if asked.
+ CORBA::String_var str =
+ orb->object_to_string (am_object.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (this->ior_output_file_)
+ {
+ ACE_OS::fprintf (this->ior_output_file_,
+ "%s",
+ str.in ());
+ ACE_OS::fclose (this->ior_output_file_);
+ this->ior_output_file_ = 0;
+ }
+}
+
+void
+TAO_NS_Activation_Manager::wait_for_start_signal (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_);
+
+ while (this->started_ == 0)
+ this->started_condition_.wait (); //@@ use timed wait.
+}
+
+void
+TAO_NS_Activation_Manager::start (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_);
+
+ this->started_ = 1;
+
+ this->started_condition_.signal (); //@@ use timed wait.
+}
+
+void
+TAO_NS_Activation_Manager::signal_peer (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CORBA::ORB_var orb;
+ LOOKUP_MANAGER->resolve (orb);
+
+ CORBA::Object_var object =
+ orb->string_to_object (this->ior_input_file_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ Notify_Test::Activation_Manager_var peer = Notify_Test::Activation_Manager::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (peer.in ()))
+ {
+ ACE_ERROR ((LM_ERROR,
+ "Object reference <%s> is nil\n",
+ this->ior_input_file_.c_str ()));
+ }
+
+ peer->start (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class ACE_Hash_Map_Manager<ACE_CString, TAO_NS_Periodic_Supplier*, ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Manager<ACE_CString, TAO_NS_Periodic_Consumer*, ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Iterator<ACE_CString, TAO_NS_Periodic_Supplier*, ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Iterator<ACE_CString, TAO_NS_Periodic_Consumer*, ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Entry<ACE_CString, TAO_NS_Periodic_Supplier*>;
+template class ACE_Hash_Map_Entry<ACE_CString, TAO_NS_Periodic_Consumer*>;
+
+template class ACE_Hash_Map_Manager_Ex<ACE_CString, TAO_NS_Periodic_Supplier*, ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>, ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Manager_Ex<ACE_CString, TAO_NS_Periodic_Consumer*, ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>, ACE_SYNCH_NULL_MUTEX>;
+
+template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, TAO_NS_Periodic_Supplier*, ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>, ACE_SYNCH_NULL_MUTEX>;
+template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, TAO_NS_Periodic_Consumer*, ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>, ACE_SYNCH_NULL_MUTEX>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, TAO_NS_Periodic_Supplier*, ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, TAO_NS_Periodic_Consumer*, ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Iterator<ACE_CString, TAO_NS_Periodic_Supplier*, ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Iterator<ACE_CString, TAO_NS_Periodic_Consumer*, ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, TAO_NS_Periodic_Supplier*>
+#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, TAO_NS_Periodic_Consumer*>
+
+#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, TAO_NS_Periodic_Supplier*, ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>, ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, TAO_NS_Periodic_Consumer*, ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>, ACE_SYNCH_NULL_MUTEX>
+
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, TAO_NS_Periodic_Supplier*, ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>, ACE_SYNCH_NULL_MUTEX>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, TAO_NS_Periodic_Consumer*, ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>, ACE_SYNCH_NULL_MUTEX>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.h b/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.h
new file mode 100644
index 00000000000..2485c75bc26
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.h
@@ -0,0 +1,136 @@
+/* -*- C++ -*- */
+/**
+ * @file Activation_Manager.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_ACTIVATION_MANAGER_H
+#define TAO_NS_ACTIVATION_MANAGER_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/SString.h"
+#include "ace/Hash_Map_Manager.h"
+#include "Task_Callback.h"
+#include "Periodic_Supplier.h"
+#include "Periodic_Consumer.h"
+#include "Activation_ManagerS.h"
+
+class ACE_Barrier;
+
+/**
+ * @class TAO_NS_Activation_Manager
+ *
+ * @brief Class to handle Suppliers and Consumers.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Activation_Manager : public TAO_NS_Task_Callback
+ , public POA_Notify_Test::Activation_Manager
+{
+ typedef ACE_Hash_Map_Manager<ACE_CString, TAO_NS_Periodic_Supplier*, ACE_SYNCH_NULL_MUTEX> TAO_NS_PeriodicSupplier_Map;
+ typedef ACE_Hash_Map_Manager<ACE_CString, TAO_NS_Periodic_Consumer*, ACE_SYNCH_NULL_MUTEX> TAO_NS_PeriodicConsumer_Map;
+ typedef ACE_Hash_Map_Iterator<ACE_CString, TAO_NS_Periodic_Supplier*, ACE_SYNCH_NULL_MUTEX> TAO_NS_PeriodicSupplier_Iterator;
+ typedef ACE_Hash_Map_Iterator<ACE_CString, TAO_NS_Periodic_Consumer*, ACE_SYNCH_NULL_MUTEX> TAO_NS_PeriodicConsumer_Iterator;
+ typedef ACE_Hash_Map_Entry<ACE_CString, TAO_NS_Periodic_Supplier*> TAO_NS_PeriodicSupplier_Entry;
+ typedef ACE_Hash_Map_Entry<ACE_CString, TAO_NS_Periodic_Consumer*> TAO_NS_PeriodicConsumer_Entry;
+
+public:
+ /// Constuctor
+ TAO_NS_Activation_Manager (void);
+
+ /// Destructor
+ virtual ~TAO_NS_Activation_Manager ();
+
+ /// Interface impl.
+ virtual void start (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ /// Register Supplier
+ void _register (TAO_NS_Periodic_Supplier* supplier, const char* obj_name ACE_ENV_ARG_DECL);
+ /// Register Consumer
+ void _register (TAO_NS_Periodic_Consumer* consumer, const char* obj_name ACE_ENV_ARG_DECL);
+
+ /// Resolve Supplier
+ void resolve (TAO_NS_Periodic_Supplier*& supplier, const char* obj_name ACE_ENV_ARG_DECL);
+
+ /// Resolve Consumer
+ void resolve (TAO_NS_Periodic_Consumer*& consumer, const char* obj_name ACE_ENV_ARG_DECL);
+
+ // Activate the tasks for each supplier.
+ int activate_suppliers (void);
+
+ // Supplier Count
+ int supplier_count (void);
+
+ // Consumer Count
+ int consumer_count (void);
+
+ /// Wait till active suppliers and consumers are done.
+ void wait_for_completion (void);
+
+ /// TAO_NS_Task_Callback methods
+ virtual void done (TAO_NS_Periodic_Supplier* supplier);
+ virtual void done (TAO_NS_Periodic_Consumer* consumer);
+
+ // Dump stats gathered during exec..
+ void dump_stats (void);
+
+ // Returns 0 if the file could be opened for write.
+ int ior_output_file (const ACE_TCHAR *file_name);
+
+ // Returns 1 if the file could be opened for read.
+ int ior_input_file (const ACE_TCHAR *file_name);
+
+ void write_ior (ACE_ENV_SINGLE_ARG_DECL);
+ void wait_for_start_signal (ACE_ENV_SINGLE_ARG_DECL);
+ void signal_peer (ACE_ENV_SINGLE_ARG_DECL);
+
+protected:
+ /// Lock to serialize internal state.
+ TAO_SYNCH_MUTEX lock_;
+
+ /// The barrier to synch all supplier on so that everyone starts at the same instance.
+ ACE_Barrier* barrier_;
+
+ /// Number of Active suppliers (still running a ACE_Task and sending events)
+ int active_suppliers_;
+
+ /// Number of Active consumers (still receiving events)
+ int active_consumers_;
+
+ // Condition that all active suppliers and consumers are done.
+ ACE_Condition_Thread_Mutex active_done_;
+
+ // Map that stores suppliers.
+ TAO_NS_PeriodicSupplier_Map supplier_map_;
+
+ // Map that stores consumers.
+ TAO_NS_PeriodicConsumer_Map consumer_map_;
+
+ /// The file for output
+ FILE *ior_output_file_;
+
+ /// The file for input
+ ACE_CString ior_input_file_;
+
+ /// Set when the start method is called.
+ CORBA::Boolean started_;
+
+ // Condition that the start method has been called.
+ ACE_Condition_Thread_Mutex started_condition_;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_ACTIVATION_MANAGER_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.idl b/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.idl
new file mode 100644
index 00000000000..21c7b985ab4
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.idl
@@ -0,0 +1,32 @@
+/**
+ * @file Activation_Manager.idl
+ *
+ * @brief
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ */
+
+#ifndef _NOTIFY_TEST_IDL_
+#define _NOTIFY_TEST_IDL_
+
+#pragma prefix ""
+
+/**
+ * @namespace Activation_Manager
+ *
+ * @brief Notify Test
+ */
+module Notify_Test
+{
+ interface Activation_Manager
+ {
+ /*
+ * Prompts the Activation Manager to start.
+ */
+ void start ();
+ };
+};
+
+#endif /* _NOTIFY_TEST_IDL_ */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Application_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/Application_Command.cpp
new file mode 100644
index 00000000000..3fcba7cb41f
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Application_Command.cpp
@@ -0,0 +1,208 @@
+// $Id$
+
+#include "Application_Command.h"
+
+ACE_RCSID(lib, TAO_Application_Command, "$id$")
+
+#include "tao/PortableServer/PortableServer.h"
+#include "LookupManager.h"
+#include "Name.h"
+#include "Activation_Manager.h"
+#include "Driver_Base.h"
+#include "Priority_Mapping.h"
+
+TAO_NS_Application_Command::TAO_NS_Application_Command (void)
+{
+}
+
+TAO_NS_Application_Command::~TAO_NS_Application_Command ()
+{
+}
+
+const char*
+TAO_NS_Application_Command::get_name (void)
+{
+ return TAO_NS_Application_Command::name ();
+}
+
+const char*
+TAO_NS_Application_Command::name (void)
+{
+ return TAO_NS_Name::application_command;
+}
+
+void
+TAO_NS_Application_Command::init (ACE_Arg_Shifter& arg_shifter)
+{
+ if (arg_shifter.is_anything_left ())
+ {
+ /// -Init | Run | Shutdown
+ if (arg_shifter.cur_arg_strncasecmp ("-Init") == 0)
+ {
+ this->command_ = INIT;
+
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Run") == 0)
+ {
+ this->command_ = RUN;
+
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-WaitForEvents") == 0)
+ {
+ this->command_ = WAIT_FOR_EVENTS;
+
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Shutdown") == 0)
+ {
+ this->command_ = SHUTDOWN;
+
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-DumpStats") == 0)
+ {
+ this->command_ = DUMP_STATE;
+
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-SignalPeer") == 0)
+ {
+ this->command_ = SIGNAL_PEER;
+
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-WaitToStart") == 0)
+ {
+ this->command_ = WAIT_TO_START;
+
+ arg_shifter.consume_arg ();
+ }
+
+ }
+}
+
+void
+TAO_NS_Application_Command::handle_init (ACE_ENV_SINGLE_ARG_DECL)
+{
+ /// Fetch the root poa.
+ PortableServer::POA_var root_poa;
+ LOOKUP_MANAGER->resolve (root_poa);
+ ACE_CHECK;
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ /// Activate the root POA.
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+
+ TAO_NS_Priority_Mapping* mapping = new TAO_NS_Priority_Mapping ();
+
+ LOOKUP_MANAGER->_register (mapping);
+}
+
+void
+TAO_NS_Application_Command::handle_wait_for_completion (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ ACE_DEBUG ((LM_DEBUG, "(%P, %t) Waiting for suppliers and consumers to finish...\n"));
+
+ TAO_NS_Activation_Manager* act_mgr = 0;
+ LOOKUP_MANAGER->resolve (act_mgr);
+
+ act_mgr->wait_for_completion ();
+}
+
+void
+TAO_NS_Application_Command::handle_shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ ACE_DEBUG ((LM_DEBUG, "(%P, %t)Shutting down the Application...\n"));
+
+ TAO_NS_Driver_Base* driver = 0;
+ LOOKUP_MANAGER->resolve (driver);
+
+ driver->shutdown ();
+
+}
+
+void
+TAO_NS_Application_Command::handle_dump_stats (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ ACE_DEBUG ((LM_DEBUG, "(%P, %t)Dumpimg stats...\n"));
+
+ TAO_NS_Activation_Manager* act_mgr = 0;
+ LOOKUP_MANAGER->resolve (act_mgr);
+
+ act_mgr->dump_stats ();
+}
+
+void
+TAO_NS_Application_Command::handle_run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ // Run the Consumers
+
+
+ //= Run the Suppliers
+ TAO_NS_Activation_Manager* act_mgr = 0;
+ LOOKUP_MANAGER->resolve (act_mgr);
+
+ if (act_mgr->activate_suppliers () == 0)
+ ACE_DEBUG ((LM_DEBUG, "Suppliers activated...\n"));
+ else
+ ACE_DEBUG ((LM_DEBUG, "Suppliers activation failed!...\n"));
+}
+
+void
+TAO_NS_Application_Command::handle_signal_peer (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Activation_Manager* act_mgr = 0;
+ LOOKUP_MANAGER->resolve (act_mgr);
+
+ act_mgr->signal_peer (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+void
+TAO_NS_Application_Command::handle_wait_to_start (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Activation_Manager* act_mgr = 0;
+ LOOKUP_MANAGER->resolve (act_mgr);
+
+ act_mgr->write_ior (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ act_mgr->wait_for_start_signal (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+void
+TAO_NS_Application_Command::execute_i (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->command_ == INIT)
+ {
+ this->handle_init (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == RUN)
+ {
+ this->handle_run (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == WAIT_FOR_EVENTS)
+ {
+ this->handle_wait_for_completion (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == SHUTDOWN)
+ {
+ this->handle_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DUMP_STATE)
+ {
+ this->handle_dump_stats (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == SIGNAL_PEER)
+ {
+ this->handle_signal_peer (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == WAIT_TO_START)
+ {
+ this->handle_wait_to_start (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Application_Command.h b/TAO/orbsvcs/tests/Notify/lib/Application_Command.h
new file mode 100644
index 00000000000..d2edbe5ce07
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Application_Command.h
@@ -0,0 +1,75 @@
+/* -*- C++ -*- */
+/**
+ * @file Application_Command.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_APPLICATION_COMMAND_H
+#define TAO_NS_APPLICATION_COMMAND_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/ORB.h"
+#include "Command.h"
+
+class TAO_NS_Application_Command;
+
+/**
+ * @class TAO_NS_Application_Command
+ *
+ * @brief Command to control the Application.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Application_Command : public TAO_NS_Command
+{
+public:
+ /// Constuctor
+ TAO_NS_Application_Command (void);
+
+ /// Destructor
+ ~TAO_NS_Application_Command ();
+
+ /// Parse args and populate options.
+ virtual void init (ACE_Arg_Shifter& arg_shifter);
+
+ /// Execute the command.
+ virtual void execute_i (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Get the command name.
+ virtual const char* get_name (void);
+ static const char* name (void);
+
+protected:
+ enum COMMAND
+ {
+ INIT,
+ RUN,
+ WAIT_FOR_EVENTS,
+ SHUTDOWN,
+ DUMP_STATE,
+ SIGNAL_PEER,
+ WAIT_TO_START
+ };
+
+ ///= Handlers
+ virtual void handle_init (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_run (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_wait_for_completion (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_shutdown (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_dump_stats (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_signal_peer (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_wait_to_start (ACE_ENV_SINGLE_ARG_DECL);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_APPLICATION_COMMAND_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Command.cpp b/TAO/orbsvcs/tests/Notify/lib/Command.cpp
new file mode 100644
index 00000000000..b14d86d5774
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Command.cpp
@@ -0,0 +1,57 @@
+// $Id$
+
+#include "Command.h"
+
+#include "ace/Log_Msg.h"
+#include "tao/corba.h"
+
+ACE_RCSID(lib, TAO_Command, "$id$")
+
+TAO_NS_Command::TAO_NS_Command (void)
+ :next_ (0), command_ (INVALID)
+{
+}
+
+TAO_NS_Command::~TAO_NS_Command ()
+{
+}
+
+void
+TAO_NS_Command::init (ACE_Arg_Shifter& /*arg_shifter*/)
+{
+ // default: do nothing.
+}
+
+void
+TAO_NS_Command::next (TAO_NS_Command* command)
+{
+ this->next_ = command;
+}
+
+void
+TAO_NS_Command::execute (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->command_ == INVALID)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Invalid command: %s\n", this->get_name ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Executing command: %s\n", this->get_name ()));
+
+ ACE_TRY
+ {
+ this->execute_i (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ ACE_LIB_TEXT("Exception running command\n"));
+ }
+ ACE_ENDTRY;
+ }
+
+ if (this->next_)
+ this->next_->execute (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Command.h b/TAO/orbsvcs/tests/Notify/lib/Command.h
new file mode 100644
index 00000000000..559aabc9a43
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Command.h
@@ -0,0 +1,71 @@
+/* -*- C++ -*- */
+/**
+ * @file Command.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_COMMAND_H
+#define TAO_NS_COMMAND_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/Arg_Shifter.h"
+#include "tao/corba.h"
+#include "ace/CORBA_macros.h"
+
+/**
+ * @class TAO_NS_Command
+ *
+ * @brief Base Class for all command objects.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Command
+{
+ friend class TAO_NS_Command_Builder;
+public:
+ /// Constuctor
+ TAO_NS_Command (void);
+
+ /// Destructor
+ virtual ~TAO_NS_Command ();
+
+ /// Parse args and populate options.
+ virtual void init (ACE_Arg_Shifter& arg_shifter);
+
+ /// Implement command execution.
+ virtual void execute_i (ACE_ENV_SINGLE_ARG_DECL) = 0;
+
+ /// Return the name of this command.
+ virtual const char* get_name (void)= 0;
+
+ ///= Each derived type must also implement the following signature:
+ // static const char* name (void);
+
+protected:
+ /// Next command after this one.
+ TAO_NS_Command* next_;
+
+ enum {INVALID = -1};
+
+ int command_;
+
+private:
+ /// Execute the command.
+ void execute (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Save the next command to exec.
+ void next (TAO_NS_Command* command);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_COMMAND_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Command_Builder.cpp b/TAO/orbsvcs/tests/Notify/lib/Command_Builder.cpp
new file mode 100644
index 00000000000..73330daa94b
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Command_Builder.cpp
@@ -0,0 +1,108 @@
+// $Id$
+
+#include "Command_Builder.h"
+#include "ace/Arg_Shifter.h"
+#include "ace/Get_Opt.h"
+#include "Command.h"
+#include "Command_Factory.h"
+#include "Name.h"
+
+ACE_RCSID(lib, TAO_Command_Builder, "$id$")
+
+TAO_NS_Command_Builder::TAO_NS_Command_Builder (void)
+ :start_command_ (0)
+{
+}
+
+TAO_NS_Command_Builder::~TAO_NS_Command_Builder ()
+{
+}
+
+int
+TAO_NS_Command_Builder::init (int argc, char *argv[])
+{
+ ACE_Arg_Shifter arg_shifter (argc, argv);
+
+ ACE_CString current_arg;
+ TAO_NS_Command_Factory* factory = 0;
+
+ if (arg_shifter.is_anything_left ())
+ {
+ current_arg = arg_shifter.get_current ();
+
+ arg_shifter.consume_arg ();
+
+ // obtain the factory
+ if (this->factory_map_.find (current_arg, factory) == -1)
+ ACE_DEBUG ((LM_DEBUG, "NS Command: %s not recognized!\n", current_arg.c_str ()));
+ else
+ {
+ TAO_NS_Command* new_command = factory->create ();
+
+ new_command->init (arg_shifter);
+
+ if (this->start_command_ == 0)
+ {
+ this->start_command_ = new_command;
+ this->last_command_ = new_command;
+ }
+ else
+ {
+ // linked list
+ this->last_command_->next (new_command);
+ this->last_command_ = new_command;
+ }
+ }
+ }
+
+ return 0;
+}
+
+int
+TAO_NS_Command_Builder::fini (void)
+{
+ return 0;
+}
+
+void
+TAO_NS_Command_Builder::_register (ACE_CString command_factory_name, TAO_NS_Command_Factory* command_factory)
+{
+ if (this->factory_map_.bind (command_factory_name, command_factory) == -1)
+ ACE_DEBUG ((LM_DEBUG, "Failed to register command factory for %s\n", command_factory_name.c_str ()));
+ else
+ ACE_DEBUG ((LM_DEBUG, "Registered command factory for %s\n", command_factory_name.c_str ()));
+}
+
+void
+TAO_NS_Command_Builder::execute (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->start_command_)
+ this->start_command_->execute (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+ACE_STATIC_SVC_DEFINE(TAO_NS_Command_Builder,
+ TAO_NS_Name::command_builder,
+ ACE_SVC_OBJ_T,
+ &ACE_SVC_NAME (TAO_NS_Command_Builder),
+ ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
+ 0)
+
+ACE_FACTORY_DEFINE (TAO_NOTIFY_TEST, TAO_NS_Command_Builder)
+
+ACE_STATIC_SVC_REQUIRE (TAO_NS_Command_Builder)
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class ACE_Hash_Map_Manager <ACE_CString, TAO_NS_Command_Factory*, TAO_SYNCH_MUTEX>;
+template class ACE_Hash_Map_Manager_Ex<ACE_CString, TAO_NS_Command_Factory *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, TAO_SYNCH_MUTEX>;
+template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, TAO_NS_Command_Factory *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, TAO_SYNCH_MUTEX>;
+template class ACE_Hash_Map_Entry<ACE_CString, TAO_NS_Command_Factory *>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate ACE_Hash_Map_Manager <ACE_CString, TAO_NS_Command_Factory*, TAO_SYNCH_MUTEX>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, TAO_NS_Command_Factory *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, TAO_SYNCH_MUTEX>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, TAO_NS_Command_Factory *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, TAO_SYNCH_MUTEX>
+#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, TAO_NS_Command_Factory *>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Command_Builder.h b/TAO/orbsvcs/tests/Notify/lib/Command_Builder.h
new file mode 100644
index 00000000000..f0c4ef66c86
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Command_Builder.h
@@ -0,0 +1,74 @@
+/* -*- C++ -*- */
+/**
+ * @file Command_Builder.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_COMMAND_BUILDER_H
+#define TAO_NS_COMMAND_BUILDER_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/Service_Config.h"
+#include "ace/Service_Object.h"
+#include "ace/Unbounded_Queue.h"
+#include "ace/SString.h"
+#include "ace/CORBA_macros.h"
+#include "ace/Hash_Map_Manager.h"
+#include "tao/ORB.h"
+
+class TAO_NS_Command_Factory;
+class TAO_NS_Command;
+
+/**
+ * @class TAO_NS_Command_Builder
+ *
+ * @brief Class for collating and serially executing command objects.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Command_Builder : public ACE_Service_Object
+{
+public:
+ /// Constuctor
+ TAO_NS_Command_Builder (void);
+
+ /// Destructor
+ ~TAO_NS_Command_Builder ();
+
+ /// = Service_Object virtual method overloads.
+ virtual int init (int argc, char *argv[]);
+ virtual int fini (void);
+
+ /// Register the factory against the name of the factory.
+ void _register (ACE_CString command_factory_name, TAO_NS_Command_Factory* command_factory);
+
+ /// Execute the <start_command_>.
+ void execute (ACE_ENV_SINGLE_ARG_DECL);
+
+protected:
+ /// The starting command. each command executes the next one when done.
+ TAO_NS_Command* start_command_;
+
+ /// Last command initialized.
+ TAO_NS_Command* last_command_;
+
+ /// The factory map.
+ ACE_Hash_Map_Manager <ACE_CString, TAO_NS_Command_Factory*, TAO_SYNCH_MUTEX> factory_map_;
+};
+
+ACE_STATIC_SVC_DECLARE_EXPORT (TAO_NOTIFY_TEST, TAO_NS_Command_Builder)
+
+ACE_FACTORY_DECLARE (TAO_NOTIFY_TEST, TAO_NS_Command_Builder)
+
+#include "ace/post.h"
+#endif /* TAO_NS_COMMAND_BUILDER_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Command_Factory.cpp b/TAO/orbsvcs/tests/Notify/lib/Command_Factory.cpp
new file mode 100644
index 00000000000..b103b37e78e
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Command_Factory.cpp
@@ -0,0 +1,14 @@
+// $Id$
+
+
+#include "Command_Factory.h"
+
+ACE_RCSID(lib, TAO_Command_Factory, "$id$")
+
+TAO_NS_Command_Factory::TAO_NS_Command_Factory (void)
+{
+}
+
+TAO_NS_Command_Factory::~TAO_NS_Command_Factory ()
+{
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Command_Factory.h b/TAO/orbsvcs/tests/Notify/lib/Command_Factory.h
new file mode 100644
index 00000000000..1646b0e2f21
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Command_Factory.h
@@ -0,0 +1,44 @@
+/* -*- C++ -*- */
+/**
+ * @file Command_Factory.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_COMMAND_FACTORY_H
+#define TAO_NS_COMMAND_FACTORY_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_NS_Command;
+
+/**
+ * @class TAO_NS_Command_Factory
+ *
+ * @brief Base class for Factory to create command objects.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Command_Factory
+{
+public:
+ /// Constuctor
+ TAO_NS_Command_Factory (void);
+
+ /// Destructor
+ virtual ~TAO_NS_Command_Factory ();
+
+ /// Create the command.
+ virtual TAO_NS_Command* create (void) = 0;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_COMMAND_FACTORY_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Command_Factory_T.cpp b/TAO/orbsvcs/tests/Notify/lib/Command_Factory_T.cpp
new file mode 100644
index 00000000000..ac27df4d2d5
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Command_Factory_T.cpp
@@ -0,0 +1,53 @@
+// $Id$
+
+#ifndef TAO_NS_COMMAND_FACTORY_T_CPP
+#define TAO_NS_COMMAND_FACTORY_T_CPP
+
+#include "Command_Factory_T.h"
+
+ACE_RCSID(Notify, TAO_Command_Factory_T, "$id$")
+
+#include "ace/Dynamic_Service.h"
+#include "tao/debug.h"
+#include "Command_Builder.h"
+#include "Name.h"
+
+template <class COMMAND>
+TAO_NS_Command_Factory_T<COMMAND>::TAO_NS_Command_Factory_T (void)
+{
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "Creating command factory for %s\n", COMMAND::name()));
+}
+
+template <class COMMAND>
+TAO_NS_Command_Factory_T<COMMAND>::~TAO_NS_Command_Factory_T ()
+{
+}
+
+template <class COMMAND> int
+TAO_NS_Command_Factory_T<COMMAND>::init (int /*argc*/, char/*argv*/ *[])
+{
+ /// register with Command builder
+ TAO_NS_Command_Builder* cmd_builder =
+ ACE_Dynamic_Service<TAO_NS_Command_Builder>::instance (TAO_NS_Name::command_builder);
+
+ if (cmd_builder)
+ cmd_builder->_register (COMMAND::name(), this);
+ else
+ ACE_DEBUG ((LM_DEBUG, "Could not register command builder %s\n", COMMAND::name()));
+ return 0;
+}
+
+template <class COMMAND> int
+TAO_NS_Command_Factory_T<COMMAND>::fini (void)
+{
+ return 0;
+}
+
+template <class COMMAND> TAO_NS_Command*
+TAO_NS_Command_Factory_T<COMMAND>::create (void)
+{
+ return new COMMAND ();
+}
+
+#endif /* TAO_NS_COMMAND_FACTORY_T_CPP */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Command_Factory_T.h b/TAO/orbsvcs/tests/Notify/lib/Command_Factory_T.h
new file mode 100644
index 00000000000..e879ed7078a
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Command_Factory_T.h
@@ -0,0 +1,61 @@
+/* -*- C++ -*- */
+/**
+ * @file Command_Factory_T.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_COMMAND_FACTORY_T_H
+#define TAO_COMMAND_FACTORY_T_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/Service_Config.h"
+#include "ace/Service_Object.h"
+#include "Command_Factory.h"
+
+class TAO_NS_Command;
+
+/**
+ * @class TAO_Command_Factory_T
+ *
+ * @brief Template class to create COMMAND specific factories.
+ *
+ */
+template <class COMMAND>
+class TAO_NOTIFY_TEST_Export TAO_NS_Command_Factory_T : public TAO_NS_Command_Factory, public ACE_Service_Object
+{
+public:
+ /// Constuctor
+ TAO_NS_Command_Factory_T (void);
+
+ /// Destructor
+ ~TAO_NS_Command_Factory_T ();
+
+ /// = Service_Object virtual method overloads.
+ virtual int init (int argc, char *argv[]);
+ virtual int fini (void);
+
+ /// Create the <COMMAND> command.
+ TAO_NS_Command* create (void);
+};
+
+#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
+#include "Command_Factory_T.cpp"
+#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
+
+#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
+#pragma implementation ("Command_Factory_T.cpp")
+#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
+
+#include "ace/post.h"
+#endif /* TAO_COMMAND_FACTORY_T_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/ConsumerAdmin_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/ConsumerAdmin_Command.cpp
new file mode 100644
index 00000000000..6777c70dfcd
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/ConsumerAdmin_Command.cpp
@@ -0,0 +1,176 @@
+// $Id$
+
+#include "ConsumerAdmin_Command.h"
+
+ACE_RCSID(lib, TAO_ConsumerAdmin_Command, "$id$")
+
+#include "LookupManager.h"
+#include "Name.h"
+#include "Options_Parser.h"
+
+TAO_NS_ConsumerAdmin_Command::TAO_NS_ConsumerAdmin_Command (void)
+ :ifgop_ (CosNotifyChannelAdmin::OR_OP), id_ (0)
+{
+}
+
+TAO_NS_ConsumerAdmin_Command::~TAO_NS_ConsumerAdmin_Command ()
+{
+}
+
+const char*
+TAO_NS_ConsumerAdmin_Command::get_name (void)
+{
+ return TAO_NS_ConsumerAdmin_Command::name ();
+}
+
+const char*
+TAO_NS_ConsumerAdmin_Command::name (void)
+{
+ return TAO_NS_Name::consumer_admin_command;
+}
+
+void
+TAO_NS_ConsumerAdmin_Command::handle_create (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::EventChannel_var ec;
+
+ LOOKUP_MANAGER->resolve (ec, this->factory_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // create consumer admin
+ CosNotifyChannelAdmin::ConsumerAdmin_var sa =
+ ec->new_for_consumers (this->ifgop_,
+ this->id_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ LOOKUP_MANAGER->_register (sa.in(), this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+
+void
+TAO_NS_ConsumerAdmin_Command::handle_subscriptions (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::ConsumerAdmin_var admin;
+
+ LOOKUP_MANAGER->resolve (admin, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Let the user see what we're subscribed for,
+ ACE_DEBUG ((LM_DEBUG, "Calling ConsumerAdmin subscription_change : "));
+
+ CORBA::ULong i = 0;
+
+ for (; i < added_.length (); ++i)
+ {
+ ACE_DEBUG ((LM_DEBUG, "+(%s,%s), ", added_[i].domain_name.in (), added_[i].type_name.in ()));
+ }
+ for (i = 0; i < removed_.length (); ++i)
+ {
+ ACE_DEBUG ((LM_DEBUG, "-(%s,%s), ", removed_[i].domain_name.in (), removed_[i].type_name.in ()));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n"));
+
+ admin->subscription_change (this->added_, this->removed_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_ConsumerAdmin_Command::handle_set_qos (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::ConsumerAdmin_var admin;
+
+ LOOKUP_MANAGER->resolve (admin, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ admin->set_qos (this->qos_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_ConsumerAdmin_Command::handle_status (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ //@@ TODO:
+}
+
+void
+TAO_NS_ConsumerAdmin_Command::init (ACE_Arg_Shifter& arg_shifter)
+{
+ if (arg_shifter.is_anything_left ())
+ {
+ /// -Create ca_name factory_name
+ if (arg_shifter.cur_arg_strncasecmp ("-Create") == 0)
+ {
+ this->command_ = CREATE;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ this->factory_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ if (arg_shifter.cur_arg_strncasecmp ("-AND_OP") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ this->ifgop_ = CosNotifyChannelAdmin::AND_OP;
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-OR_OP") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ this->ifgop_ = CosNotifyChannelAdmin::OR_OP;
+ }
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Subscription") == 0) // -Subscription admin_name +added_type1 +-added_type2 ... -added_type3 -added_type4..
+ {
+ this->command_ = SUBSCRIPTION;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser options_parser;
+ options_parser.execute (this->added_, this->removed_, arg_shifter);
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Set_QoS") == 0) // -Set_QoS ec_name [Qos Options]
+ {
+ this->command_ = SET_QOS;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser qos_parser;
+ qos_parser.execute (this->qos_, arg_shifter);
+ }
+ }
+}
+
+void
+TAO_NS_ConsumerAdmin_Command::execute_i (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->command_ == CREATE)
+ {
+ this->handle_create (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == SUBSCRIPTION)
+ {
+ this->handle_subscriptions (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == SET_QOS)
+ {
+ this->handle_set_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DUMP_STATE)
+ {
+ this->handle_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/ConsumerAdmin_Command.h b/TAO/orbsvcs/tests/Notify/lib/ConsumerAdmin_Command.h
new file mode 100644
index 00000000000..1a75c5a369b
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/ConsumerAdmin_Command.h
@@ -0,0 +1,86 @@
+/* -*- C++ -*- */
+/**
+ * @file ConsumerAdmin_Command.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_CONSUMERADMIN_COMMAND_H
+#define TAO_NS_CONSUMERADMIN_COMMAND_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/SString.h"
+#include "orbsvcs/CosNotifyChannelAdminC.h"
+#include "Command.h"
+
+/**
+ * @class TAO_NS_ConsumerAdmin_Command
+ *
+ * @brief Command for ConsumerAdmin objects.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_ConsumerAdmin_Command : public TAO_NS_Command
+{
+public:
+ /// Constuctor
+ TAO_NS_ConsumerAdmin_Command (void);
+
+ /// Destructor
+ ~TAO_NS_ConsumerAdmin_Command ();
+
+ /// Parse args and populate options.
+ virtual void init (ACE_Arg_Shifter& arg_shifter);
+
+ /// Execute the command.
+ virtual void execute_i (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Name of object
+ virtual const char* get_name (void);
+ static const char* name (void);
+
+protected:
+
+ /// = Data Members
+ enum COMMAND
+ {
+ CREATE,
+ DESTROY,
+ SET_QOS,
+ SET_ADMIN,
+ SUBSCRIPTION,
+ DUMP_STATE
+ };
+
+ ACE_CString name_;
+
+ ACE_CString factory_;
+
+ CosNotifyChannelAdmin::InterFilterGroupOperator ifgop_;
+
+ CosNotifyChannelAdmin::AdminID id_;
+
+ CosNotification::QoSProperties qos_;
+
+ // Subscription change
+ CosNotification::EventTypeSeq added_;
+ CosNotification::EventTypeSeq removed_;
+
+ /// = Handlers
+ void handle_create (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_subscriptions (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_status (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_set_qos (ACE_ENV_SINGLE_ARG_DECL);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_CONSUMERADMIN_COMMAND_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Driver.cpp b/TAO/orbsvcs/tests/Notify/lib/Driver.cpp
new file mode 100644
index 00000000000..e08050d5c65
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Driver.cpp
@@ -0,0 +1,212 @@
+// $Id$
+
+#include "Driver.h"
+
+ACE_RCSID(lib, TAO_Driver, "$id$")
+
+#include "ace/Dynamic_Service.h"
+#include "ace/Thread_Manager.h"
+#include "ace/Arg_Shifter.h"
+#include "ace/Argv_Type_Converter.h"
+#include "tao/ORB.h"
+#include "tao/ORB_Core.h"
+#include "ace/Sched_Params.h"
+#include "LookupManager.h"
+#include "Command_Builder.h"
+#include "Name.h"
+#include "Activation_Manager.h"
+
+/*****************************************************************/
+TAO_NS_Worker::TAO_NS_Worker (void)
+{
+}
+
+void
+TAO_NS_Worker::command_builder (TAO_NS_Command_Builder* cmd_builder)
+{
+ this->cmd_builder_ = cmd_builder;
+}
+
+int
+TAO_NS_Worker::svc (void)
+{
+ ACE_DEBUG ((LM_DEBUG, "Running Commands... \n"));
+
+ ACE_DECLARE_NEW_CORBA_ENV;
+
+ ACE_TRY
+ {
+ this->cmd_builder_->execute (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "ORB run error\n");
+ }
+ ACE_ENDTRY;
+
+
+ ACE_DEBUG ((LM_DEBUG, "Finished executing commands\n"));
+
+ return 0;
+}
+
+/*****************************************************************/
+
+TAO_NS_Driver::TAO_NS_Driver (void)
+ :cmd_builder_ (0), activation_manager_ (0), run_period_ (0,0)
+{
+ this->activation_manager_ = new TAO_NS_Activation_Manager ();
+ LOOKUP_MANAGER->_register (this->activation_manager_);
+
+ LOOKUP_MANAGER->_register (this);
+}
+
+TAO_NS_Driver::~TAO_NS_Driver ()
+{
+ delete this->activation_manager_;
+}
+
+int
+TAO_NS_Driver::parse_args (int argc, char *argv[])
+{
+ ACE_Arg_Shifter arg_shifter (argc, argv);
+
+ const ACE_TCHAR *current_arg = 0;
+
+ while (arg_shifter.is_anything_left ())
+ {
+ if ((current_arg = arg_shifter.get_the_parameter (ACE_LIB_TEXT("-Timeout")))) // -Timeout timeout_period_S
+ {
+ if (current_arg != 0)
+ {
+ this->run_period_ = ACE_Time_Value (ACE_OS::atoi (current_arg), 0);
+ }
+
+ arg_shifter.consume_arg ();
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter (ACE_LIB_TEXT("-IORoutput")))) // -IORoutput file_name
+ {
+ if (this->activation_manager_->ior_output_file (current_arg) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to open %s for writing: %p\n",
+ current_arg), -1);
+
+ arg_shifter.consume_arg ();
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter (ACE_LIB_TEXT("-IORinput")))) // -IORinput file_name
+ {
+ if (this->activation_manager_->ior_input_file (current_arg) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to open %s for reading: %p\n",
+ current_arg), -1);
+
+ arg_shifter.consume_arg ();
+ }
+ else
+ {
+ arg_shifter.ignore_arg ();
+ }
+ }
+
+ return 0;
+}
+
+int
+TAO_NS_Driver::init (int argc, ACE_TCHAR *argv[] ACE_ENV_ARG_DECL)
+{
+ ACE_Argv_Type_Converter command_line(argc, argv);
+
+ this->orb_ = CORBA::ORB_init (command_line.get_argc(),
+ command_line.get_ASCII_argv(),
+ ""
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ if (this->parse_args (argc, argv) == -1)
+ return -1;
+
+ LOOKUP_MANAGER->init (this->orb_.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ this->cmd_builder_ =
+ ACE_Dynamic_Service<TAO_NS_Command_Builder>::instance (TAO_NS_Name::command_builder);
+
+ worker_.command_builder (this->cmd_builder_);
+
+ return 0;
+}
+
+void
+TAO_NS_Driver::run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ long flags = THR_NEW_LWP | THR_JOINABLE;
+
+ flags |=
+ this->orb_->orb_core ()->orb_params ()->sched_policy () |
+ this->orb_->orb_core ()->orb_params ()->scope_policy ();
+
+ ACE_Sched_Params::Policy sched_policy;
+
+ long thr_sched_policy = this->orb_->orb_core ()->orb_params ()->sched_policy ();
+
+ //long thr_scope_policy = this->orb_->orb_core ()->orb_params ()->scope_policy ();
+
+ if (thr_sched_policy == THR_SCHED_FIFO)
+ {
+ sched_policy = ACE_SCHED_FIFO;
+ }
+ else if (thr_sched_policy == THR_SCHED_RR)
+ {
+ sched_policy = ACE_SCHED_RR;
+ }
+ else
+ {
+ sched_policy = ACE_SCHED_OTHER;
+ }
+
+ /// Check sched.
+ int min_priority = ACE_Sched_Params::priority_min (sched_policy);
+
+ // Become an active object.
+ if (this->worker_.activate (flags,
+ 1,
+ 0,
+ min_priority) == -1) //ACE_DEFAULT_THREAD_PRIORITY) == -1)
+ {
+ if (ACE_OS::last_error () == EPERM)
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Insufficient privilege to activate ACE_Task.\n")));
+ else
+ ACE_DEBUG ((LM_ERROR,
+ ACE_TEXT ("(%t) Task activation at priority %d failed, ")
+ ACE_TEXT ("exiting!\n%a"),
+ ACE_DEFAULT_THREAD_PRIORITY,
+ -1));
+ }
+
+ ACE_DEBUG ((LM_ERROR, "Activated Worker Thread for commands at priority %d\n", min_priority));
+
+ ACE_DEBUG ((LM_ERROR, "Running ORB, timeout in %d sec\n", this->run_period_.sec ()));
+
+ if (this->run_period_ == ACE_Time_Value::zero)
+ this->orb_->run (0);
+ else
+ this->orb_->run (this->run_period_);
+}
+
+void
+TAO_NS_Driver::shutdown (void)
+{
+ this->orb_->shutdown ();
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class ACE_Dynamic_Service<TAO_NS_Command_Builder>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate ACE_Dynamic_Service<TAO_NS_Command_Builder>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Driver.h b/TAO/orbsvcs/tests/Notify/lib/Driver.h
new file mode 100644
index 00000000000..b072303d173
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Driver.h
@@ -0,0 +1,112 @@
+/* -*- C++ -*- */
+/**
+ * @file Driver.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_DRIVER_H
+#define TAO_NS_DRIVER_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/Service_Config.h"
+#include "ace/Task.h"
+#include "tao/corba.h"
+#include "Driver_Base.h"
+
+class TAO_NS_Command_Builder;
+class TAO_NS_Activation_Manager;
+
+/**
+ * @class TAO_NS_Worker
+ *
+ * @brief A Task to execute commands asynchronously.
+ *
+ */
+class TAO_NS_Worker : public ACE_Task_Base
+{
+ // = TITLE
+ // Run a server thread
+ //
+ // = DESCRIPTION
+ // Use the ACE_Task_Base class to run server threads
+ //
+public:
+ TAO_NS_Worker (void);
+ // ctor
+
+ /// Set the command builder.
+ void command_builder (TAO_NS_Command_Builder* cmd_builder);
+
+ virtual int svc (void);
+ // The thread entry point.
+
+ void shutdown (void);
+
+private:
+ /// The command builder
+ TAO_NS_Command_Builder* cmd_builder_;
+};
+
+/**
+ * @class TAO_NS_Driver
+ *
+ * @brief A default Application Starter.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Driver : public TAO_NS_Driver_Base
+{
+public:
+ /// Constuctor
+ TAO_NS_Driver (void);
+
+ /// Destructor
+ ~TAO_NS_Driver ();
+
+ /// Init
+ int init (int argc, ACE_TCHAR *argv[] ACE_ENV_ARG_DECL);
+
+ /// Execute the commands.
+ void run (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Shutdown
+ virtual void shutdown (void);
+
+protected:
+ /// Parse command line parameters.
+ int parse_args (int argc, char *argv[]);
+
+ /// The command builder
+ TAO_NS_Command_Builder* cmd_builder_;
+
+ /// Manage activation of periodic suppliers and consumers.
+ TAO_NS_Activation_Manager* activation_manager_;
+
+ /// Thread in which to run commands.
+ TAO_NS_Worker worker_;
+
+ /// The ORB we run.
+ CORBA::ORB_var orb_;
+
+ /// ORB Run Period.
+ ACE_Time_Value run_period_;
+
+ /// The file for output
+ ACE_CString ior_output_file_;
+
+ /// The file for input
+ ACE_CString ior_input_file_;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_DRIVER_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Driver_Base.h b/TAO/orbsvcs/tests/Notify/lib/Driver_Base.h
new file mode 100644
index 00000000000..b49d95a7056
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Driver_Base.h
@@ -0,0 +1,38 @@
+/* -*- C++ -*- */
+/**
+ * @file Driver_Base.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_APPLICATION_STARTER_H
+#define TAO_NS_APPLICATION_STARTER_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+/**
+ * @class TAO_NS_Driver_Base
+ *
+ * @brief Base class for Driver.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Driver_Base
+{
+public:
+ virtual ~TAO_NS_Driver_Base () {};
+
+ /// Shutdown
+ virtual void shutdown (void) = 0;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_APPLICATION_STARTER_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.cpp
new file mode 100644
index 00000000000..c5060d38b42
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.cpp
@@ -0,0 +1,147 @@
+// $Id$
+
+#include "EventChannel_Command.h"
+#include "ace/Log_Msg.h"
+
+ACE_RCSID(lib, TAO_EventChannel_Command, "$id$")
+
+#include "LookupManager.h"
+#include "Name.h"
+#include "Options_Parser.h"
+
+TAO_NS_EventChannel_Command::TAO_NS_EventChannel_Command (void)
+{
+}
+
+TAO_NS_EventChannel_Command::~TAO_NS_EventChannel_Command ()
+{
+}
+
+const char*
+TAO_NS_EventChannel_Command::get_name (void)
+{
+ return TAO_NS_EventChannel_Command::name ();
+}
+
+const char*
+TAO_NS_EventChannel_Command::name (void)
+{
+ return TAO_NS_Name::event_channel_command;
+}
+
+void
+TAO_NS_EventChannel_Command::init (ACE_Arg_Shifter& arg_shifter)
+{
+ if (arg_shifter.is_anything_left ())
+ {
+ if (arg_shifter.cur_arg_strncasecmp ("-Create") == 0) // -Create ec_name factory_name
+ {
+ this->command_ = CREATE;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ this->factory_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Destroy") == 0) // -Destroy ec_name
+ {
+ this->command_ = DESTROY;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Set_QoS") == 0) // -Set_QoS ec_name [Qos Options]
+ {
+ this->command_ = SET_QOS;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser qos_parser;
+ qos_parser.execute (this->qos_, arg_shifter);
+ }
+ }
+}
+
+void
+TAO_NS_EventChannel_Command::handle_create (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::EventChannelFactory_var ec_factory;
+
+ LOOKUP_MANAGER->resolve (ec_factory , TAO_NS_Name::event_channel_factory ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CosNotification::QoSProperties qos;
+ CosNotification::AdminProperties admin;
+
+ // create an event channel
+ CosNotifyChannelAdmin::EventChannel_var ec =
+ ec_factory->create_channel (qos,
+ admin,
+ this->id_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ LOOKUP_MANAGER->_register (ec.in(), this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_EventChannel_Command::handle_destroy (ACE_ENV_SINGLE_ARG_DECL)
+{
+ ACE_DEBUG ((LM_DEBUG, "Destroying event channel %s\n", this->name_.c_str ()));
+ CosNotifyChannelAdmin::EventChannel_var ec;
+
+ LOOKUP_MANAGER->resolve (ec, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ec->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+void
+TAO_NS_EventChannel_Command::handle_set_qos (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::EventChannel_var ec;
+
+ LOOKUP_MANAGER->resolve (ec, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ec->set_qos (this->qos_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_EventChannel_Command::handle_status (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ //@@ TODO: Implement
+}
+
+void
+TAO_NS_EventChannel_Command::execute_i (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->command_ == CREATE)
+ {
+ this->handle_create (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DESTROY)
+ {
+ this->handle_destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == SET_QOS)
+ {
+ this->handle_set_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DUMP_STATE)
+ {
+ this->handle_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.h b/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.h
new file mode 100644
index 00000000000..8fd304c7fe1
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.h
@@ -0,0 +1,81 @@
+/* -*- C++ -*- */
+/**
+ * @file EventChannel_Command.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_EVENTCHANNEL_COMMAND_H
+#define TAO_NS_EVENTCHANNEL_COMMAND_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/SString.h"
+#include "orbsvcs/CosNotifyChannelAdminC.h"
+#include "Command.h"
+
+/**
+ * @class TAO_NS_EventChannel_Command
+ *
+ * @brief Command object for event channels.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_EventChannel_Command : public TAO_NS_Command
+{
+public:
+ /// Constuctor
+ TAO_NS_EventChannel_Command (void);
+
+ /// Destructor
+ virtual ~TAO_NS_EventChannel_Command ();
+
+ /// Parse args and populate options.
+ virtual void init (ACE_Arg_Shifter& arg_shifter);
+
+ /// Execute the command.
+ virtual void execute_i (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Name of object
+ virtual const char* get_name (void);
+ static const char* name (void);
+
+protected:
+ ///= Data Members
+
+ enum COMMAND
+ {
+ CREATE,
+ DESTROY,
+ SET_QOS,
+ SET_ADMIN,
+ DUMP_STATE
+ };
+
+ ACE_CString name_;
+
+ ACE_CString factory_;
+
+ CosNotifyChannelAdmin::ChannelID id_;
+
+ CosNotification::QoSProperties qos_;
+
+ CosNotification::AdminProperties admin_;
+
+ /// = Handlers
+ void handle_create (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_destroy (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_set_qos (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_status (ACE_ENV_SINGLE_ARG_DECL);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_EVENTCHANNEL_COMMAND_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Factories_Define.cpp b/TAO/orbsvcs/tests/Notify/lib/Factories_Define.cpp
new file mode 100644
index 00000000000..bf52540e24a
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Factories_Define.cpp
@@ -0,0 +1,45 @@
+// $Id$
+#include "Factories_Define.h"
+
+ACE_RCSID(lib, TAO_NS_Factories_Define, "$id$")
+
+#include "Name.h"
+#include "Command_Factory_T.h"
+
+#include "EventChannel_Command.h"
+#include "Application_Command.h"
+#include "SupplierAdmin_Command.h"
+#include "ConsumerAdmin_Command.h"
+#include "Periodic_Supplier_Command.h"
+#include "Periodic_Consumer_Command.h"
+#include "Filter_Command.h"
+
+TAO_NS_COMMAND_FACTORY_DEFINE(TAO_NOTIFY_TEST,TAO_NS_EventChannel_Command,TAO_NS_Name::event_channel_command_factory);
+TAO_NS_COMMAND_FACTORY_DEFINE(TAO_NOTIFY_TEST,TAO_NS_Application_Command,TAO_NS_Name::application_command_factory);
+TAO_NS_COMMAND_FACTORY_DEFINE(TAO_NOTIFY_TEST,TAO_NS_SupplierAdmin_Command,TAO_NS_Name::supplier_admin_command_factory);
+TAO_NS_COMMAND_FACTORY_DEFINE(TAO_NOTIFY_TEST,TAO_NS_ConsumerAdmin_Command,TAO_NS_Name::consumer_admin_command_factory);
+TAO_NS_COMMAND_FACTORY_DEFINE(TAO_NOTIFY_TEST,TAO_NS_Periodic_Supplier_Command,TAO_NS_Name::periodic_supplier_command_factory);
+TAO_NS_COMMAND_FACTORY_DEFINE(TAO_NOTIFY_TEST,TAO_NS_Periodic_Consumer_Command,TAO_NS_Name::periodic_consumer_command_factory);
+TAO_NS_COMMAND_FACTORY_DEFINE(TAO_NOTIFY_TEST,TAO_NS_Filter_Command,TAO_NS_Name::filter_command_factory);
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class TAO_NS_Command_Factory_T<TAO_NS_EventChannel_Command>;
+template class TAO_NS_Command_Factory_T<TAO_NS_Application_Command>;
+template class TAO_NS_Command_Factory_T<TAO_NS_SupplierAdmin_Command>;
+template class TAO_NS_Command_Factory_T<TAO_NS_ConsumerAdmin_Command>;
+template class TAO_NS_Command_Factory_T<TAO_NS_Periodic_Supplier_Command>;
+template class TAO_NS_Command_Factory_T<TAO_NS_Periodic_Consumer_Command>;
+template class TAO_NS_Command_Factory_T<TAO_NS_Filter_Command>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate TAO_NS_Command_Factory_T<TAO_NS_EventChannel_Command>
+#pragma instantiate TAO_NS_Command_Factory_T<TAO_NS_Application_Command>
+#pragma instantiate TAO_NS_Command_Factory_T<TAO_NS_SupplierAdmin_Command>
+#pragma instantiate TAO_NS_Command_Factory_T<TAO_NS_ConsumerAdmin_Command>
+#pragma instantiate TAO_NS_Command_Factory_T<TAO_NS_Periodic_Supplier_Command>
+#pragma instantiate TAO_NS_Command_Factory_T<TAO_NS_Periodic_Consumer_Command>
+#pragma instantiate TAO_NS_Command_Factory_T<TAO_NS_Filter_Command>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Factories_Define.h b/TAO/orbsvcs/tests/Notify/lib/Factories_Define.h
new file mode 100644
index 00000000000..beb9a446c68
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Factories_Define.h
@@ -0,0 +1,38 @@
+/* -*- C++ -*- */
+/**
+ * @file Factories_Define.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_FACTORIES_DEFINE_H
+#define TAO_FACTORIES_DEFINE_H
+#include "ace/pre.h"
+
+#include "Command_Factory_T.h"
+
+#define TAO_NS_COMMAND_FACTORY_DEFINE(export, command, factory_name) \
+\
+typedef TAO_NS_Command_Factory_T <command> command##_Factory;\
+\
+ACE_STATIC_SVC_DECLARE_EXPORT (export, command##_Factory) \
+\
+ACE_FACTORY_DECLARE (export, command##_Factory) \
+\
+ACE_STATIC_SVC_DEFINE(command##_Factory, \
+ factory_name, \
+ ACE_SVC_OBJ_T, \
+ &ACE_SVC_NAME (command##_Factory), \
+ ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, \
+ 0) \
+\
+ACE_FACTORY_DEFINE (export, command##_Factory) \
+\
+
+
+#include "ace/post.h"
+#endif /* TAO_FACTORIES_DEFINE_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Filter_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/Filter_Command.cpp
new file mode 100644
index 00000000000..e449e049440
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Filter_Command.cpp
@@ -0,0 +1,203 @@
+// $Id$
+
+#include "Filter_Command.h"
+#include "ace/Log_Msg.h"
+
+ACE_RCSID(lib, TAO_Filter_Command, "$id$")
+
+#include "LookupManager.h"
+#include "Name.h"
+
+TAO_NS_Filter_Command::TAO_NS_Filter_Command (void)
+{
+}
+
+TAO_NS_Filter_Command::~TAO_NS_Filter_Command ()
+{
+}
+
+const char*
+TAO_NS_Filter_Command::get_name (void)
+{
+ return TAO_NS_Filter_Command::name ();
+}
+
+const char*
+TAO_NS_Filter_Command::name (void)
+{
+ return TAO_NS_Name::filter_command;
+}
+
+void
+TAO_NS_Filter_Command::init (ACE_Arg_Shifter& arg_shifter)
+{
+ if (arg_shifter.is_anything_left ())
+ {
+ if (arg_shifter.cur_arg_strncasecmp ("-CreateFactory") == 0) // -Create factory_name ec
+ {
+ this->command_ = CREATE_FACTORY;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current (); // FF name
+ arg_shifter.consume_arg ();
+
+ this->factory_ = arg_shifter.get_current (); //EC
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-CreateFilter") == 0) // -CreateFilter filter_name filterfactory_name
+ {
+ this->command_ = CREATE_FILTER;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current (); // Filter name
+
+ arg_shifter.consume_arg ();
+
+ this->factory_ = arg_shifter.get_current (); //FF
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Add_Constraint") == 0) // -Add_Constraint filter_name constraint_expr
+ {
+ this->command_ = ADD_CONSTRAINT;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current (); // Filter name
+
+ arg_shifter.consume_arg ();
+
+ this->constraint_ = arg_shifter.get_current (); //Constraint
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Add_Filter") == 0) // -Add_Filter filter_name FilterAdmin_Name
+ {
+ this->command_ = ADD_FILTER;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current (); // Filter name
+
+ arg_shifter.consume_arg ();
+
+ this->factory_ = arg_shifter.get_current (); //FilterAdmin
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Destroy") == 0) // -Destroy filter_name
+ {
+ this->command_ = DESTROY;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current (); // filter
+
+ arg_shifter.consume_arg ();
+ }
+ }
+}
+
+void
+TAO_NS_Filter_Command::handle_create_filter_factory (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::EventChannel_var ec;
+
+ LOOKUP_MANAGER->resolve (ec, this->factory_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CosNotifyFilter::FilterFactory_var ff =
+ ec->default_filter_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ LOOKUP_MANAGER->_register (ff.in(), this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Filter_Command::handle_create_filter (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyFilter::FilterFactory_var ff;
+
+ LOOKUP_MANAGER->resolve (ff , this->factory_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CosNotifyFilter::Filter_var filter =
+ ff->create_filter ("ETCL" ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ LOOKUP_MANAGER->_register (filter.in(), this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Filter_Command::handle_add_constraint (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyFilter::Filter_var filter;
+
+ LOOKUP_MANAGER->resolve (filter , this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CosNotifyFilter::ConstraintExpSeq constraint_list (1);
+ constraint_list.length (1);
+
+ constraint_list[0].event_types.length (0);
+ constraint_list[0].constraint_expr = CORBA::string_dup (this->constraint_.c_str ());
+
+ ACE_DEBUG ((LM_DEBUG, "Adding constraint %s\n", this->constraint_.c_str ()));
+ filter->add_constraints (constraint_list ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Filter_Command::handle_add_filter (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyFilter::Filter_var filter;
+
+ LOOKUP_MANAGER->resolve (filter , this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CosNotifyFilter::FilterAdmin_var filter_admin;
+
+ LOOKUP_MANAGER->resolve (filter_admin , this->factory_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ filter_admin->add_filter (filter.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Filter_Command::handle_destroy_filter (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyFilter::Filter_var filter;
+
+ LOOKUP_MANAGER->resolve (filter, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ filter->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Filter_Command::execute_i (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->command_ == CREATE_FACTORY)
+ {
+ this->handle_create_filter_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == CREATE_FILTER)
+ {
+ this->handle_create_filter (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == ADD_CONSTRAINT)
+ {
+ this->handle_add_constraint (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == ADD_FILTER)
+ {
+ this->handle_add_filter (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DESTROY)
+ {
+ this->handle_destroy_filter (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Filter_Command.h b/TAO/orbsvcs/tests/Notify/lib/Filter_Command.h
new file mode 100644
index 00000000000..5c561bf7e01
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Filter_Command.h
@@ -0,0 +1,79 @@
+/* -*- C++ -*- */
+/**
+ * @file Filter_Command.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_FILTER_COMMAND_H
+#define TAO_NS_FILTER_COMMAND_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/SString.h"
+#include "orbsvcs/CosNotifyChannelAdminC.h"
+#include "Command.h"
+
+/**
+ * @class TAO_NS_Filter_Command
+ *
+ * @brief Command for Filter Objects.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Filter_Command : public TAO_NS_Command
+{
+public:
+ /// Constuctor
+ TAO_NS_Filter_Command (void);
+
+ /// Destructor
+ ~TAO_NS_Filter_Command ();
+
+ /// Parse args and populate options.
+ virtual void init (ACE_Arg_Shifter& arg_shifter);
+
+ /// Execute the command.
+ virtual void execute_i (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Name of object
+ virtual const char* get_name (void);
+ static const char* name (void);
+
+protected:
+
+ enum COMMAND
+ {
+ CREATE_FACTORY,
+ CREATE_FILTER,
+ ADD_CONSTRAINT,
+ ADD_FILTER,
+ REMOVE_CONSTRAINT,
+ DESTROY,
+ DUMP_STATE
+ };
+
+ ACE_CString name_;
+
+ ACE_CString factory_;
+
+ ACE_CString constraint_;
+
+ ///= Handlers
+ void handle_create_filter_factory (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_create_filter (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_add_constraint (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_add_filter (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_destroy_filter (ACE_ENV_SINGLE_ARG_DECL);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_FILTER_COMMAND_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/LookupManager.cpp b/TAO/orbsvcs/tests/Notify/lib/LookupManager.cpp
new file mode 100644
index 00000000000..ed7e71d93b8
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/LookupManager.cpp
@@ -0,0 +1,261 @@
+// $Id$
+
+#include "LookupManager.h"
+
+ACE_RCSID(lib, TAO_LookupManager, "$id$")
+
+#include "Name.h"
+
+TAO_NS_LookupManager::TAO_NS_LookupManager (void)
+ : app_ (0)
+ , activation_manager_ (0)
+ , priority_mapping_ (0)
+{
+}
+
+TAO_NS_LookupManager::~TAO_NS_LookupManager ()
+{
+}
+
+void
+TAO_NS_LookupManager::init (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
+{
+ orb_ = CORBA::ORB::_duplicate (orb);
+
+ this->resolve (this->root_poa_, TAO_NS_Name::root_poa ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->resolve (this->naming_, TAO_NS_Name::naming_service ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_NS_LookupManager::_register (CORBA::Object_ptr obj, const char* obj_name ACE_ENV_ARG_DECL)
+{
+ CosNaming::Name_var name =
+ this->naming_->to_name (obj_name
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ //@@ Warning: this is rebind..
+ this->naming_->rebind (name.in (),
+ obj
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "Registered %s with Naming Service\n", obj_name));
+}
+
+void
+TAO_NS_LookupManager::_register (TAO_NS_Driver_Base* app)
+{
+ this->app_ = app;
+}
+
+void
+TAO_NS_LookupManager::resolve (TAO_NS_Driver_Base*& app)
+{
+ app = this->app_;
+}
+
+void
+TAO_NS_LookupManager::_register (TAO_NS_Activation_Manager* activation_manager)
+{
+ this->activation_manager_ = activation_manager;
+}
+
+void
+TAO_NS_LookupManager::resolve (TAO_NS_Activation_Manager*& activation_manager)
+{
+ activation_manager = this->activation_manager_;
+}
+
+void
+TAO_NS_LookupManager::_register (TAO_NS_Priority_Mapping* priority_mapping)
+{
+ this->priority_mapping_ = priority_mapping;
+}
+
+void
+TAO_NS_LookupManager::resolve (TAO_NS_Priority_Mapping* &priority_mapping)
+{
+ priority_mapping = this->priority_mapping_;
+}
+
+void
+TAO_NS_LookupManager::resolve (CORBA::ORB_var& orb)
+{
+ orb = this->orb_;
+}
+
+void
+TAO_NS_LookupManager::resolve (PortableServer::POA_var& poa)
+{
+ poa = this->root_poa_;
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNaming::NamingContextExt_var& naming)
+{
+ naming = this->naming_;
+}
+
+void
+TAO_NS_LookupManager::resolve (PortableServer::POA_var& poa, const char *poa_name ACE_ENV_ARG_DECL)
+{
+ if (ACE_OS::strcmp (poa_name, TAO_NS_Name::root_poa) == 0)
+ {
+ CORBA::Object_ptr poa_object =
+ this->orb_->resolve_initial_references(TAO_NS_Name::root_poa ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (poa_object))
+ {
+ ACE_ERROR ((LM_ERROR,
+ " (%P|%t) Unable to resolve the Root POA.\n"));
+ return;
+ }
+
+ poa = PortableServer::POA::_narrow (poa_object ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->root_poa_ = poa;
+ }
+ else
+ {
+ poa = root_poa_->find_POA (poa_name, 0 ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNaming::NamingContextExt_var& naming, const char *naming_name ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var naming_obj =
+ this->orb_->resolve_initial_references (naming_name ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Need to check return value for errors.
+ if (CORBA::is_nil (naming_obj.in ()))
+ ACE_THROW (CORBA::UNKNOWN ());
+
+ this->naming_ = CosNaming::NamingContextExt::_narrow (naming_obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CosNaming::NamingContextExt::_duplicate (this->naming_.in ());
+
+ naming = this->naming_;
+}
+
+CORBA::Object_ptr
+TAO_NS_LookupManager::resolve_object (const char* obj_name ACE_ENV_ARG_DECL)
+{
+ CosNaming::Name name (1);
+ name.length (1);
+ name[0].id = CORBA::string_dup (obj_name);
+
+ CORBA::Object_var obj =
+ this->naming_->resolve (name ACE_ENV_ARG_PARAMETER);
+
+ ACE_CHECK_RETURN (CORBA::Object::_nil ());
+ return obj._retn ();
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNotifyChannelAdmin::EventChannelFactory_var& ecf, const char * factory_name ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = this->resolve_object (factory_name ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ecf = CosNotifyChannelAdmin::EventChannelFactory::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNotifyChannelAdmin::EventChannel_var& ec, const char * channel_name ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = this->resolve_object (channel_name ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ec = CosNotifyChannelAdmin::EventChannel::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNotifyChannelAdmin::SupplierAdmin_var& sa, const char * admin_name ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = this->resolve_object (admin_name ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ sa = CosNotifyChannelAdmin::SupplierAdmin::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNotifyChannelAdmin::ConsumerAdmin_var& ca , const char * admin_name ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = this->resolve_object (admin_name ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ca = CosNotifyChannelAdmin::ConsumerAdmin::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNotifyChannelAdmin::StructuredProxyPushSupplier_var& proxy, const char * proxy_name ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = this->resolve_object (proxy_name ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ proxy = CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNotifyChannelAdmin::StructuredProxyPushConsumer_var& proxy, const char * proxy_name ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = this->resolve_object (proxy_name ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ proxy = CosNotifyChannelAdmin::StructuredProxyPushConsumer::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNotifyFilter::FilterFactory_var& ff, const char *filter_factory_name ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = this->resolve_object (filter_factory_name ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ff = CosNotifyFilter::FilterFactory::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNotifyFilter::Filter_var& filter, const char *filter_name ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = this->resolve_object (filter_name ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ filter = CosNotifyFilter::Filter::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_LookupManager::resolve (CosNotifyFilter::FilterAdmin_var& filter_admin, const char *filter_admin_name ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = this->resolve_object (filter_admin_name ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ filter_admin = CosNotifyFilter::FilterAdmin::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class ACE_Singleton<TAO_NS_LookupManager, TAO_SYNCH_MUTEX>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate ACE_Singleton<TAO_NS_LookupManager, TAO_SYNCH_MUTEX>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/Notify/lib/LookupManager.h b/TAO/orbsvcs/tests/Notify/lib/LookupManager.h
new file mode 100644
index 00000000000..d228a9212d6
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/LookupManager.h
@@ -0,0 +1,120 @@
+/* -*- C++ -*- */
+/**
+ * @file LookupManager.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_LOOKUPMANAGER_H
+#define TAO_NS_LOOKUPMANAGER_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/Singleton.h"
+#include "tao/PortableServer/PortableServer.h"
+#include "orbsvcs/CosNotifyChannelAdminC.h"
+#include "orbsvcs/CosNamingC.h"
+#include "ace/Hash_Map_Manager.h"
+
+class TAO_NS_Periodic_Supplier;
+class TAO_NS_Periodic_Consumer;
+class TAO_NS_Driver_Base;
+class TAO_NS_Activation_Manager;
+class TAO_NS_Priority_Mapping;
+
+/**
+ * @class TAO_NS_LookupManager
+ *
+ * @brief Utility to register and resolve object references.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_LookupManager
+{
+public:
+ /// Constuctor
+ TAO_NS_LookupManager (void);
+
+ /// Destructor
+ ~TAO_NS_LookupManager ();
+
+ /// Init
+ void init (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL);
+
+ ///= Register Objects
+
+ /// Register the application starter object.
+ void _register (TAO_NS_Driver_Base* app);
+ void _register (TAO_NS_Activation_Manager* activation_manager);
+ void _register (TAO_NS_Priority_Mapping *priority_mapping);
+
+ /// Register Objects with Naming Service
+ void _register(CORBA::Object_ptr obj, const char* obj_name ACE_ENV_ARG_DECL);
+
+ ///= Resolve methods
+
+ /// Resolve the application starter object.
+ void resolve (TAO_NS_Driver_Base*& app);
+ void resolve (TAO_NS_Activation_Manager*& activation_manager);
+ void resolve (TAO_NS_Priority_Mapping* &priority_mapping);
+
+ /// Return the orb
+ void resolve (CORBA::ORB_var& orb);
+
+ /// Return the Root POA.
+ void resolve (PortableServer::POA_var& poa);
+
+ /// Return the default Naming context.
+ void resolve (CosNaming::NamingContextExt_var& naming);
+
+ void resolve (PortableServer::POA_var& poa, const char *poa_name ACE_ENV_ARG_DECL);
+ void resolve (CosNaming::NamingContextExt_var& naming, const char *naming_name ACE_ENV_ARG_DECL);
+ void resolve (CosNotifyChannelAdmin::EventChannelFactory_var& ecf, const char *factory_name ACE_ENV_ARG_DECL);
+ void resolve (CosNotifyChannelAdmin::EventChannel_var& ec, const char *channel_name ACE_ENV_ARG_DECL);
+ void resolve (CosNotifyChannelAdmin::SupplierAdmin_var& sa, const char *admin_name ACE_ENV_ARG_DECL);
+ void resolve (CosNotifyChannelAdmin::ConsumerAdmin_var& ca , const char *admin_name ACE_ENV_ARG_DECL);
+ void resolve (CosNotifyChannelAdmin::StructuredProxyPushSupplier_var& proxy, const char *proxy_name ACE_ENV_ARG_DECL);
+ void resolve (CosNotifyChannelAdmin::StructuredProxyPushConsumer_var& proxy, const char *proxy_name ACE_ENV_ARG_DECL);
+ void resolve (CosNotifyFilter::FilterFactory_var& ff, const char *filter_factory_name ACE_ENV_ARG_DECL);
+ void resolve (CosNotifyFilter::Filter_var& filter, const char *filter_name ACE_ENV_ARG_DECL);
+ void resolve (CosNotifyFilter::FilterAdmin_var& filter_admin, const char *filter_admin_name ACE_ENV_ARG_DECL);
+
+protected:
+ /// Application Starter
+ TAO_NS_Driver_Base* app_;
+
+ /// Activation Manager
+ TAO_NS_Activation_Manager* activation_manager_;
+
+ /// Resolve to CORBA::Object
+ CORBA::Object_ptr resolve_object (const char* obj_name ACE_ENV_ARG_DECL);
+
+ // The ORB that we use.
+ CORBA::ORB_var orb_;
+
+ // Reference to the root poa.
+ PortableServer::POA_var root_poa_;
+
+ // A naming context.
+ CosNaming::NamingContextExt_var naming_;
+
+ // Priority Mapping.
+ TAO_NS_Priority_Mapping *priority_mapping_;
+};
+
+typedef ACE_Singleton<TAO_NS_LookupManager, TAO_SYNCH_MUTEX> _TAO_NS_LookupManager;
+
+TAO_NOTIFY_TEST_SINGLETON_DECLARE (ACE_Singleton, TAO_NS_LookupManager, TAO_SYNCH_MUTEX);
+
+#define LOOKUP_MANAGER _TAO_NS_LookupManager::instance()
+
+#include "ace/post.h"
+#endif /* TAO_NS_LOOKUPMANAGER_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_NotifyTests b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_NotifyTests
new file mode 100644
index 00000000000..9f9fbc4be52
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_NotifyTests
@@ -0,0 +1,108 @@
+#----------------------------------------------------------------------------
+# GNU Makefile
+#----------------------------------------------------------------------------
+MAKEFILE = Makefile.TAO_NotifyTests
+DEPENDENCY_FILE = .depend.Makefile.TAO_NotifyTests
+LIB_UNCHECKED = libTAO_NotifyTests.a
+SHLIB_UNCHECKED = libTAO_NotifyTests.$(SOEXT)
+
+ifndef TAO_ROOT
+ TAO_ROOT = $(ACE_ROOT)/TAO
+endif
+
+IDL_FILES = Activation_Manager
+IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext)))
+
+
+
+FILES = \
+ Activation_Manager \
+ Activation_ManagerC \
+ Activation_ManagerS \
+ Application_Command \
+ Command \
+ Command_Builder \
+ Command_Factory \
+ Command_Factory_T \
+ ConsumerAdmin_Command \
+ Driver \
+ EventChannel_Command \
+ Factories_Define \
+ Filter_Command \
+ LookupManager \
+ Name \
+ Notify_PushConsumer \
+ Notify_PushSupplier \
+ Notify_SequencePushConsumer \
+ Notify_SequencePushSupplier \
+ Notify_StructuredPushConsumer \
+ Notify_StructuredPushSupplier \
+ Notify_Test_Client \
+ Options_Parser \
+ Periodic_Consumer_Command \
+ Periodic_Supplier_Command \
+ Periodic_Consumer \
+ Periodic_Supplier \
+ Priority_Mapping \
+ StructuredEvent \
+ SupplierAdmin_Command \
+ Task_Stats
+
+CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components --orbsvcs)
+ifeq (Notify, $(findstring Notify, $(CURRENT_COMPONENTS)))
+ifeq (Naming, $(findstring Naming, $(CURRENT_COMPONENTS)))
+LIB = $(LIB_UNCHECKED)
+SHLIB = $(SHLIB_UNCHECKED)
+endif
+endif
+
+#----------------------------------------------------------------------------
+# Include macros and targets
+#----------------------------------------------------------------------------
+include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+include $(TAO_ROOT)/rules.tao.GNU
+LSRC = $(addsuffix .cpp, $(FILES))
+ACELIB = -lACE
+
+include $(ACE_ROOT)/include/makeinclude/macros.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+include $(TAO_ROOT)/taoconfig.mk
+
+CPPFLAGS += -I../../../../orbsvcs -I../../../.. -I../../../../tao -I../../../../..
+ifeq ($(shared_libs),1)
+ifneq ($(SHLIB),)
+CPPFLAGS += -DTAO_NOTIFY_TEST_BUILD_DLL
+endif
+endif
+ifeq ($(static_libs),1)
+ifneq ($(LIB),)
+CPPFLAGS += -DTAO_AS_STATIC_LIBS -DACE_AS_STATIC_LIBS
+endif
+endif
+
+
+LDFLAGS += -L../../../../tao/PortableServer -L../../../../tao/DynamicAny -L../../../../tao/IORTable -L../../../../orbsvcs/orbsvcs/ETCL -L../../../../orbsvcs/orbsvcs -L../../../../tao -L../../../../../ace
+TAO_IDLFLAGS += -I../../../.. -I$(TAO_ROOT)/orbsvcs -Ge 1 -Sc
+
+ACE_SHLIBS = -lTAO_CosNotification -lTAO_ETCL -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_DynamicAny -lTAO_PortableServer -lTAO $(ACELIB)
+
+#----------------------------------------------------------------------------
+# Local targets
+#----------------------------------------------------------------------------
+
+ADDITIONAL_IDL_TARGETS =
+
+# IDL File Directory: .
+
+idl_stubs: $(ADDITIONAL_IDL_TARGETS)
+
+all: idl_stubs
+
+.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext)))
+
+realclean: clean
+ -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext)))
+
diff --git a/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_NotifyTests.bor b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_NotifyTests.bor
new file mode 100644
index 00000000000..c3ff9450ddb
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_NotifyTests.bor
@@ -0,0 +1,147 @@
+# Makefile for building the TAO_NotifyTests library with Borland C++ Builder
+
+NAME = TAO_NotifyTests
+
+TAO_IDL = $(CORE_BINDIR)\tao_idl -g $(CORE_BINDIR)\gperf.exe
+
+OBJFILES = \
+ $(OBJDIR)\Activation_Manager.obj \
+ $(OBJDIR)\Activation_ManagerC.obj \
+ $(OBJDIR)\Activation_ManagerS.obj \
+ $(OBJDIR)\Application_Command.obj \
+ $(OBJDIR)\Command.obj \
+ $(OBJDIR)\Command_Builder.obj \
+ $(OBJDIR)\Command_Factory.obj \
+ $(OBJDIR)\Command_Factory_T.obj \
+ $(OBJDIR)\ConsumerAdmin_Command.obj \
+ $(OBJDIR)\Driver.obj \
+ $(OBJDIR)\EventChannel_Command.obj \
+ $(OBJDIR)\Factories_Define.obj \
+ $(OBJDIR)\Filter_Command.obj \
+ $(OBJDIR)\LookupManager.obj \
+ $(OBJDIR)\Name.obj \
+ $(OBJDIR)\Notify_PushConsumer.obj \
+ $(OBJDIR)\Notify_PushSupplier.obj \
+ $(OBJDIR)\Notify_SequencePushConsumer.obj \
+ $(OBJDIR)\Notify_SequencePushSupplier.obj \
+ $(OBJDIR)\Notify_StructuredPushConsumer.obj \
+ $(OBJDIR)\Notify_StructuredPushSupplier.obj \
+ $(OBJDIR)\Notify_Test_Client.obj \
+ $(OBJDIR)\Options_Parser.obj \
+ $(OBJDIR)\Periodic_Consumer.obj \
+ $(OBJDIR)\Periodic_Consumer_Command.obj \
+ $(OBJDIR)\Periodic_Supplier.obj \
+ $(OBJDIR)\Periodic_Supplier_Command.obj \
+ $(OBJDIR)\Priority_Mapping.obj \
+ $(OBJDIR)\StructuredEvent.obj \
+ $(OBJDIR)\SupplierAdmin_Command.obj \
+ $(OBJDIR)\Task_Stats.obj
+
+EXTERNAL_LIBS =
+
+LFLAGS = \
+ -j..\..\..\..\tao\PortableServer\$(CONFIG_SUBDIR) -j..\..\..\..\tao\PortableServer \
+ -L..\..\..\..\tao\PortableServer\$(CONFIG_SUBDIR) -L..\..\..\..\tao\PortableServer \
+ -j..\..\..\..\tao\DynamicAny\$(CONFIG_SUBDIR) -j..\..\..\..\tao\DynamicAny \
+ -L..\..\..\..\tao\DynamicAny\$(CONFIG_SUBDIR) -L..\..\..\..\tao\DynamicAny \
+ -j..\..\..\..\tao\IORTable\$(CONFIG_SUBDIR) -j..\..\..\..\tao\IORTable \
+ -L..\..\..\..\tao\IORTable\$(CONFIG_SUBDIR) -L..\..\..\..\tao\IORTable \
+ -j..\..\..\..\orbsvcs\orbsvcs\ETCL\$(CONFIG_SUBDIR) -j..\..\..\..\orbsvcs\orbsvcs\ETCL \
+ -L..\..\..\..\orbsvcs\orbsvcs\ETCL\$(CONFIG_SUBDIR) -L..\..\..\..\orbsvcs\orbsvcs\ETCL \
+ -j..\..\..\..\orbsvcs\orbsvcs\$(CONFIG_SUBDIR) -j..\..\..\..\orbsvcs\orbsvcs \
+ -L..\..\..\..\orbsvcs\orbsvcs\$(CONFIG_SUBDIR) -L..\..\..\..\orbsvcs\orbsvcs \
+ -j..\..\..\..\tao\$(CONFIG_SUBDIR) -j..\..\..\..\tao \
+ -L..\..\..\..\tao\$(CONFIG_SUBDIR) -L..\..\..\..\tao \
+ -j..\..\..\..\..\ace\$(CONFIG_SUBDIR) -j..\..\..\..\..\ace \
+ -L..\..\..\..\..\ace\$(CONFIG_SUBDIR) -L..\..\..\..\..\ace \
+ -j$(CORE_BINDIR) \
+ -L$(CORE_BINDIR)
+
+LIBFILES = \
+ TAO_CosNotification$(LIB_DECORATOR).lib \
+ TAO_ETCL$(LIB_DECORATOR).lib \
+ TAO_CosNaming$(LIB_DECORATOR).lib \
+ TAO_Svc_Utils$(LIB_DECORATOR).lib \
+ TAO_IORTable$(LIB_DECORATOR).lib \
+ TAO_DynamicAny$(LIB_DECORATOR).lib \
+ TAO_PortableServer$(LIB_DECORATOR).lib \
+ TAO$(LIB_DECORATOR).lib \
+ ACE$(LIB_DECORATOR).lib \
+ $(EXTERNAL_LIBS)
+
+IDLFILES = \
+ $(IDLDIR)\Activation_Manager.idl
+
+!ifdef STATIC
+LIB_FLAGS = -DTAO_AS_STATIC_LIBS=1 -DACE_AS_STATIC_LIBS=1
+DLL_FLAGS =
+!else
+LIB_FLAGS =
+DLL_FLAGS = -DTAO_NOTIFY_TEST_BUILD_DLL=1
+!endif
+
+CFLAGS = \
+ -I..\..\..\..\orbsvcs \
+ -I..\..\..\.. \
+ -I..\..\..\..\tao \
+ -I..\..\..\..\.. \
+ $(LIB_FLAGS) \
+ $(DLL_FLAGS)
+
+CPPDIR = .
+
+IDLDIR = .
+
+INCLUDES = \
+ Activation_Manager.h \
+ Activation_ManagerC.h \
+ Activation_ManagerS.h \
+ Application_Command.h \
+ Command.h \
+ Command_Builder.h \
+ Command_Factory.h \
+ Command_Factory_T.h \
+ ConsumerAdmin_Command.h \
+ Driver.h \
+ EventChannel_Command.h \
+ Factories_Define.h \
+ Filter_Command.h \
+ LookupManager.h \
+ Name.h \
+ Notify_PushConsumer.h \
+ Notify_PushSupplier.h \
+ Notify_SequencePushConsumer.h \
+ Notify_SequencePushSupplier.h \
+ Notify_StructuredPushConsumer.h \
+ Notify_StructuredPushSupplier.h \
+ Notify_Test_Client.h \
+ Options_Parser.h \
+ Periodic_Consumer.h \
+ Periodic_Consumer_Command.h \
+ Periodic_Supplier.h \
+ Periodic_Supplier_Command.h \
+ Priority_Mapping.h \
+ StructuredEvent.h \
+ SupplierAdmin_Command.h \
+ Task_Stats.h \
+ Command_Factory_T.cpp \
+ Activation_ManagerC.i \
+ Activation_ManagerS.i \
+ Task_Stats.inl \
+ Activation_Manager.idl
+
+all: idl_src_files
+
+BASE_BINDIR = ..\..\..\..\..\bin
+
+!include <$(ACE_ROOT)\include\makeinclude\build_library.bor>
+
+#
+# IDL Build rules
+#
+
+idl_src_files: $(IDLFILES:.idl=C.cpp) $(IDLFILES:.idl=S.cpp)
+
+# IDL File Directory: .
+$(IDLDIR)\Activation_ManagerS.cpp $(IDLDIR)\Activation_ManagerC.cpp: $(IDLDIR)\Activation_Manager.idl
+ $(TAO_IDL) -I..\..\..\.. -I$(TAO_ROOT)\orbsvcs -Ge 1 -Sc $**
diff --git a/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests
new file mode 100644
index 00000000000..51355172d4f
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests
@@ -0,0 +1,64 @@
+#----------------------------------------------------------------------------
+# GNU Makefile
+#----------------------------------------------------------------------------
+MAKEFILE = Makefile.TAO_RT_NotifyTests
+DEPENDENCY_FILE = .depend.Makefile.TAO_RT_NotifyTests
+LIB_UNCHECKED = libTAO_RT_NotifyTests.a
+SHLIB_UNCHECKED = libTAO_RT_NotifyTests.$(SOEXT)
+
+ifndef TAO_ROOT
+ TAO_ROOT = $(ACE_ROOT)/TAO
+endif
+
+
+
+FILES = \
+ RT_Application_Command \
+ RT_POA_Command \
+ RT_Priority_Mapping \
+ RT_Factories_Define
+
+CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components --orbsvcs)
+ifeq (Notify, $(findstring Notify, $(CURRENT_COMPONENTS)))
+ifeq (Naming, $(findstring Naming, $(CURRENT_COMPONENTS)))
+LIB = $(LIB_UNCHECKED)
+SHLIB = $(SHLIB_UNCHECKED)
+endif
+endif
+
+#----------------------------------------------------------------------------
+# Include macros and targets
+#----------------------------------------------------------------------------
+include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+include $(TAO_ROOT)/rules.tao.GNU
+LSRC = $(addsuffix .cpp, $(FILES))
+ACELIB = -lACE
+
+include $(ACE_ROOT)/include/makeinclude/macros.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+include $(TAO_ROOT)/taoconfig.mk
+
+CPPFLAGS += -I../../../../orbsvcs -I../../../.. -I../../../../tao -I../../../../..
+ifeq ($(shared_libs),1)
+ifneq ($(SHLIB),)
+CPPFLAGS += -DTAO_RT_NOTIFY_TEST_BUILD_DLL
+endif
+endif
+ifeq ($(static_libs),1)
+ifneq ($(LIB),)
+CPPFLAGS += -DTAO_AS_STATIC_LIBS -DACE_AS_STATIC_LIBS
+endif
+endif
+
+
+LDFLAGS += -L../../../../tao/PortableServer -L../../../../tao/DynamicAny -L../../../../tao/IORTable -L../../../../orbsvcs/orbsvcs/ETCL -L../../../../tao/RTPortableServer -L../../../../tao/RTCORBA -L../../../../orbsvcs/orbsvcs -L../../../../tao -L../../../../../ace
+
+ACE_SHLIBS = -lTAO_NotifyTests -lTAO_RTCORBA -lTAO_RTPortableServer -lTAO_CosNotification -lTAO_ETCL -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_DynamicAny -lTAO_PortableServer -lTAO $(ACELIB)
+
+#----------------------------------------------------------------------------
+# Local targets
+#----------------------------------------------------------------------------
+
diff --git a/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests.bor b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests.bor
new file mode 100644
index 00000000000..8c270ca58cc
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests.bor
@@ -0,0 +1,78 @@
+# Makefile for building the TAO_RT_NotifyTests library with Borland C++ Builder
+
+NAME = TAO_RT_NotifyTests
+
+OBJFILES = \
+ $(OBJDIR)\RT_Application_Command.obj \
+ $(OBJDIR)\RT_Factories_Define.obj \
+ $(OBJDIR)\RT_POA_Command.obj \
+ $(OBJDIR)\RT_Priority_Mapping.obj
+
+EXTERNAL_LIBS =
+
+LFLAGS = \
+ -j..\..\..\..\tao\PortableServer\$(CONFIG_SUBDIR) -j..\..\..\..\tao\PortableServer \
+ -L..\..\..\..\tao\PortableServer\$(CONFIG_SUBDIR) -L..\..\..\..\tao\PortableServer \
+ -j..\..\..\..\tao\DynamicAny\$(CONFIG_SUBDIR) -j..\..\..\..\tao\DynamicAny \
+ -L..\..\..\..\tao\DynamicAny\$(CONFIG_SUBDIR) -L..\..\..\..\tao\DynamicAny \
+ -j..\..\..\..\tao\IORTable\$(CONFIG_SUBDIR) -j..\..\..\..\tao\IORTable \
+ -L..\..\..\..\tao\IORTable\$(CONFIG_SUBDIR) -L..\..\..\..\tao\IORTable \
+ -j..\..\..\..\orbsvcs\orbsvcs\ETCL\$(CONFIG_SUBDIR) -j..\..\..\..\orbsvcs\orbsvcs\ETCL \
+ -L..\..\..\..\orbsvcs\orbsvcs\ETCL\$(CONFIG_SUBDIR) -L..\..\..\..\orbsvcs\orbsvcs\ETCL \
+ -j..\..\..\..\tao\RTPortableServer\$(CONFIG_SUBDIR) -j..\..\..\..\tao\RTPortableServer \
+ -L..\..\..\..\tao\RTPortableServer\$(CONFIG_SUBDIR) -L..\..\..\..\tao\RTPortableServer \
+ -j..\..\..\..\tao\RTCORBA\$(CONFIG_SUBDIR) -j..\..\..\..\tao\RTCORBA \
+ -L..\..\..\..\tao\RTCORBA\$(CONFIG_SUBDIR) -L..\..\..\..\tao\RTCORBA \
+ -j..\..\..\..\orbsvcs\orbsvcs\$(CONFIG_SUBDIR) -j..\..\..\..\orbsvcs\orbsvcs \
+ -L..\..\..\..\orbsvcs\orbsvcs\$(CONFIG_SUBDIR) -L..\..\..\..\orbsvcs\orbsvcs \
+ -j..\..\..\..\tao\$(CONFIG_SUBDIR) -j..\..\..\..\tao \
+ -L..\..\..\..\tao\$(CONFIG_SUBDIR) -L..\..\..\..\tao \
+ -j..\..\..\..\..\ace\$(CONFIG_SUBDIR) -j..\..\..\..\..\ace \
+ -L..\..\..\..\..\ace\$(CONFIG_SUBDIR) -L..\..\..\..\..\ace \
+ -j$(CORE_BINDIR) \
+ -L$(CORE_BINDIR)
+
+LIBFILES = \
+ TAO_NotifyTests$(LIB_DECORATOR).lib \
+ TAO_RTCORBA$(LIB_DECORATOR).lib \
+ TAO_RTPortableServer$(LIB_DECORATOR).lib \
+ TAO_CosNotification$(LIB_DECORATOR).lib \
+ TAO_ETCL$(LIB_DECORATOR).lib \
+ TAO_CosNaming$(LIB_DECORATOR).lib \
+ TAO_Svc_Utils$(LIB_DECORATOR).lib \
+ TAO_IORTable$(LIB_DECORATOR).lib \
+ TAO_DynamicAny$(LIB_DECORATOR).lib \
+ TAO_PortableServer$(LIB_DECORATOR).lib \
+ TAO$(LIB_DECORATOR).lib \
+ ACE$(LIB_DECORATOR).lib \
+ $(EXTERNAL_LIBS)
+
+!ifdef STATIC
+LIB_FLAGS = -DTAO_AS_STATIC_LIBS=1 -DACE_AS_STATIC_LIBS=1
+DLL_FLAGS =
+!else
+LIB_FLAGS =
+DLL_FLAGS = -DTAO_RT_NOTIFY_TEST_BUILD_DLL=1
+!endif
+
+CFLAGS = \
+ -I..\..\..\..\orbsvcs \
+ -I..\..\..\.. \
+ -I..\..\..\..\tao \
+ -I..\..\..\..\.. \
+ $(LIB_FLAGS) \
+ $(DLL_FLAGS)
+
+CPPDIR = .
+
+INCLUDES = \
+ Command_Factory_T.h \
+ RT_Application_Command.h \
+ RT_POA_Command.h \
+ RT_Priority_Mapping.h \
+ Command_Factory_T.cpp \
+ Task_Stats.inl
+
+BASE_BINDIR = ..\..\..\..\..\bin
+
+!include <$(ACE_ROOT)\include\makeinclude\build_library.bor>
diff --git a/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests_Filter b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests_Filter
new file mode 100644
index 00000000000..ae21dc8d4de
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests_Filter
@@ -0,0 +1,62 @@
+#----------------------------------------------------------------------------
+# GNU Makefile
+#----------------------------------------------------------------------------
+MAKEFILE = Makefile.TAO_RT_NotifyTests_Filter
+DEPENDENCY_FILE = .depend.Makefile.TAO_RT_NotifyTests_Filter
+LIB_UNCHECKED = libTAO_RT_NotifyTests_Filter.a
+SHLIB_UNCHECKED = libTAO_RT_NotifyTests_Filter.$(SOEXT)
+
+ifndef TAO_ROOT
+ TAO_ROOT = $(ACE_ROOT)/TAO
+endif
+
+
+
+FILES = \
+ RT_Test_Filter \
+ RT_Test_FilterFactory
+
+CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components --orbsvcs)
+ifeq (Notify, $(findstring Notify, $(CURRENT_COMPONENTS)))
+ifeq (Naming, $(findstring Naming, $(CURRENT_COMPONENTS)))
+LIB = $(LIB_UNCHECKED)
+SHLIB = $(SHLIB_UNCHECKED)
+endif
+endif
+
+#----------------------------------------------------------------------------
+# Include macros and targets
+#----------------------------------------------------------------------------
+include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+include $(TAO_ROOT)/rules.tao.GNU
+LSRC = $(addsuffix .cpp, $(FILES))
+ACELIB = -lACE
+
+include $(ACE_ROOT)/include/makeinclude/macros.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+include $(TAO_ROOT)/taoconfig.mk
+
+CPPFLAGS += -I../../../../orbsvcs -I../../../.. -I../../../../tao -I../../../../..
+ifeq ($(shared_libs),1)
+ifneq ($(SHLIB),)
+CPPFLAGS += -DTAO_RT_Test_Filter_BUILD_DLL
+endif
+endif
+ifeq ($(static_libs),1)
+ifneq ($(LIB),)
+CPPFLAGS += -DTAO_AS_STATIC_LIBS -DACE_AS_STATIC_LIBS
+endif
+endif
+
+
+LDFLAGS += -L../../../../tao/RTCORBA -L../../../../tao/IORTable -L../../../../tao/PortableServer -L../../../../tao/DynamicAny -L../../../../orbsvcs/orbsvcs/ETCL -L../../../../orbsvcs/orbsvcs -L../../../../tao -L../../../../../ace
+
+ACE_SHLIBS = -lTAO_RTCORBA -lTAO_CosNotification -lTAO_ETCL -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_DynamicAny -lTAO_PortableServer -lTAO $(ACELIB)
+
+#----------------------------------------------------------------------------
+# Local targets
+#----------------------------------------------------------------------------
+
diff --git a/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests_Filter.bor b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests_Filter.bor
new file mode 100644
index 00000000000..771cdde8bf6
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Makefile.TAO_RT_NotifyTests_Filter.bor
@@ -0,0 +1,71 @@
+# Makefile for building the TAO_RT_NotifyTests_Filter library with Borland C++ Builder
+
+NAME = TAO_RT_NotifyTests_Filter
+
+OBJFILES = \
+ $(OBJDIR)\RT_Test_Filter.obj \
+ $(OBJDIR)\RT_Test_FilterFactory.obj
+
+EXTERNAL_LIBS =
+
+LFLAGS = \
+ -j..\..\..\..\tao\RTCORBA\$(CONFIG_SUBDIR) -j..\..\..\..\tao\RTCORBA \
+ -L..\..\..\..\tao\RTCORBA\$(CONFIG_SUBDIR) -L..\..\..\..\tao\RTCORBA \
+ -j..\..\..\..\tao\IORTable\$(CONFIG_SUBDIR) -j..\..\..\..\tao\IORTable \
+ -L..\..\..\..\tao\IORTable\$(CONFIG_SUBDIR) -L..\..\..\..\tao\IORTable \
+ -j..\..\..\..\tao\PortableServer\$(CONFIG_SUBDIR) -j..\..\..\..\tao\PortableServer \
+ -L..\..\..\..\tao\PortableServer\$(CONFIG_SUBDIR) -L..\..\..\..\tao\PortableServer \
+ -j..\..\..\..\tao\DynamicAny\$(CONFIG_SUBDIR) -j..\..\..\..\tao\DynamicAny \
+ -L..\..\..\..\tao\DynamicAny\$(CONFIG_SUBDIR) -L..\..\..\..\tao\DynamicAny \
+ -j..\..\..\..\orbsvcs\orbsvcs\ETCL\$(CONFIG_SUBDIR) -j..\..\..\..\orbsvcs\orbsvcs\ETCL \
+ -L..\..\..\..\orbsvcs\orbsvcs\ETCL\$(CONFIG_SUBDIR) -L..\..\..\..\orbsvcs\orbsvcs\ETCL \
+ -j..\..\..\..\orbsvcs\orbsvcs\$(CONFIG_SUBDIR) -j..\..\..\..\orbsvcs\orbsvcs \
+ -L..\..\..\..\orbsvcs\orbsvcs\$(CONFIG_SUBDIR) -L..\..\..\..\orbsvcs\orbsvcs \
+ -j..\..\..\..\tao\$(CONFIG_SUBDIR) -j..\..\..\..\tao \
+ -L..\..\..\..\tao\$(CONFIG_SUBDIR) -L..\..\..\..\tao \
+ -j..\..\..\..\..\ace\$(CONFIG_SUBDIR) -j..\..\..\..\..\ace \
+ -L..\..\..\..\..\ace\$(CONFIG_SUBDIR) -L..\..\..\..\..\ace \
+ -j$(CORE_BINDIR) \
+ -L$(CORE_BINDIR)
+
+LIBFILES = \
+ TAO_RTCORBA$(LIB_DECORATOR).lib \
+ TAO_CosNotification$(LIB_DECORATOR).lib \
+ TAO_ETCL$(LIB_DECORATOR).lib \
+ TAO_CosNaming$(LIB_DECORATOR).lib \
+ TAO_Svc_Utils$(LIB_DECORATOR).lib \
+ TAO_IORTable$(LIB_DECORATOR).lib \
+ TAO_DynamicAny$(LIB_DECORATOR).lib \
+ TAO_PortableServer$(LIB_DECORATOR).lib \
+ TAO$(LIB_DECORATOR).lib \
+ ACE$(LIB_DECORATOR).lib \
+ $(EXTERNAL_LIBS)
+
+!ifdef STATIC
+LIB_FLAGS = -DTAO_AS_STATIC_LIBS=1 -DACE_AS_STATIC_LIBS=1
+DLL_FLAGS =
+!else
+LIB_FLAGS =
+DLL_FLAGS = -DTAO_RT_Test_Filter_BUILD_DLL=1
+!endif
+
+CFLAGS = \
+ -I..\..\..\..\orbsvcs \
+ -I..\..\..\.. \
+ -I..\..\..\..\tao \
+ -I..\..\..\..\.. \
+ $(LIB_FLAGS) \
+ $(DLL_FLAGS)
+
+CPPDIR = .
+
+INCLUDES = \
+ Command_Factory_T.h \
+ RT_Test_Filter.h \
+ RT_Test_FilterFactory.h \
+ Command_Factory_T.cpp \
+ Task_Stats.inl
+
+BASE_BINDIR = ..\..\..\..\..\bin
+
+!include <$(ACE_ROOT)\include\makeinclude\build_library.bor>
diff --git a/TAO/orbsvcs/tests/Notify/lib/Name.cpp b/TAO/orbsvcs/tests/Notify/lib/Name.cpp
new file mode 100644
index 00000000000..a93d7a3c508
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Name.cpp
@@ -0,0 +1,37 @@
+// $Id$
+
+#include "Name.h"
+
+ACE_RCSID(lib, TAO_Name, "$id$")
+
+#define TAO_NS_DECLARE_NAME(target, name) \
+const char* const TAO_NS_Name::##target = ACE_TEXT (name);
+
+TAO_NS_DECLARE_NAME (command_builder,"Command_Builder")
+TAO_NS_DECLARE_NAME (root_poa,"RootPOA")
+TAO_NS_DECLARE_NAME (event_channel_factory,"NotifyEventChannelFactory");
+TAO_NS_DECLARE_NAME (naming_service,"NameService");
+
+TAO_NS_DECLARE_NAME (application_command,"Application");
+TAO_NS_DECLARE_NAME (application_command_factory,"Application_Command_Factory");
+
+TAO_NS_DECLARE_NAME (event_channel_command,"EventChannel")
+TAO_NS_DECLARE_NAME (event_channel_command_factory,"EventChannel_Command_Factory")
+
+TAO_NS_DECLARE_NAME (consumer_admin_command,"ConsumerAdmin")
+TAO_NS_DECLARE_NAME (consumer_admin_command_factory,"ConsumerAdmin_Command_Factory")
+
+TAO_NS_DECLARE_NAME (supplier_admin_command,"SupplierAdmin")
+TAO_NS_DECLARE_NAME (supplier_admin_command_factory,"SupplierAdmin_Command_Factory")
+
+TAO_NS_DECLARE_NAME (periodic_supplier_command, "PeriodicSupplier");
+TAO_NS_DECLARE_NAME (periodic_supplier_command_factory, "PeriodicSupplier_Command_Factory");
+
+TAO_NS_DECLARE_NAME (periodic_consumer_command, "PeriodicConsumer");
+TAO_NS_DECLARE_NAME (periodic_consumer_command_factory, "PeriodicConsumer_Command_Factory");
+
+TAO_NS_DECLARE_NAME (poa_command, "POA");
+TAO_NS_DECLARE_NAME (poa_command_factory, "POA_Command_Factory");
+
+TAO_NS_DECLARE_NAME (filter_command, "Filter");
+TAO_NS_DECLARE_NAME (filter_command_factory, "Filter_Command_Factory");
diff --git a/TAO/orbsvcs/tests/Notify/lib/Name.h b/TAO/orbsvcs/tests/Notify/lib/Name.h
new file mode 100644
index 00000000000..948ce3c8fb7
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Name.h
@@ -0,0 +1,63 @@
+/* -*- C++ -*- */
+/**
+ * @file Name.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_NAME_H
+#define TAO_NS_NAME_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+/**
+ * @class TAO_NS_Name
+ *
+ * @brief Define the names for command objects and other common strings.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Name
+{
+public:
+ static const char* const root_poa;
+ static const char* const event_channel_factory;
+ static const char* const naming_service;
+
+ static const char* const command_builder;
+
+ static const char* const application_command_factory;
+ static const char* const application_command;
+
+ static const char* const event_channel_command_factory;
+ static const char* const event_channel_command;
+
+ static const char* const supplier_admin_command_factory;
+ static const char* const supplier_admin_command;
+
+ static const char* const consumer_admin_command_factory;
+ static const char* const consumer_admin_command;
+
+ static const char* const periodic_supplier_command;
+ static const char* const periodic_supplier_command_factory;
+
+ static const char* const periodic_consumer_command;
+ static const char* const periodic_consumer_command_factory;
+
+ static const char* const poa_command;
+ static const char* const poa_command_factory;
+
+ static const char* const filter_command;
+ static const char* const filter_command_factory;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_NAME_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushConsumer.cpp b/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushConsumer.cpp
index a1445ba6a16..9e41b077127 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushConsumer.cpp
+++ b/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushConsumer.cpp
@@ -30,6 +30,18 @@ void TAO_Notify_StructuredPushConsumer::init
this->default_POA_ = PortableServer::POA::_duplicate (poa);
}
+void
+TAO_Notify_StructuredPushConsumer::name (ACE_CString& name)
+{
+ this->name_ = name;
+}
+
+const ACE_CString&
+TAO_Notify_StructuredPushConsumer::name (void)
+{
+ return this->name_;
+}
+
PortableServer::POA_ptr
TAO_Notify_StructuredPushConsumer::_default_POA (
ACE_ENV_SINGLE_ARG_DECL_NOT_USED
@@ -83,6 +95,30 @@ TAO_Notify_StructuredPushConsumer::connect (
}
void
+TAO_Notify_StructuredPushConsumer::connect (CosNotifyChannelAdmin::StructuredProxyPushSupplier_ptr proxy, CosNotifyChannelAdmin::ProxyID proxy_id ACE_ENV_ARG_DECL)
+{
+ // Activate the consumer with the default_POA_.
+ PortableServer::ObjectId_var id =
+ this->default_POA_->activate_object (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CORBA::Object_var object = this->default_POA_->id_to_reference (id.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CosNotifyComm::StructuredPushConsumer_var consumer_ref = CosNotifyComm::StructuredPushConsumer::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ proxy->connect_structured_push_consumer (consumer_ref.in ()
+ ACE_ENV_ARG_PARAMETER);
+ // Give ownership to POA.
+ this->_remove_ref ();
+
+ // save the proxy
+ this->proxy_supplier_ = CosNotifyChannelAdmin::StructuredProxyPushSupplier::_duplicate (proxy);
+ this->proxy_supplier_id_ = proxy_id;
+}
+
+void
TAO_Notify_StructuredPushConsumer::deactivate (ACE_ENV_SINGLE_ARG_DECL)
{
PortableServer::POA_var poa = this->_default_POA ();
diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushConsumer.h b/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushConsumer.h
index 46e8b942139..d2aa7bad980 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushConsumer.h
+++ b/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushConsumer.h
@@ -47,11 +47,19 @@ class TAO_NOTIFY_TEST_Export TAO_Notify_StructuredPushConsumer : public POA_CosN
void init (PortableServer::POA_ptr poa ACE_ENV_ARG_DECL);
// Saves the POA ref.
+ // Accessor to set/get our name.
+ void name (ACE_CString& name);
+ const ACE_CString& name (void);
+
void connect (CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin ACE_ENV_ARG_DECL);
// Activates this servant with the POA supplied in init.
// Creates a new proxy supplier via the <consumer_admin> supplied and connects
// to it.
+ void connect (CosNotifyChannelAdmin::StructuredProxyPushSupplier_ptr proxy, CosNotifyChannelAdmin::ProxyID proxy_id ACE_ENV_ARG_DECL);
+ // Activates this servant with the POA supplied in init.
+ /// Connect to given proxy
+
virtual void disconnect (ACE_ENV_SINGLE_ARG_DECL);
// Disconnect from the supplier.
@@ -65,6 +73,13 @@ class TAO_NOTIFY_TEST_Export TAO_Notify_StructuredPushConsumer : public POA_CosN
virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
protected:
// = Data Members
+
+ /// Lock to serialize access to data members.
+ TAO_SYNCH_MUTEX lock_;
+
+ /// My name.
+ ACE_CString name_;
+
CosNotifyChannelAdmin::StructuredProxyPushSupplier_var proxy_supplier_;
// The proxy that we are connected to.
diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushSupplier.cpp b/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushSupplier.cpp
index 166168c36cf..091f6ef4c8f 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushSupplier.cpp
+++ b/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushSupplier.cpp
@@ -19,6 +19,18 @@ TAO_Notify_StructuredPushSupplier::~TAO_Notify_StructuredPushSupplier ()
}
void
+TAO_Notify_StructuredPushSupplier::name (ACE_CString& name)
+{
+ this->name_ = name;
+}
+
+const ACE_CString&
+TAO_Notify_StructuredPushSupplier::name (void)
+{
+ return this->name_;
+}
+
+void
TAO_Notify_StructuredPushSupplier::init
(PortableServer::POA_ptr poa ACE_ENV_ARG_DECL_NOT_USED)
{
@@ -31,6 +43,25 @@ TAO_Notify_StructuredPushSupplier::get_proxy_consumer (void)
return proxy_consumer_.in ();
}
+
+void
+TAO_Notify_StructuredPushSupplier::connect (CosNotifyChannelAdmin::StructuredProxyPushConsumer_ptr proxy, CosNotifyChannelAdmin::ProxyID proxy_id ACE_ENV_ARG_DECL)
+{
+ // Activate the supplier with the default_POA_.
+ CosNotifyComm::StructuredPushSupplier_var supplier_ref =
+ this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ proxy->connect_structured_push_supplier (supplier_ref.in ()
+ ACE_ENV_ARG_PARAMETER);
+ // Give ownership to POA.
+ this->_remove_ref ();
+
+ // save the proxy
+ this->proxy_consumer_ = CosNotifyChannelAdmin::StructuredProxyPushConsumer::_duplicate (proxy);
+ this->proxy_consumer_id_ = proxy_id;
+}
+
void
TAO_Notify_StructuredPushSupplier::connect (
CosNotifyChannelAdmin::SupplierAdmin_ptr supplier_admin
diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushSupplier.h b/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushSupplier.h
index f24bfbb6c89..94f522346a5 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushSupplier.h
+++ b/TAO/orbsvcs/tests/Notify/lib/Notify_StructuredPushSupplier.h
@@ -47,6 +47,14 @@ class TAO_NOTIFY_TEST_Export TAO_Notify_StructuredPushSupplier:public POA_CosNot
void init (PortableServer::POA_ptr poa ACE_ENV_ARG_DECL);
// Init
+ // Accessor to set/get our name.
+ void name (ACE_CString& name);
+ const ACE_CString& name (void);
+
+ void connect (CosNotifyChannelAdmin::StructuredProxyPushConsumer_ptr proxy, CosNotifyChannelAdmin::ProxyID ACE_ENV_ARG_DECL);
+ // Activates this servant with the POA supplied in init.
+ // Connects to given proxy.
+
void connect (CosNotifyChannelAdmin::SupplierAdmin_ptr supplier_admin ACE_ENV_ARG_DECL);
// Activates this servant with the POA supplied in init.
// Creates a new proxy supplier and connects to it.
@@ -69,6 +77,10 @@ class TAO_NOTIFY_TEST_Export TAO_Notify_StructuredPushSupplier:public POA_CosNot
protected:
// = Data Members
+
+ /// My name.
+ ACE_CString name_;
+
CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxy_consumer_;
// The proxy that we are connected to.
diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp
index 765e538acf2..803642cc7a3 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp
+++ b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp
@@ -177,14 +177,14 @@ Notify_Test_Client::create_event_channel (const char* cname,
{
CORBA::Object_var obj = naming_context_->resolve (name);
ec = CosNotifyChannelAdmin::EventChannel::_narrow (obj.in ());
-
- if (CORBA::is_nil (ec.in ()))
- {
- return 0;
- }
}
else
{
+ if (CORBA::is_nil (this->notify_factory_.in ()))
+ {
+ return CosNotifyChannelAdmin::EventChannel::_nil ();
+ }
+
CosNotifyChannelAdmin::ChannelID id;
CosNotification::QoSProperties initial_qos;
CosNotification::AdminProperties initial_admin;
@@ -193,7 +193,7 @@ Notify_Test_Client::create_event_channel (const char* cname,
initial_admin,
id
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil ());
naming_context_->rebind(name, ec.in());
@@ -208,5 +208,3 @@ Notify_Test_Client::done (void)
{
return this->done_;
}
-
-
diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_lib.mpc b/TAO/orbsvcs/tests/Notify/lib/Notify_lib.mpc
index e73f58d7c19..420a0aee1ba 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Notify_lib.mpc
+++ b/TAO/orbsvcs/tests/Notify/lib/Notify_lib.mpc
@@ -1,3 +1,99 @@
-project(Notify Lib): orbsvcslib, notify {
- sharedname = NotifyTests
-} \ No newline at end of file
+project(TAO_NotifyTests): orbsvcslib, notify {
+ depends += CosNotification
+ sharedname += TAO_NotifyTests
+
+ libs += TAO_CosNotification
+
+ libpaths += $(TAO_ROOT)/orbsvcs/orbsvcs/ETCL
+ libpaths += $(TAO_ROOT)/tao/IORTable
+ libpaths += $(TAO_ROOT)/tao/DynamicAny
+ libpaths += $(TAO_ROOT)/tao/PortableServer
+
+ dllflags = TAO_NOTIFY_TEST_BUILD_DLL
+
+ IDL_Files {
+ Activation_Manager.idl
+ }
+
+ Source_Files{
+ Activation_Manager.cpp
+ Activation_ManagerC.cpp
+ Activation_ManagerS.cpp
+ Application_Command.cpp
+ Command.cpp
+ Command_Builder.cpp
+ Command_Factory.cpp
+ Command_Factory_T.cpp
+ ConsumerAdmin_Command.cpp
+ Driver.cpp
+ EventChannel_Command.cpp
+ Factories_Define.cpp
+ Filter_Command.cpp
+ LookupManager.cpp
+ Name.cpp
+ Notify_PushConsumer.cpp
+ Notify_PushSupplier.cpp
+ Notify_SequencePushConsumer.cpp
+ Notify_SequencePushSupplier.cpp
+ Notify_StructuredPushConsumer.cpp
+ Notify_StructuredPushSupplier.cpp
+ Notify_Test_Client.cpp
+ Options_Parser.cpp
+ Periodic_Consumer_Command.cpp
+ Periodic_Supplier_Command.cpp
+ Periodic_Consumer.cpp
+ Periodic_Supplier.cpp
+ Priority_Mapping.cpp
+ StructuredEvent.cpp
+ SupplierAdmin_Command.cpp
+ Task_Stats.cpp
+ }
+}
+
+project(TAO_RT_NotifyTests_Filter): orbsvcslib, notify {
+ sharedname = TAO_RT_NotifyTests_Filter
+ libs += TAO_CosNotification TAO_RTCORBA
+
+ dllflags = TAO_RT_Test_Filter_BUILD_DLL
+
+ libpaths += $(TAO_ROOT)/orbsvcs/orbsvcs/ETCL
+ libpaths += $(TAO_ROOT)/tao/DynamicAny
+ libpaths += $(TAO_ROOT)/tao/PortableServer
+ libpaths += $(TAO_ROOT)/tao/IORTable
+ libpaths += $(TAO_ROOT)/tao/RTCORBA
+
+ IDL_Files {
+ }
+
+ Source_Files{
+ RT_Test_Filter.cpp
+ RT_Test_FilterFactory.cpp
+ }
+}
+
+project(TAO_RT_NotifyTests): orbsvcslib, notify {
+
+ depends = NotifyTests RTCORBA RTPortableServer
+ sharedname = TAO_RT_NotifyTests
+ libs += TAO_NotifyTests TAO_RTCORBA TAO_RTPortableServer
+
+ libpaths += $(TAO_ROOT)/tao/RTCORBA
+ libpaths += $(TAO_ROOT)/tao/RTPortableServer
+ libpaths += $(TAO_ROOT)/orbsvcs/orbsvcs/ETCL
+ libpaths += $(TAO_ROOT)/tao/IORTable
+ libpaths += $(TAO_ROOT)/tao/DynamicAny
+ libpaths += $(TAO_ROOT)/tao/PortableServer
+
+ dllflags = TAO_RT_NOTIFY_TEST_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files{
+ RT_Application_Command.cpp
+ RT_POA_Command.cpp
+ RT_Priority_Mapping.cpp
+ RT_Factories_Define.cpp
+ }
+}
+
diff --git a/TAO/orbsvcs/tests/Notify/lib/Options_Parser.cpp b/TAO/orbsvcs/tests/Notify/lib/Options_Parser.cpp
new file mode 100644
index 00000000000..d42600729c8
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Options_Parser.cpp
@@ -0,0 +1,141 @@
+// $Id$
+
+#include "Options_Parser.h"
+
+ACE_RCSID(lib, TAO_Options_Parser, "$id$")
+
+#include "tao/debug.h"
+#include "orbsvcs/NotifyExtC.h"
+
+TAO_NS_Options_Parser::TAO_NS_Options_Parser (void)
+{
+}
+
+TAO_NS_Options_Parser::~TAO_NS_Options_Parser ()
+{
+}
+
+void
+TAO_NS_Options_Parser::execute (CosNotification::EventTypeSeq& added, CosNotification::EventTypeSeq& removed, ACE_Arg_Shifter& arg_shifter)
+{
+ const ACE_TCHAR* current_arg = 0;
+
+ while (arg_shifter.is_anything_left ())
+ {
+ current_arg = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ if (current_arg[0] == '+')
+ {
+ // create 1 more space.
+ int seq_ln = added.length ();
+ added.length (seq_ln + 1);
+
+ added[seq_ln].domain_name = CORBA::string_dup ("*");
+ added[seq_ln].type_name = CORBA::string_dup (++current_arg); // Skip the '+' sign.
+ }
+ else if (current_arg[0] == '-')
+ {
+ // create 1 more space.
+ int seq_ln = removed.length ();
+ removed.length (seq_ln + 1);
+
+ removed[seq_ln].domain_name = CORBA::string_dup ("*");
+ removed[seq_ln].type_name = CORBA::string_dup (++current_arg); // Skip the '-' sign.
+ }
+ }
+}
+
+void
+TAO_NS_Options_Parser::execute (CosNotification::QoSProperties& qos, ACE_Arg_Shifter& arg_shifter)
+{
+ const ACE_TCHAR *current_arg = 0;
+
+ if (arg_shifter.cur_arg_strncasecmp ("-ThreadPool") == 0) // -ThreadPool [-Threads static_threads] [-Priority default_priority]
+ {
+ arg_shifter.consume_arg ();
+
+ int static_threads = 1;
+ int default_priority = ACE_DEFAULT_THREAD_PRIORITY;
+
+ if (arg_shifter.cur_arg_strncasecmp ("-Threads") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ current_arg = arg_shifter.get_current ();
+
+ static_threads = ACE_OS::atoi (current_arg);
+
+ arg_shifter.consume_arg ();
+ }
+
+ if (arg_shifter.cur_arg_strncasecmp ("-Priority") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ current_arg = arg_shifter.get_current ();
+
+ default_priority = ACE_OS::atoi (current_arg);
+
+ arg_shifter.consume_arg ();
+ }
+
+ NotifyExt::ThreadPoolParams tp_params = {0, static_threads, 0, default_priority, 0, 0, 0 };
+ qos.length (1);
+ qos[0].name = CORBA::string_dup (NotifyExt::ThreadPool);
+ qos[0].value <<= tp_params;
+
+ } /* ThreadPool */
+ else if (arg_shifter.cur_arg_strncasecmp ("-ThreadPoolLanes") == 0) // -ThreadPoolLanes lane_count -Lane prio static_thr dy_thr
+ {
+ arg_shifter.consume_arg ();
+
+ current_arg = arg_shifter.get_current ();
+ int lanecount = ACE_OS::atoi (current_arg);
+
+ arg_shifter.consume_arg ();
+
+ NotifyExt::ThreadPoolLanesParams tpl_params;
+
+ tpl_params.stacksize = 0;
+ tpl_params.lanes.length (lanecount);
+ tpl_params.allow_borrowing = 0;
+ tpl_params.allow_request_buffering = 0;
+ tpl_params.max_buffered_requests = 0;
+ tpl_params.max_request_buffer_size = 0;
+
+ int l_index = 0;
+ //parse lane values ...
+ while (arg_shifter.is_anything_left ())
+ {
+ if (arg_shifter.cur_arg_strncasecmp ("-Lane") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ // read priority
+ tpl_params.lanes[l_index].lane_priority = ACE_OS::atoi (arg_shifter.get_current ());
+ arg_shifter.consume_arg ();
+
+ // static thread count
+ tpl_params.lanes[l_index].static_threads = ACE_OS::atoi (arg_shifter.get_current ());
+ arg_shifter.consume_arg ();
+
+ // dynamic thread count
+ tpl_params.lanes[l_index].dynamic_threads = ACE_OS::atoi (arg_shifter.get_current ());
+ arg_shifter.consume_arg ();
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "QoS Parser parsed lane: - %d, %d, %d\n",
+ tpl_params.lanes[l_index].lane_priority, tpl_params.lanes[l_index].static_threads, tpl_params.lanes[l_index].dynamic_threads));
+ l_index++;
+ }
+ else
+ break;
+ } /* while -- lane values */
+
+ qos.length (1);
+ qos[0].name = CORBA::string_dup (NotifyExt::ThreadPoolLanes);
+ qos[0].value <<= tpl_params;
+
+ } /* ThreadPoolLane */
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Options_Parser.h b/TAO/orbsvcs/tests/Notify/lib/Options_Parser.h
new file mode 100644
index 00000000000..c8eef3d078b
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Options_Parser.h
@@ -0,0 +1,48 @@
+/* -*- C++ -*- */
+/**
+ * @file Options_Parser.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_OPTIONS_PARSER_H
+#define TAO_NS_OPTIONS_PARSER_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/Arg_Shifter.h"
+#include "orbsvcs/CosNotificationC.h"
+
+/**
+ * @class TAO_NS_Options_Parser
+ *
+ * @brief Common Options parsing code.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Options_Parser
+{
+public:
+ /// Constuctor
+ TAO_NS_Options_Parser (void);
+
+ /// Destructor
+ ~TAO_NS_Options_Parser ();
+
+ /// Populates <qos> with options apecified in <arg_shifter>
+ void execute (CosNotification::QoSProperties& qos, ACE_Arg_Shifter& arg_shifter);
+
+ /// Populates <added> and <removed> with options apecified in <arg_shifter>
+ void execute (CosNotification::EventTypeSeq& added, CosNotification::EventTypeSeq& removed, ACE_Arg_Shifter& arg_shifter);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_OPTIONS_PARSER_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp
new file mode 100644
index 00000000000..d44b9bff0cf
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp
@@ -0,0 +1,184 @@
+// $Id$
+
+#include "Periodic_Consumer.h"
+
+#include "ace/Arg_Shifter.h"
+#include "ace/High_Res_Timer.h"
+#include "tao/debug.h"
+#include "orbsvcs/Time_Utilities.h"
+#include "StructuredEvent.h"
+#include "Task_Stats.h"
+#include "Task_Callback.h"
+
+ACE_RCSID(RT_Notify, TAO_NS_Periodic_Consumer, "$id$")
+
+TAO_NS_Periodic_Consumer::TAO_NS_Periodic_Consumer (void)
+ :count_ (0), max_count_ (-1), client_ (0)
+{
+}
+
+TAO_NS_Periodic_Consumer::~TAO_NS_Periodic_Consumer ()
+{
+}
+
+void
+TAO_NS_Periodic_Consumer::task_callback (TAO_NS_Task_Callback* client)
+{
+ this->client_ = client;
+}
+
+int
+TAO_NS_Periodic_Consumer::init_state (ACE_Arg_Shifter& arg_shifter)
+{
+ const ACE_TCHAR *current_arg = 0;
+
+ while (arg_shifter.is_anything_left ())
+ {
+ if ((current_arg = arg_shifter.get_the_parameter ("-Proxy")))
+ {
+ proxy_name_ = current_arg;
+ arg_shifter.consume_arg ();
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter ("-MaxCount")))
+ {
+ this->max_count_ = ACE_OS::atoi (current_arg);
+ arg_shifter.consume_arg ();
+
+ if (max_count_ == 0)
+ {
+ if (this->client_)
+ this->client_->done (this);
+ }
+ }
+ else
+ {
+ break;
+ }
+ } /* while */
+
+ return 0;
+}
+
+const char*
+TAO_NS_Periodic_Consumer::proxy_name (void)
+{
+ return this->proxy_name_.c_str ();
+}
+
+void
+TAO_NS_Periodic_Consumer::connect (CosNotifyChannelAdmin::StructuredProxyPushSupplier_ptr proxy, CosNotifyChannelAdmin::ProxyID proxy_id ACE_ENV_ARG_DECL)
+{
+ TAO_Notify_StructuredPushConsumer::connect (proxy, proxy_id ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Consumer::connect (CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin ACE_ENV_ARG_DECL)
+{
+ TAO_Notify_StructuredPushConsumer::connect (consumer_admin ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Consumer::subscription_change (CosNotification::EventTypeSeq &added, CosNotification::EventTypeSeq& removed ACE_ENV_ARG_DECL)
+{
+ // Let the user see what we're subscribed for,
+ ACE_DEBUG ((LM_DEBUG, "Calling Consumer subscription change: "));
+
+ CORBA::ULong i = 0;
+
+ for (; i < added.length (); ++i)
+ {
+ ACE_DEBUG ((LM_DEBUG, "+(%s,%s), ", added[i].domain_name.in (), added[i].type_name.in ()));
+ }
+ for (i = 0; i < removed.length (); ++i)
+ {
+ ACE_DEBUG ((LM_DEBUG, "-(%s,%s), ", removed[i].domain_name.in (), removed[i].type_name.in ()));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n"));
+
+ /// subscribe
+ CosNotifyChannelAdmin::StructuredProxyPushSupplier_ptr proxy_supplier = this->get_proxy_supplier ();
+
+ proxy_supplier->subscription_change (added, removed ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Consumer::push_structured_event (const CosNotification::StructuredEvent & notification ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosEventComm::Disconnected
+ ))
+{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
+ if (TAO_debug_level > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "(%P, %t)Consumer %s received %d event type (%s,%s) \n", this->name_.c_str (), this->count_,
+ notification.header.fixed_header.event_type.domain_name.in(),
+ notification.header.fixed_header.event_type.type_name.in()));
+ }
+
+ if (this->count_ == 0)
+ {
+ const CosNotification::PropertySeq& prop_seq = notification.header.variable_header;
+
+ for (CORBA::ULong i = 0; i < prop_seq.length (); ++i)
+ {
+ if (ACE_OS::strcmp (prop_seq[i].name.in (), "BaseTime") == 0)
+ {
+ TimeBase::TimeT base_time;
+ ACE_hrtime_t base_time_hrtime;
+
+ prop_seq[i].value >>= base_time;
+
+ ORBSVCS_Time::TimeT_to_hrtime (base_time_hrtime, base_time);
+ stats_.base_time (base_time_hrtime);
+ } // if max_count has not been already specified, get it from the supplier.
+ else if (this->max_count_ == -1 && ACE_OS::strcmp (prop_seq[i].name.in (), "MaxCount") == 0)
+ {
+ prop_seq[i].value >>= this->max_count_;
+ }
+ }
+
+ this->stats_.init (this->max_count_);
+ }
+
+ TimeBase::TimeT send_time, now;
+ ACE_hrtime_t send_time_hrtime;
+
+ notification.remainder_of_body >>= send_time;
+
+ ORBSVCS_Time::TimeT_to_hrtime (send_time_hrtime, send_time);
+
+ now = ACE_OS::gethrtime ();
+
+ stats_.sample (send_time_hrtime, now);
+
+ if (++this->count_ >= this->max_count_ )
+ {
+ stats_.end_time (ACE_OS::gethrtime ());
+
+ if (this->client_)
+ this->client_->done (this);
+ }
+}
+
+void
+TAO_NS_Periodic_Consumer::dump_stats (ACE_TCHAR* msg)
+{
+ char buf[BUFSIZ];
+ ACE_OS::sprintf (buf, "Consumer_%s_%d.dat", this->name_.c_str (), this->proxy_supplier_id_);
+
+ ACE_CString fname (buf);
+
+ ACE_OS::sprintf (buf,"(%s) Consumer Name = %s, Proxy ID = %d\n",
+ msg, this->name_.c_str (), this->proxy_supplier_id_);
+
+ stats_.dump_samples (fname.c_str (), buf,
+ ACE_High_Res_Timer::global_scale_factor ());
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.h b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.h
new file mode 100644
index 00000000000..2b48c1847da
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.h
@@ -0,0 +1,97 @@
+/* -*- C++ -*- */
+/**
+ * @file NS_Periodic_Consumer.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_PERIODIC_CONSUMER_H
+#define TAO_NS_PERIODIC_CONSUMER_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Notify_StructuredPushConsumer.h"
+#include "Task_Stats.h"
+
+class TAO_NS_Task_Callback;
+class ACE_Barrier;
+class ACE_Arg_Shifter;
+
+/**
+ * @class TAO_NS_Periodic_Consumer
+ *
+ * @brief Receives Structured events periodically.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Periodic_Consumer : public TAO_Notify_StructuredPushConsumer
+{
+public:
+ /// Constuctor
+ TAO_NS_Periodic_Consumer (void);
+
+ /// Destructor
+ ~TAO_NS_Periodic_Consumer ();
+
+ /// set the helper callback
+ void task_callback(TAO_NS_Task_Callback* client);
+
+ /// Init the state of this object.
+ int init_state (ACE_Arg_Shifter& arg_shifter);
+
+ /// Connect.
+ void connect (CosNotifyChannelAdmin::StructuredProxyPushSupplier_ptr proxy, CosNotifyChannelAdmin::ProxyID proxy_id ACE_ENV_ARG_DECL);
+
+ /// connect
+ void connect (CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin ACE_ENV_ARG_DECL);
+
+ /// Subscription change.
+ void subscription_change (CosNotification::EventTypeSeq &added, CosNotification::EventTypeSeq& removed ACE_ENV_ARG_DECL);
+
+ /// dump stats
+ void dump_stats (ACE_TCHAR* msg);
+
+ /// Get the name of the proxy
+ const char* proxy_name (void);
+
+protected:
+
+ virtual void push_structured_event (
+ const CosNotification::StructuredEvent & notification
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosEventComm::Disconnected
+ ));
+
+ /// = Data members.
+
+ /// The name of the proxy we connect to.
+ ACE_CString proxy_name_;
+
+ /// count of events received.
+ int count_;
+
+ /// max events expected.
+ /// Sometimes max count may not be the number of events that the supplier will send.
+ /// A filter might not allow some events to through. we can tell the consumer what to expect.
+ int max_count_;
+
+ /// Stats house keeping
+ Task_Stats stats_;
+
+ /// Client
+ TAO_NS_Task_Callback* client_;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_PERIODIC_CONSUMER_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer_Command.cpp
new file mode 100644
index 00000000000..aac14f86134
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer_Command.cpp
@@ -0,0 +1,317 @@
+// $Id$
+
+#include "Periodic_Consumer_Command.h"
+
+ACE_RCSID(lib, TAO_Periodic_Consumer_Command, "$id$")
+
+#include "LookupManager.h"
+#include "Name.h"
+#include "Periodic_Consumer.h"
+#include "Activation_Manager.h"
+#include "Options_Parser.h"
+#include "orbsvcs/NotifyExtC.h"
+
+TAO_NS_Periodic_Consumer_Command::TAO_NS_Periodic_Consumer_Command (void)
+: poa_ (TAO_NS_Name::root_poa), ifgop_ (CosNotifyChannelAdmin::OR_OP), id_ (0)
+{
+}
+
+TAO_NS_Periodic_Consumer_Command::~TAO_NS_Periodic_Consumer_Command ()
+{
+}
+
+const char*
+TAO_NS_Periodic_Consumer_Command::get_name (void)
+{
+ return TAO_NS_Periodic_Consumer_Command::name ();
+}
+
+const char*
+TAO_NS_Periodic_Consumer_Command::name (void)
+{
+ return TAO_NS_Name::periodic_consumer_command;
+}
+
+void
+TAO_NS_Periodic_Consumer_Command::init (ACE_Arg_Shifter& arg_shifter)
+{
+ if (arg_shifter.is_anything_left ())
+ {
+ /// -Create consumer_name admin_name -POA [POA_name] consumer_specific_options
+ if (arg_shifter.cur_arg_strncasecmp ("-Create") == 0)
+ {
+ this->command_ = CREATE;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ this->admin_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ // Is a POA name specified?
+ if (arg_shifter.cur_arg_strncasecmp ("-POA") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ this->poa_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+ }
+
+ if (arg_shifter.cur_arg_strncasecmp ("-Set_QoS") == 0) // -Set_QoS [Qos Options]
+ {
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser qos_parser;
+ qos_parser.execute (this->qos_, arg_shifter);
+ }
+
+ // create the consumer
+ TAO_NS_Periodic_Consumer* consumer = new TAO_NS_Periodic_Consumer ();
+
+ TAO_NS_Activation_Manager* act_mgr = 0;
+ LOOKUP_MANAGER->resolve (act_mgr);
+
+ {
+ ACE_DECLARE_NEW_CORBA_ENV;
+ act_mgr->_register (consumer, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+ consumer->init_state (arg_shifter);
+ consumer->TAO_Notify_StructuredPushConsumer::name (this->name_);
+
+ } /* -Create */
+ else if (arg_shifter.cur_arg_strncasecmp ("-Subscription") == 0) // -Subscription admin_name +added_type1 +-added_type2 ... -added_type3 -added_type4..
+ {
+ this->command_ = SUBSCRIPTION;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser options_parser;
+ options_parser.execute (this->added_, this->removed_, arg_shifter);
+ } /* Subscription */
+ else if (arg_shifter.cur_arg_strncasecmp ("-Disconnect") == 0) //
+ {
+ this->command_ = DISCONNECT;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+ } /* disconnect */
+ else if (arg_shifter.cur_arg_strncasecmp ("-Deactivate") == 0) //
+ {
+ this->command_ = DEACTIVATE;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+ } /* deactivate */
+ else if (arg_shifter.cur_arg_strncasecmp ("-Status") == 0) //
+ {
+ this->command_ = DUMP_STATE;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+ } /* -Dump */
+ else if (arg_shifter.cur_arg_strncasecmp ("-Set_QoS") == 0) // -Set_QoS ec_name [Qos Options]
+ {
+ this->command_ = SET_QOS;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser qos_parser;
+ qos_parser.execute (this->qos_, arg_shifter);
+ }
+ }
+}
+
+TAO_NS_Periodic_Consumer*
+TAO_NS_Periodic_Consumer_Command::consumer (void)
+{
+ TAO_NS_Activation_Manager* act_mgr = 0;
+
+ LOOKUP_MANAGER->resolve (act_mgr);
+
+ // Locate the consumer
+ TAO_NS_Periodic_Consumer* consumer = 0;
+
+ {
+ ACE_DECLARE_NEW_CORBA_ENV;
+ act_mgr->resolve (consumer, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+ }
+
+ if (consumer == 0)
+ ACE_DEBUG ((LM_DEBUG, "Consumer %s not found by Lookup Manager\n", this->name_.c_str ()));
+
+ return consumer;
+}
+
+void
+TAO_NS_Periodic_Consumer_Command::handle_set_qos (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::StructuredProxyPushSupplier_ptr proxy = this->consumer ()->get_proxy_supplier ();
+ proxy->set_qos (this->qos_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Consumer_Command::handle_create (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Periodic_Consumer* consumer = this->consumer ();
+ if (consumer == 0)
+ return;
+
+ // Get the POA
+ PortableServer::POA_var poa;
+ LOOKUP_MANAGER->resolve (poa, this->poa_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // set the POA
+ consumer->TAO_Notify_StructuredPushConsumer::init (poa.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Resolve the consumer admin
+ CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin;
+
+ LOOKUP_MANAGER->resolve (consumer_admin, this->admin_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ NotifyExt::ConsumerAdmin_var consumer_admin_ext;
+ consumer_admin_ext = NotifyExt::ConsumerAdmin::_narrow (consumer_admin.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // create the proxy supplier
+ CosNotifyChannelAdmin::ProxySupplier_var proxy_supplier =
+ consumer_admin_ext->obtain_notification_push_supplier_with_qos (CosNotifyChannelAdmin::STRUCTURED_EVENT
+ , this->id_, this->qos_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (proxy_supplier.in ()));
+
+ CosNotifyChannelAdmin::StructuredProxyPushSupplier_var s_proxy_supplier =
+ CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow (proxy_supplier.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (s_proxy_supplier.in ()));
+
+ // connect consumer to proxy, also activates the consumer as CORBA object in the POA specified.
+ consumer->connect (s_proxy_supplier.in (),this->id_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Register the proxy supplier.
+ LOOKUP_MANAGER->_register (s_proxy_supplier.in (), consumer->proxy_name () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "Consumer %s is connected\n", this->name_.c_str ()));
+}
+
+void
+TAO_NS_Periodic_Consumer_Command::handle_subscriptions (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Periodic_Consumer* consumer= this->consumer ();
+ if (consumer == 0)
+ return;
+
+ consumer->subscription_change (this->added_, this->removed_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Consumer_Command::handle_disconnect (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Periodic_Consumer* consumer= this->consumer ();
+ if (consumer == 0)
+ return;
+
+ consumer->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Consumer_Command::handle_deactivate (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Periodic_Consumer* consumer = this->consumer ();
+ if (consumer == 0)
+ return;
+
+ consumer->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Consumer_Command::handle_status (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Periodic_Consumer* consumer = this->consumer ();
+
+ if (consumer == 0)
+ return;
+
+ ACE_TRY
+ {
+ CORBA::Boolean not_exist = consumer->get_proxy_supplier ()->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (not_exist == 1)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Consumer %s, Proxy does not exist\n",this->name_.c_str ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Consumer %s, Proxy exists\n",this->name_.c_str ()));
+ }
+ }
+ ACE_CATCH(CORBA::TRANSIENT, ex)
+ {
+ ACE_PRINT_EXCEPTION (ex, "");
+ ACE_DEBUG ((LM_DEBUG, "Consumer %s is_equivanent transient exception.", this->name_.c_str ()));
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "");
+ ACE_DEBUG ((LM_DEBUG, "Consumeris_equivanent other exception.", this->name_.c_str ()));
+ }
+ ACE_ENDTRY;
+}
+
+void
+TAO_NS_Periodic_Consumer_Command::execute_i (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->command_ == CREATE)
+ {
+ this->handle_create (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == SUBSCRIPTION)
+ {
+ this->handle_subscriptions (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DISCONNECT)
+ {
+ this->handle_disconnect (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DEACTIVATE)
+ {
+ this->handle_deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DUMP_STATE)
+ {
+ this->handle_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == SET_QOS)
+ {
+ this->handle_set_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer_Command.h b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer_Command.h
new file mode 100644
index 00000000000..348fa69b0c4
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer_Command.h
@@ -0,0 +1,96 @@
+/* -*- C++ -*- */
+/**
+ * @file Periodic_Consumer_Command.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_PERIODICCONSUMER_COMMAND_H
+#define TAO_NS_PERIODICCONSUMER_COMMAND_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/SString.h"
+#include "orbsvcs/CosNotifyChannelAdminC.h"
+#include "Command.h"
+
+class TAO_NS_Periodic_Consumer;
+
+/**
+ * @class TAO_NS_Periodic_Consumer_Command
+ *
+ * @brief Options for Periodic Consumers.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Periodic_Consumer_Command : public TAO_NS_Command
+{
+public:
+ /// Constuctor
+ TAO_NS_Periodic_Consumer_Command (void);
+
+ /// Destructor
+ ~TAO_NS_Periodic_Consumer_Command ();
+ /// Parse args and populate options.
+ virtual void init (ACE_Arg_Shifter& arg_shifter);
+
+ /// Execute the command.
+ virtual void execute_i (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Name of object
+ virtual const char* get_name (void);
+ static const char* name (void);
+
+protected:
+ ///= Data Members
+ enum COMMAND
+ {
+ CREATE,
+ DESTROY,
+ SET_QOS,
+ SET_ADMIN,
+ SUBSCRIPTION,
+ DISCONNECT,
+ DEACTIVATE,
+ DUMP_STATE
+ };
+
+ ACE_CString name_;
+
+ ACE_CString admin_;
+
+ ACE_CString poa_;
+
+ CosNotifyChannelAdmin::InterFilterGroupOperator ifgop_;
+
+ CosNotifyChannelAdmin::ProxyID id_;
+
+ CosNotification::QoSProperties qos_;
+
+ // Subscription change
+ CosNotification::EventTypeSeq added_;
+ CosNotification::EventTypeSeq removed_;
+
+ ///= Methods
+ // Retreive the consumer.
+ TAO_NS_Periodic_Consumer* consumer (void);
+
+ ///= Handlers
+ void handle_create (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_subscriptions (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_disconnect (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_deactivate (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_status (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_set_qos (ACE_ENV_SINGLE_ARG_DECL);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_PERIODICCONSUMER_COMMAND_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp
new file mode 100644
index 00000000000..601a79836b8
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp
@@ -0,0 +1,350 @@
+// $Id$
+
+#include "Periodic_Supplier.h"
+
+#include "ace/Arg_Shifter.h"
+#include "ace/High_Res_Timer.h"
+#include "tao/debug.h"
+#include "tao/ORB_Core.h"
+#include "orbsvcs/Time_Utilities.h"
+#include "StructuredEvent.h"
+#include "Task_Stats.h"
+#include "Task_Callback.h"
+#include "LookupManager.h"
+#include "Priority_Mapping.h"
+
+ACE_RCSID(RT_Notify, TAO_NS_Periodic_Supplier, "$id$")
+
+TAO_NS_Periodic_Supplier::TAO_NS_Periodic_Supplier (void)
+ :barrier_ (0),
+ priority_ (0),
+ period_ (0),
+ exec_time_ (0),
+ phase_ (0),
+ iter_ (0),
+ load_ (0),
+ client_ (0)
+{
+}
+
+TAO_NS_Periodic_Supplier::~TAO_NS_Periodic_Supplier ()
+{
+}
+
+
+void
+TAO_NS_Periodic_Supplier::task_callback(TAO_NS_Task_Callback* client)
+{
+ this->client_ = client;
+}
+
+const char*
+TAO_NS_Periodic_Supplier::proxy_name (void)
+{
+ return this->proxy_name_.c_str ();
+}
+
+void
+TAO_NS_Periodic_Supplier::connect (CosNotifyChannelAdmin::StructuredProxyPushConsumer_ptr proxy, CosNotifyChannelAdmin::ProxyID proxy_id ACE_ENV_ARG_DECL)
+{
+ TAO_Notify_StructuredPushSupplier::connect (proxy, proxy_id ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Supplier::connect (CosNotifyChannelAdmin::SupplierAdmin_ptr supplier_admin ACE_ENV_ARG_DECL)
+{
+ TAO_Notify_StructuredPushSupplier::connect (supplier_admin ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+int
+TAO_NS_Periodic_Supplier::init_state (ACE_Arg_Shifter& arg_shifter)
+{
+ const ACE_TCHAR *current_arg = 0;
+
+ while (arg_shifter.is_anything_left ())
+ {
+ if ((current_arg = arg_shifter.get_the_parameter ("-Proxy")))
+ {
+ proxy_name_ = current_arg;
+ arg_shifter.consume_arg ();
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter ("-EventType")))
+ {
+ this->event_.type ("*", current_arg) ;
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-FilterLongData") == 0) // -FilterLongData name value
+ {
+ arg_shifter.consume_arg ();
+
+ ACE_CString name = arg_shifter.get_current ();
+
+ arg_shifter.consume_arg ();
+
+ CORBA::Long value = (CORBA::Long)ACE_OS::atoi (arg_shifter.get_current ());
+
+ arg_shifter.consume_arg ();
+
+ CORBA::Any buffer;
+ buffer <<= (CORBA::Long) value;
+
+ this->event_.filter (name.c_str (), buffer);
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter ("-Priority")))
+ {
+ priority_ = ACE_OS::atoi (current_arg);
+ arg_shifter.consume_arg ();
+
+ CORBA::Any buffer;
+ buffer <<= (CORBA::Short) this->priority_;
+ this->event_.qos (CosNotification::Priority, buffer);
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter ("-Period")))
+ {
+ period_ = ACE_OS::atoi (current_arg);
+ arg_shifter.consume_arg ();
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter ("-ExecTime")))
+ {
+ exec_time_ = ACE_OS::atoi (current_arg);
+ arg_shifter.consume_arg ();
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter ("-Phase")))
+ {
+ phase_ = ACE_OS::atoi (current_arg);
+ arg_shifter.consume_arg ();
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter ("-Iter")))
+ {
+ iter_ = ACE_OS::atoi (current_arg);
+ arg_shifter.consume_arg ();
+
+ if (stats_.init (iter_) == -1)
+ return -1;
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter ("-Load")))
+ {
+ load_ = ACE_OS::atoi (current_arg);
+ arg_shifter.consume_arg ();
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "parse Task unknown option %s\n",
+ arg_shifter.get_current ()));
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "event type %s, priority %d, period %duS, exec_time %duS, phase %duS, iter %d, load %d\n",
+ event_.type(), priority_, period_, exec_time_, phase_, iter_, load_));
+ break;
+ }
+ }
+ return 0;
+}
+
+int
+TAO_NS_Periodic_Supplier::activate (ACE_Barrier* barrier)
+{
+ barrier_ = barrier;
+
+ long flags = THR_NEW_LWP | THR_JOINABLE;
+
+ // Resolve the ORB
+ CORBA::ORB_var orb;
+ LOOKUP_MANAGER->resolve (orb);
+
+ flags |=
+ orb->orb_core ()->orb_params ()->sched_policy () |
+ orb->orb_core ()->orb_params ()->scope_policy ();
+
+ TAO_NS_Priority_Mapping* priority_mapping;
+ LOOKUP_MANAGER->resolve (priority_mapping);
+
+ CORBA::Short native_prio;
+
+ priority_mapping->to_native (this->priority_, native_prio);
+
+ // Become an active object.
+ if (this->ACE_Task <ACE_SYNCH>::activate (flags,
+ 1,
+ 0,
+ native_prio) == -1)
+ {
+ if (ACE_OS::last_error () == EPERM)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("Insufficient privilege to activate ACE_Task.\n")),
+ -1);
+ else
+ ACE_DEBUG ((LM_ERROR,
+ ACE_TEXT ("(%t) Task activation at priority %d failed, ")
+ ACE_TEXT ("exiting!\n%a"),
+ this->priority_,
+ -1));
+ }
+
+ ACE_DEBUG ((LM_ERROR, "Activated Periodic Supplier Thread at priority %d\n", this->priority_));
+
+ return 0;
+}
+
+int
+TAO_NS_Periodic_Supplier::svc (void)
+{
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "Thread_Task (%t) - wait\n"));
+
+ // First, wait for other threads.
+ this->barrier_->wait ();
+
+ // first thread here inits the Base_Time.
+ stats_.base_time (BASE_TIME::instance ()->base_time_);
+
+ // now wait till the phase_ period expires.
+ ACE_OS::sleep (ACE_Time_Value (0, phase_));
+
+ ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
+
+ ACE_hrtime_t before, after;
+
+ // populate event.
+ // send the base time and max count.
+ TimeBase::TimeT base_time;
+ ORBSVCS_Time::hrtime_to_TimeT (base_time,
+ BASE_TIME::instance ()->base_time_);
+
+ CORBA::Any buffer;
+ buffer <<= base_time;
+ this->event_.opt_header ("BaseTime", buffer);
+
+ buffer <<= this->iter_;
+ this->event_.opt_header ("MaxCount", buffer);
+
+ for (int i = 0; i < iter_ ; ++i)
+ {
+ before = ACE_OS::gethrtime ();
+
+ ORBSVCS_Time::hrtime_to_TimeT (base_time,
+ before);
+
+ CORBA::Any buffer;
+ buffer <<= base_time;
+
+ this->event_.payload (buffer);
+
+ ACE_TRY_NEW_ENV
+ {
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "(%P, %t) Supplier (%s) sending event #%d\n",
+ this->proxy_name_.c_str (), i));
+
+ this->send_event (this->event_.event () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCH (CORBA::UserException, ue)
+ {
+ ACE_PRINT_EXCEPTION (ue,
+ "Periodic supplier: error sending event. ");
+ break;
+ }
+ ACE_CATCH (CORBA::SystemException, se)
+ {
+ ACE_PRINT_EXCEPTION (se,
+ "Periodic supplier: error sending event. ");
+ break;
+ }
+ ACE_ENDTRY;
+
+ /*ACE_CATCHANY
+ {
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "Periodic supplier: error sending event %s\n"));
+ break;
+ }
+ ACE_ENDTRY;*/
+
+ after = ACE_OS::gethrtime ();
+
+ stats_.sample (before, after);
+
+ if (period_ != 0) // blast mode, no sleep.
+ {
+ // convert to microseconds
+#if !defined ACE_LACKS_LONGLONG_T
+
+ ACE_UINT32 elapsed_microseconds = ACE_UINT32((after - before) / gsf);
+
+#else /* ! ACE_LACKS_LONGLONG_T */
+
+ ACE_UINT32 elapsed_microseconds = (after - before) / gsf;
+
+#endif /* ! ACE_LACKS_LONGLONG_T */
+
+#if defined (ACE_WIN32)
+ elapsed_microseconds*=1000; // convert to uSec on Win32
+#endif /* ACE_WIN32 */
+
+ // did we miss any deadlines?
+
+ int missed =
+ (int)elapsed_microseconds > period_ ? elapsed_microseconds/period_ : 0;
+
+ long sleep_time = (missed + 1)*period_ ;
+ sleep_time -= elapsed_microseconds;
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "(%t) sleep time = %d\n", sleep_time));
+
+ ACE_Time_Value t_sleep (0, sleep_time);
+ ACE_OS::sleep (t_sleep);
+ } /* period != 0 */
+ } /* for */
+
+ stats_.end_time (ACE_OS::gethrtime ());
+
+ if (this->client_)
+ this->client_->done (this);
+
+ return 0;
+}
+
+void
+TAO_NS_Periodic_Supplier::dump_stats (ACE_TCHAR* msg)
+{
+ char buf[BUFSIZ];
+ //@@ supplier name is not printing!
+ ACE_OS::sprintf (buf, "Supplier_%s_%d_%s.dat", this->name_.c_str (), this->proxy_consumer_id_, this->event_.type ());
+
+ ACE_CString fname (buf);
+
+ ACE_OS::sprintf (buf,"(%s) : Supplier Name = %s, Proxy ID = %d, Event Type = %s, priority %d, period %ld, exec_time %ld, phase %ld, iter_ %d , load_ %d",
+ msg, this->name_.c_str (), this->proxy_consumer_id_, this->event_.type (), priority_, period_, exec_time_, phase_, iter_, load_);
+
+ stats_.dump_samples (fname.c_str (), buf,
+ ACE_High_Res_Timer::global_scale_factor ());
+}
+
+void
+TAO_NS_Periodic_Supplier::offer_change (CosNotification::EventTypeSeq &added, CosNotification::EventTypeSeq& removed ACE_ENV_ARG_DECL)
+{
+ // Let the user see what we're subscribed for,
+ ACE_DEBUG ((LM_DEBUG, "(%P, %t) Calling Supplier offer change: \n"));
+
+ CORBA::ULong i = 0;
+
+ for (; i < added.length (); ++i)
+ {
+ ACE_DEBUG ((LM_DEBUG, "+(%s,%s), ", added[i].domain_name.in (), added[i].type_name.in ()));
+ }
+ for (i = 0; i < removed.length (); ++i)
+ {
+ ACE_DEBUG ((LM_DEBUG, "-(%s,%s), ", removed[i].domain_name.in (), removed[i].type_name.in ()));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n"));
+
+ /// subscribe
+ CosNotifyChannelAdmin::StructuredProxyPushConsumer_ptr proxy_consumer = this->get_proxy_consumer ();
+
+ proxy_consumer->offer_change (added, removed ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h
new file mode 100644
index 00000000000..f492038635d
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h
@@ -0,0 +1,109 @@
+/* -*- C++ -*- */
+/**
+ * @file NS_Periodic_Supplier.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_PERIODIC_SUPPLIER_H
+#define TAO_NS_PERIODIC_SUPPLIER_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/Task.h"
+#include "Notify_StructuredPushSupplier.h"
+#include "Task_Stats.h"
+#include "StructuredEvent.h"
+
+class TAO_NS_Task_Callback;
+class ACE_Barrier;
+class ACE_Arg_Shifter;
+
+/**
+ * @class TAO_NS_Periodic_Supplier
+ *
+ * @brief A Periodic Supplier.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Periodic_Supplier : public TAO_Notify_StructuredPushSupplier, public ACE_Task <ACE_SYNCH>
+{
+public:
+ /// Constuctor
+ TAO_NS_Periodic_Supplier (void);
+
+ /// Destructor
+ ~TAO_NS_Periodic_Supplier ();
+
+ /// set the helper callback
+ void task_callback(TAO_NS_Task_Callback* client);
+
+ /// Init the state of this object.
+ int init_state (ACE_Arg_Shifter& arg_shifter);
+
+ /// Activate this task, synch on the given barrier.
+ virtual int activate (ACE_Barrier* barrier);
+
+ /// Connect.
+ void connect (CosNotifyChannelAdmin::StructuredProxyPushConsumer_ptr proxy, CosNotifyChannelAdmin::ProxyID proxy_id ACE_ENV_ARG_DECL);
+
+ /// Connect.
+ virtual void connect (CosNotifyChannelAdmin::SupplierAdmin_ptr supplier_admin ACE_ENV_ARG_DECL);
+
+ /// task svc
+ virtual int svc (void);
+
+ /// Dump stats.
+ void dump_stats (ACE_TCHAR* msg);
+
+ /// Offer change.
+ void offer_change (CosNotification::EventTypeSeq &added, CosNotification::EventTypeSeq& removed ACE_ENV_ARG_DECL);
+
+ /// Get the name of the proxy
+ const char* proxy_name (void);
+
+protected:
+ /// The name of the proxy we connect to.
+ ACE_CString proxy_name_;
+
+ /// All tasks synch at this barrier.
+ ACE_Barrier* barrier_;
+
+ /// The event to send.
+ TAO_NS_StructuredEvent event_;
+
+ /// The priority of this task.
+ CORBA::Short priority_;
+
+ /// Period
+ long period_;
+
+ /// Worst case exec. time.
+ unsigned long exec_time_;
+
+ /// Phase
+ long phase_;
+
+ /// Number of times to exec. Job
+ int iter_;
+
+ /// A load factor supplied to each Job.
+ int load_;
+
+ /// Stats house keeping
+ Task_Stats stats_;
+
+ /// Client
+ TAO_NS_Task_Callback* client_;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_PERIODIC_SUPPLIER_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier_Command.cpp
new file mode 100644
index 00000000000..2e991be0cd5
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier_Command.cpp
@@ -0,0 +1,310 @@
+// $Id$
+
+#include "Periodic_Supplier_Command.h"
+
+ACE_RCSID(lib, TAO_Periodic_Supplier_Command, "$id$")
+
+#include "LookupManager.h"
+#include "Name.h"
+#include "Periodic_Supplier.h"
+#include "Activation_Manager.h"
+#include "Options_Parser.h"
+#include "orbsvcs/NotifyExtC.h"
+
+TAO_NS_Periodic_Supplier_Command::TAO_NS_Periodic_Supplier_Command (void)
+: poa_ (TAO_NS_Name::root_poa), ifgop_ (CosNotifyChannelAdmin::OR_OP), id_ (0)
+{
+}
+
+TAO_NS_Periodic_Supplier_Command::~TAO_NS_Periodic_Supplier_Command ()
+{
+}
+
+const char*
+TAO_NS_Periodic_Supplier_Command::get_name (void)
+{
+ return TAO_NS_Periodic_Supplier_Command::name ();
+}
+
+const char*
+TAO_NS_Periodic_Supplier_Command::name (void)
+{
+ return TAO_NS_Name::periodic_supplier_command;
+}
+
+void
+TAO_NS_Periodic_Supplier_Command::init (ACE_Arg_Shifter& arg_shifter)
+{
+ if (arg_shifter.is_anything_left ())
+ {
+ /// -Create supplier_name admin_name -POA [POA_name] supplier_specific_options
+ if (arg_shifter.cur_arg_strncasecmp ("-Create") == 0)
+ {
+ this->command_ = CREATE;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ this->admin_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ // Is a POA name specified?
+ if (arg_shifter.cur_arg_strncasecmp ("-POA") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+ }
+
+ if (arg_shifter.cur_arg_strncasecmp ("-Set_QoS") == 0) // -Set_QoS [Qos Options]
+ {
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser qos_parser;
+ qos_parser.execute (this->qos_, arg_shifter);
+ }
+
+ // create the supplier
+ TAO_NS_Periodic_Supplier* supplier = new TAO_NS_Periodic_Supplier ();
+
+ supplier->init_state (arg_shifter);
+ supplier->TAO_Notify_StructuredPushSupplier::name (this->name_);
+
+ TAO_NS_Activation_Manager* act_mgr = 0;
+ LOOKUP_MANAGER->resolve (act_mgr);
+
+ ACE_DECLARE_NEW_CORBA_ENV;
+ act_mgr->_register (supplier, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ } /* -Create */
+ else if (arg_shifter.cur_arg_strncasecmp ("-Offer") == 0) // -Offer supplier_name +added_type1 +-added_type2 ... -added_type3 -added_type4..
+ {
+ this->command_ = OFFER;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser options_parser;
+ options_parser.execute (this->added_, this->removed_, arg_shifter);
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Disconnect") == 0) //
+ {
+ this->command_ = DISCONNECT;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+ } /* disconnect */
+ else if (arg_shifter.cur_arg_strncasecmp ("-Deactivate") == 0) //
+ {
+ this->command_ = DEACTIVATE;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+ } /* deactivate */
+ else if (arg_shifter.cur_arg_strncasecmp ("-Status") == 0) //
+ {
+ this->command_ = DUMP_STATE;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+ } /* -Dump */
+ else if (arg_shifter.cur_arg_strncasecmp ("-Set_QoS") == 0) // -Set_QoS ec_name [Qos Options]
+ {
+ this->command_ = SET_QOS;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser qos_parser;
+ qos_parser.execute (this->qos_, arg_shifter);
+ }
+ } /* if */
+}
+
+TAO_NS_Periodic_Supplier*
+TAO_NS_Periodic_Supplier_Command::supplier (void)
+{
+ TAO_NS_Activation_Manager* act_mgr = 0;
+ LOOKUP_MANAGER->resolve (act_mgr);
+
+ // Locate the supplier
+ TAO_NS_Periodic_Supplier* supplier = 0;
+
+ ACE_DECLARE_NEW_CORBA_ENV;
+ act_mgr->resolve (supplier, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (supplier == 0)
+ ACE_DEBUG ((LM_DEBUG, "Supplier %s not found by Lookup Manager\n", this->name_.c_str ()));
+
+ return supplier;
+}
+
+void
+TAO_NS_Periodic_Supplier_Command::handle_create (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Periodic_Supplier* supplier = this->supplier ();
+ if (supplier == 0)
+ return;
+
+ // Get the POA
+ PortableServer::POA_var poa;
+ LOOKUP_MANAGER->resolve (poa);
+
+ // set the POA
+ supplier->TAO_Notify_StructuredPushSupplier::init (poa.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Resolve the supplier admin
+ CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin;
+
+ LOOKUP_MANAGER->resolve (supplier_admin, this->admin_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ NotifyExt::SupplierAdmin_var supplier_admin_ext;
+ supplier_admin_ext = NotifyExt::SupplierAdmin::_narrow (supplier_admin.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // create the proxy consumer
+ CosNotifyChannelAdmin::ProxyConsumer_var proxy_consumer =
+ supplier_admin_ext->obtain_notification_push_consumer_with_qos (CosNotifyChannelAdmin::STRUCTURED_EVENT
+ , this->id_, this->qos_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (proxy_consumer.in ()));
+
+ CosNotifyChannelAdmin::StructuredProxyPushConsumer_var s_proxy_consumer =
+ CosNotifyChannelAdmin::StructuredProxyPushConsumer::_narrow (proxy_consumer.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (s_proxy_consumer.in ()));
+
+ // connect supplier to proxy, also activates the Supplier as CORBA object in the POA specified.
+ supplier->connect (s_proxy_consumer.in (),this->id_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Register the proxy consumer.
+ LOOKUP_MANAGER->_register (s_proxy_consumer.in (), supplier->proxy_name () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "Supplier %s is connected\n", this->name_.c_str ()));
+}
+
+void
+TAO_NS_Periodic_Supplier_Command::handle_offers (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Periodic_Supplier* supplier = this->supplier ();
+ if (supplier == 0)
+ return;
+
+ supplier->offer_change (this->added_, this->removed_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Supplier_Command::handle_disconnect (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Periodic_Supplier* supplier= this->supplier ();
+ if (supplier == 0)
+ return;
+
+ supplier->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Supplier_Command::handle_deactivate (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Periodic_Supplier* supplier = this->supplier ();
+ if (supplier == 0)
+ return;
+
+ supplier->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Supplier_Command::handle_status (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_NS_Periodic_Supplier* supplier = this->supplier ();
+
+ if (supplier == 0)
+ return;
+
+ ACE_TRY
+ {
+ CORBA::Boolean not_exist = supplier->get_proxy_consumer ()->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (not_exist == 1)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Supplier %s, Proxy does not exist\n",this->name_.c_str ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Supplier %s, Proxy exists\n",this->name_.c_str ()));
+ }
+ }
+ ACE_CATCH(CORBA::TRANSIENT, ex)
+ {
+ ACE_PRINT_EXCEPTION (ex, "");
+ ACE_DEBUG ((LM_DEBUG, "Supplier %s is_equivanent transient exception.", this->name_.c_str ()));
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "");
+ ACE_DEBUG ((LM_DEBUG, "Supplieris_equivanent other exception.", this->name_.c_str ()));
+ }
+ ACE_ENDTRY;
+}
+
+void
+TAO_NS_Periodic_Supplier_Command::handle_set_qos (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::StructuredProxyPushConsumer_ptr proxy = this->supplier ()->get_proxy_consumer ();
+ proxy->set_qos (this->qos_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_Periodic_Supplier_Command::execute_i (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->command_ == CREATE)
+ {
+ this->handle_create (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == OFFER)
+ {
+ this->handle_offers (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DISCONNECT)
+ {
+ this->handle_disconnect (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DEACTIVATE)
+ {
+ this->handle_deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DUMP_STATE)
+ {
+ this->handle_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == SET_QOS)
+ {
+ this->handle_set_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier_Command.h b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier_Command.h
new file mode 100644
index 00000000000..4d6c87a01f3
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier_Command.h
@@ -0,0 +1,97 @@
+/* -*- C++ -*- */
+/**
+ * @file PeriodicSupplier_Command.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_PERIODICSUPPLIER_COMMAND_H
+#define TAO_NS_PERIODICSUPPLIER_COMMAND_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/SString.h"
+#include "orbsvcs/CosNotifyChannelAdminC.h"
+#include "Command.h"
+
+class TAO_NS_Periodic_Supplier;
+
+/**
+ * @class TAO_NS_Periodic_Supplier_Command
+ *
+ * @brief Command for Periodic Suppliers.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Periodic_Supplier_Command : public TAO_NS_Command
+{
+public:
+ /// Constuctor
+ TAO_NS_Periodic_Supplier_Command (void);
+
+ /// Destructor
+ ~TAO_NS_Periodic_Supplier_Command ();
+
+ /// Parse args and populate options.
+ virtual void init (ACE_Arg_Shifter& arg_shifter);
+
+ /// Execute the command.
+ virtual void execute_i (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Name of object
+ virtual const char* get_name (void);
+ static const char* name (void);
+
+protected:
+
+ enum COMMAND
+ {
+ CREATE,
+ DESTROY,
+ SET_QOS,
+ SET_ADMIN,
+ OFFER,
+ DISCONNECT,
+ DEACTIVATE,
+ DUMP_STATE
+ };
+
+ ACE_CString name_;
+
+ ACE_CString admin_;
+
+ ACE_CString poa_;
+
+ CosNotifyChannelAdmin::InterFilterGroupOperator ifgop_;
+
+ CosNotifyChannelAdmin::ProxyID id_;
+
+ CosNotification::QoSProperties qos_;
+
+ // Offer change
+ CosNotification::EventTypeSeq added_;
+ CosNotification::EventTypeSeq removed_;
+
+ ///= Methods
+ // Retreive the suppliers.
+ TAO_NS_Periodic_Supplier* supplier (void);
+
+ ///= Handlers
+ void handle_create (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_offers (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_disconnect (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_deactivate (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_status (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_set_qos (ACE_ENV_SINGLE_ARG_DECL);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_PERIODICSUPPLIER_COMMAND_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Priority_Mapping.cpp b/TAO/orbsvcs/tests/Notify/lib/Priority_Mapping.cpp
new file mode 100644
index 00000000000..00aea6b8315
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Priority_Mapping.cpp
@@ -0,0 +1,25 @@
+// $Id$
+
+#include "Priority_Mapping.h"
+
+ACE_RCSID(lib, Priority_Mapping, "$id$")
+
+TAO_NS_Priority_Mapping::~TAO_NS_Priority_Mapping (void)
+{
+}
+
+CORBA::Boolean
+TAO_NS_Priority_Mapping::to_native (CORBA::Short corba_priority,
+ CORBA::Short &native_priority)
+{
+ native_priority = corba_priority;
+ return 1;
+}
+
+CORBA::Boolean
+TAO_NS_Priority_Mapping::to_CORBA (CORBA::Short native_priority,
+ CORBA::Short &corba_priority)
+{
+ corba_priority = native_priority;
+ return 1;
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Priority_Mapping.h b/TAO/orbsvcs/tests/Notify/lib/Priority_Mapping.h
new file mode 100644
index 00000000000..1c40eaa300c
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Priority_Mapping.h
@@ -0,0 +1,45 @@
+/* -*- C++ -*- */
+/**
+ * @file Priority_Mapping.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_PRIORITY_MAPPING_H
+#define TAO_NS_PRIORITY_MAPPING_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/corba.h"
+
+/**
+ * @class TAO_NS_Priority_Mapping
+ *
+ * @brief A default Priority mapping. simply returns the same number.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Priority_Mapping
+{
+public:
+ /// The destructor
+ virtual ~TAO_NS_Priority_Mapping (void);
+
+ virtual CORBA::Boolean
+ to_native (CORBA::Short corba_priority,
+ CORBA::Short &native_priority);
+ virtual CORBA::Boolean
+ to_CORBA (CORBA::Short native_priority,
+ CORBA::Short &corba_priority);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_PRIORITY_MAPPING_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_Application_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/RT_Application_Command.cpp
new file mode 100644
index 00000000000..9baa9d2df49
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_Application_Command.cpp
@@ -0,0 +1,35 @@
+// $Id$
+
+#include "RT_Application_Command.h"
+
+ACE_RCSID(lib, TAO_RT_Application_Command, "$id$")
+
+#include "LookupManager.h"
+#include "RT_Priority_Mapping.h"
+
+TAO_NS_RT_Application_Command::TAO_NS_RT_Application_Command (void)
+{
+}
+
+TAO_NS_RT_Application_Command::~TAO_NS_RT_Application_Command ()
+{
+}
+
+void
+TAO_NS_RT_Application_Command::handle_init (ACE_ENV_SINGLE_ARG_DECL)
+{
+ // Call the Base class.
+ TAO_NS_Application_Command::handle_init (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CORBA::ORB_var orb;
+
+ LOOKUP_MANAGER->resolve (orb);
+
+ TAO_NS_RT_Priority_Mapping* mapping = new TAO_NS_RT_Priority_Mapping ();
+
+ mapping->init (orb.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ LOOKUP_MANAGER->_register (mapping);
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_Application_Command.h b/TAO/orbsvcs/tests/Notify/lib/RT_Application_Command.h
new file mode 100644
index 00000000000..12a911085c9
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_Application_Command.h
@@ -0,0 +1,43 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_Application_Command.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_APPLICATION_COMMAND_H
+#define TAO_NS_RT_APPLICATION_COMMAND_H
+#include "ace/pre.h"
+
+#include "rt_notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Application_Command.h"
+
+/**
+ * @class TAO_NS_RT_Application_Command
+ *
+ * @brief
+ *
+ */
+class TAO_RT_NOTIFY_TEST_Export TAO_NS_RT_Application_Command : public TAO_NS_Application_Command
+{
+public:
+ /// Constuctor
+ TAO_NS_RT_Application_Command (void);
+
+ /// Destructor
+ ~TAO_NS_RT_Application_Command ();
+
+ virtual void handle_init (ACE_ENV_SINGLE_ARG_DECL);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_RT_APPLICATION_COMMAND_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_Factories_Define.cpp b/TAO/orbsvcs/tests/Notify/lib/RT_Factories_Define.cpp
new file mode 100644
index 00000000000..ce58d0f2167
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_Factories_Define.cpp
@@ -0,0 +1,25 @@
+// $Id$
+#include "Factories_Define.h"
+
+ACE_RCSID(lib, TAO_NS_Factories_Define, "$id$")
+
+#include "rt_notify_test_export.h"
+#include "Name.h"
+#include "Command_Factory_T.h"
+#include "RT_POA_Command.h"
+#include "RT_Application_Command.h"
+
+TAO_NS_COMMAND_FACTORY_DEFINE(TAO_RT_NOTIFY_TEST,TAO_NS_RT_POA_Command,TAO_NS_Name::poa_command_factory);
+TAO_NS_COMMAND_FACTORY_DEFINE(TAO_RT_NOTIFY_TEST,TAO_NS_RT_Application_Command,TAO_NS_Name::application_command_factory);
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class TAO_NS_Command_Factory_T<TAO_NS_RT_POA_Command>;
+template class TAO_NS_Command_Factory_T<TAO_NS_RT_Application_Command>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate TAO_NS_Command_Factory_T<TAO_NS_RT_POA_Command>
+#pragma instantiate TAO_NS_Command_Factory_T<TAO_NS_RT_Application_Command>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_POA_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/RT_POA_Command.cpp
new file mode 100644
index 00000000000..6173a25a1c2
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_POA_Command.cpp
@@ -0,0 +1,380 @@
+// $Id$
+
+#include "RT_POA_Command.h"
+
+ACE_RCSID(lib, TAO_RT_POA_Command, "$id$")
+
+#include "tao/debug.h"
+#include "LookupManager.h"
+#include "Name.h"
+
+TAO_NS_RT_POA_Command::TAO_NS_RT_POA_Command (void)
+ :priority_model_ (RTCORBA::CLIENT_PROPAGATED)
+ , server_priority_ (0)
+ , thread_pool_static_threads_ (0)
+ , thread_pool_default_priority_ (0)
+{
+}
+
+TAO_NS_RT_POA_Command::~TAO_NS_RT_POA_Command ()
+{
+}
+
+const char*
+TAO_NS_RT_POA_Command::get_name (void)
+{
+ return TAO_NS_RT_POA_Command::name ();
+}
+
+const char*
+TAO_NS_RT_POA_Command::name (void)
+{
+ return TAO_NS_Name::poa_command;
+}
+
+void
+TAO_NS_RT_POA_Command::init (ACE_Arg_Shifter& arg_shifter)
+{
+ const ACE_TCHAR *current_arg = 0;
+
+ if (arg_shifter.is_anything_left ())
+ {
+ if (arg_shifter.cur_arg_strncasecmp ("-Create") == 0)
+ {
+ this->command_ = CREATE;
+
+ arg_shifter.consume_arg ();
+
+ this->POA_name_ = arg_shifter.get_current ();
+
+ arg_shifter.consume_arg ();
+
+ while (arg_shifter.is_anything_left ())
+ {
+ if ((current_arg = arg_shifter.get_the_parameter ("-PriorityModel")))
+ {
+ if (arg_shifter.cur_arg_strncasecmp ("CLIENT") == 0)
+ priority_model_ = RTCORBA::CLIENT_PROPAGATED;
+ else
+ priority_model_ = RTCORBA::SERVER_DECLARED;
+ arg_shifter.consume_arg ();
+
+ server_priority_ = ACE_OS::atoi (current_arg);
+ arg_shifter.consume_arg ();
+
+ continue;
+ }
+ // -Lanes lane-count -Lane prio statc_thr dyn_thr
+ if ((current_arg = arg_shifter.get_the_parameter ("-Lanes")))
+ {
+ int lanecount = ACE_OS::atoi (current_arg);
+ lanes_.length (lanecount);
+ arg_shifter.consume_arg ();
+
+ int l_index = 0;
+ //parse lane values ...
+ while (arg_shifter.is_anything_left ())
+ {
+ if (arg_shifter.cur_arg_strncasecmp ("-Lane") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ // read priority
+ lanes_[l_index].lane_priority = ACE_OS::atoi (arg_shifter.get_current ());
+ arg_shifter.consume_arg ();
+
+ // static thread count
+ lanes_[l_index].static_threads = ACE_OS::atoi (arg_shifter.get_current ());
+ arg_shifter.consume_arg ();
+
+ // dynamic thread count
+ lanes_[l_index].dynamic_threads = ACE_OS::atoi (arg_shifter.get_current ());
+ arg_shifter.consume_arg ();
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "POA Create: lane parsed - %d, %d, %d\n",
+ lanes_[l_index].lane_priority, lanes_[l_index].static_threads, lanes_[l_index].dynamic_threads));
+ l_index++;
+ }
+ else
+ break;
+ } /* while -- lane values */
+
+ continue;
+ } /* if -Lanes */
+
+ if ((current_arg = arg_shifter.get_the_parameter ("-Bands")))
+ {
+ int bandcount = ACE_OS::atoi (current_arg);
+ bands_.length (bandcount);
+ arg_shifter.consume_arg ();
+
+ int b_index = 0;
+ //parse band values ...
+ while (arg_shifter.is_anything_left ())
+ {
+ if (arg_shifter.cur_arg_strncasecmp ("-Band") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ // read low
+ bands_[b_index].low = ACE_OS::atoi (arg_shifter.get_current ());
+ arg_shifter.consume_arg ();
+
+ // read high
+ bands_[b_index].high = ACE_OS::atoi (arg_shifter.get_current ());
+ arg_shifter.consume_arg ();
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "POA Create: band parsed - %d, %d \n",
+ bands_[b_index].low, bands_[b_index].high));
+ b_index++;
+ }
+ else
+ break;
+ } /* while -- Band values */
+
+ continue;
+ } /* if -Bands */
+
+ // -ThreadPool thread_pool_count thread_pool_default_priority
+ if (arg_shifter.cur_arg_strncasecmp ("-ThreadPool") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ current_arg = arg_shifter.get_current ();
+ this->thread_pool_static_threads_ = ACE_OS::atoi (current_arg);
+
+ arg_shifter.consume_arg ();
+
+ current_arg = arg_shifter.get_current ();
+ this->thread_pool_default_priority_ = ACE_OS::atoi (current_arg);
+
+ arg_shifter.consume_arg ();
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "ThreadPool parsed - static threads = %d, prio = %d \n",
+ this->thread_pool_static_threads_, this->thread_pool_default_priority_));
+
+ continue;
+ } /* ThreadPool */
+
+ // none of the matched so break out...
+ break;
+ } /* while */
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Destroy") == 0)
+ {
+ this->command_ = DESTROY;
+
+ arg_shifter.consume_arg ();
+
+ this->POA_name_ = arg_shifter.get_current ();
+
+ arg_shifter.consume_arg ();
+ }
+ } /* if */
+}
+
+void
+TAO_NS_RT_POA_Command::execute_i (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->command_ == CREATE)
+ {
+ // Resolve ORB
+ CORBA::ORB_var orb;
+
+ LOOKUP_MANAGER->resolve (orb);
+
+ // Resolve RTORB
+ CORBA::Object_var object =
+ orb->resolve_initial_references ("RTORB"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ RTCORBA::RTORB_var rt_orb =
+ RTCORBA::RTORB::_narrow (object.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Resolve parent poa.
+ PortableServer::POA_var parent_poa;
+
+ LOOKUP_MANAGER->resolve (parent_poa);
+
+ // Create the POA.
+ this->create (rt_orb.in (), parent_poa.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "Created RT POA %s\n", this->POA_name_.c_str ()));
+ }
+ else if (this->command_ == DESTROY)
+ {
+ PortableServer::POA_var poa;
+
+ LOOKUP_MANAGER->resolve (poa, this->POA_name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ poa->destroy (1,0 ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "Destroyed RT POA %s\n", this->POA_name_.c_str ()));
+ }
+}
+
+void
+TAO_NS_RT_POA_Command::create (RTCORBA::RTORB_ptr rt_orb, PortableServer::POA_ptr parent_poa ACE_ENV_ARG_DECL)
+{
+ /*
+ lanes bands priomodel
+
+ if lanes create lanespolicy
+ if bands create bands policy
+
+ if lanes and bands , policy_list_length = 3
+ else
+ if lanes policy_list_length = 2
+ else
+ if threadpool and bands , policy_list_length = 3
+ else
+ if threadpool policy_list_length = 2
+ else
+ if bands policy_list_length = 2
+ else
+ policy_list_length = 1
+
+ */
+
+ CORBA::Policy_var priority_model_policy;
+ CORBA::Policy_var lanes_policy;
+ CORBA::Policy_var thread_pool_policy;
+ CORBA::Policy_var bands_policy;
+
+ // Create a priority model policy.
+ priority_model_policy =
+ rt_orb->create_priority_model_policy (priority_model_,
+ server_priority_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (lanes_.length () != 0)
+ {
+ // Create a thread-pool.
+ CORBA::ULong stacksize = 0;
+ CORBA::Boolean allow_request_buffering = 0;
+ CORBA::ULong max_buffered_requests = 0;
+ CORBA::ULong max_request_buffer_size = 0;
+ CORBA::Boolean allow_borrowing = 0;
+ // CORBA::ULong static_threads = 1;
+ // CORBA::ULong dynamic_threads = 0;
+
+ // Create the thread-pool.
+ RTCORBA::ThreadpoolId threadpool_id =
+ rt_orb->create_threadpool_with_lanes (stacksize,
+ lanes_,
+ allow_borrowing,
+ allow_request_buffering,
+ max_buffered_requests,
+ max_request_buffer_size
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+
+ // Create a thread-pool policy.
+ lanes_policy =
+ rt_orb->create_threadpool_policy (threadpool_id
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ }
+ else if (thread_pool_static_threads_ > 0)
+ {
+ CORBA::ULong stacksize = 0;
+ CORBA::ULong static_threads = this->thread_pool_static_threads_;
+ CORBA::ULong dynamic_threads = 0;
+ RTCORBA::Priority default_priority = this->thread_pool_default_priority_;
+ CORBA::Boolean allow_request_buffering = 0;
+ CORBA::ULong max_buffered_requests = 0;
+ CORBA::ULong max_request_buffer_size = 0;
+
+ // Create the thread-pool.
+ RTCORBA::ThreadpoolId threadpool_id =
+ rt_orb->create_threadpool (stacksize,
+ static_threads,
+ dynamic_threads,
+ default_priority,
+ allow_request_buffering,
+ max_buffered_requests,
+ max_request_buffer_size
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ thread_pool_policy =
+ rt_orb->create_threadpool_policy (threadpool_id
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+ if (bands_.length () != 0)
+ {
+ // Create a bands policy.
+ bands_policy =
+ rt_orb->create_priority_banded_connection_policy (this->bands_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+ CORBA::PolicyList poa_policy_list;
+
+ if (lanes_.length () == 0 && thread_pool_static_threads_ == 0 && bands_.length () == 0)
+ {
+ poa_policy_list.length (1);
+ poa_policy_list[0] = priority_model_policy;
+ }
+ else if (lanes_.length () == 0 && thread_pool_static_threads_ == 0 && bands_.length () != 0)
+ {
+ poa_policy_list.length (2);
+ poa_policy_list[0] = priority_model_policy;
+ poa_policy_list[1] = bands_policy;
+ }
+ else if (lanes_.length () == 0 && thread_pool_static_threads_ > 0 && bands_.length () == 0)
+ {
+ poa_policy_list.length (2);
+ poa_policy_list[0] = priority_model_policy;
+ poa_policy_list[1] = thread_pool_policy;
+ }
+ else if (lanes_.length () == 0 && thread_pool_static_threads_ == 1 && bands_.length () != 0)
+ {
+ poa_policy_list.length (3);
+ poa_policy_list[0] = priority_model_policy;
+ poa_policy_list[1] = bands_policy;
+ poa_policy_list[2] = thread_pool_policy;
+ }
+ else if (lanes_.length () != 0 && thread_pool_static_threads_ == 0 && bands_.length () == 0)
+ {
+ poa_policy_list.length (2);
+ poa_policy_list[0] = priority_model_policy;
+ poa_policy_list[1] = lanes_policy;
+ }
+ else if (lanes_.length () != 0 && thread_pool_static_threads_ == 0 && bands_.length () != 0)
+ {
+ poa_policy_list.length (3);
+ poa_policy_list[0] = priority_model_policy;
+ poa_policy_list[1] = bands_policy;
+ poa_policy_list[2] = lanes_policy;
+ }
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "creating POA %s\n", POA_name_.c_str ()));
+
+ // Get the POA Manager.
+ PortableServer::POAManager_var poa_manager =
+ parent_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ parent_poa->create_POA (POA_name_.c_str (),
+ poa_manager.in (),
+ poa_policy_list
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_POA_Command.h b/TAO/orbsvcs/tests/Notify/lib/RT_POA_Command.h
new file mode 100644
index 00000000000..45201517443
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_POA_Command.h
@@ -0,0 +1,76 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_POA_Command.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_POA_COMMAND_H
+#define TAO_NS_RT_POA_COMMAND_H
+#include "ace/pre.h"
+
+#include "rt_notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/ORB.h"
+#include "tao/RTCORBA/RTCORBA.h"
+#include "tao/PortableServer/PortableServer.h"
+#include "Command.h"
+
+/**
+ * @class TAO_NS_RT_POA_Command
+ *
+ * @brief Command for managing RTCORBA POAs.
+ *
+ */
+class TAO_RT_NOTIFY_TEST_Export TAO_NS_RT_POA_Command : public TAO_NS_Command
+{
+public:
+ /// Constuctor
+ TAO_NS_RT_POA_Command (void);
+
+ /// Destructor
+ ~TAO_NS_RT_POA_Command ();
+
+ /// Parse args and populate options.
+ /// The arg_shifter options are read in the following manner: -Create <name> -PriorityModel <CLIENT|SERVER> <priority> -Lanes <count> (-Lane <priority> ,<static_threads> <dynamic_threads>)* -Bands <count> (-Band <low> <high>)*
+ virtual void init (ACE_Arg_Shifter& arg_shifter);
+
+ /// Execute the command.
+ virtual void execute_i (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Get the command name.
+ virtual const char* get_name (void);
+ static const char* name (void);
+
+protected:
+ /// Create the POA with the params parsed.
+ void create (RTCORBA::RTORB_ptr rt_orb, PortableServer::POA_ptr parent_poa ACE_ENV_ARG_DECL);
+
+ enum COMMAND
+ {
+ CREATE,
+ DESTROY,
+ DUMP_STATE
+ };
+
+ ACE_CString POA_name_;
+
+ RTCORBA::PriorityModel priority_model_;
+ RTCORBA::Priority server_priority_;
+ RTCORBA::ThreadpoolLanes lanes_;
+ RTCORBA::PriorityBands bands_;
+
+ CORBA::ULong thread_pool_static_threads_;
+ RTCORBA::Priority thread_pool_default_priority_;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_RT_POA_COMMAND_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_Priority_Mapping.cpp b/TAO/orbsvcs/tests/Notify/lib/RT_Priority_Mapping.cpp
new file mode 100644
index 00000000000..1f085d97709
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_Priority_Mapping.cpp
@@ -0,0 +1,40 @@
+// $Id$
+
+#include "RT_Priority_Mapping.h"
+
+ACE_RCSID(lib, RT_Priority_Mapping, "$id$")
+
+#include "LookupManager.h"
+
+TAO_NS_RT_Priority_Mapping::~TAO_NS_RT_Priority_Mapping (void)
+{
+}
+
+void
+TAO_NS_RT_Priority_Mapping::init (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var object = orb->resolve_initial_references ("PriorityMappingManager"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ RTCORBA::PriorityMappingManager_var mapping_manager =
+ RTCORBA::PriorityMappingManager::_narrow (object.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->priority_mapping_ = mapping_manager->mapping ();
+}
+
+CORBA::Boolean
+TAO_NS_RT_Priority_Mapping::to_native (RTCORBA::Priority corba_priority,
+ RTCORBA::NativePriority &native_priority)
+{
+ return this->priority_mapping_->to_native (corba_priority, native_priority);
+}
+
+CORBA::Boolean
+TAO_NS_RT_Priority_Mapping::to_CORBA (RTCORBA::NativePriority native_priority,
+ RTCORBA::Priority &corba_priority)
+{
+ return this->priority_mapping_->to_CORBA (native_priority, corba_priority);
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_Priority_Mapping.h b/TAO/orbsvcs/tests/Notify/lib/RT_Priority_Mapping.h
new file mode 100644
index 00000000000..ccee7f37f76
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_Priority_Mapping.h
@@ -0,0 +1,54 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_Priority_Mapping.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_PRIORITY_MAPPING_H
+#define TAO_NS_RT_PRIORITY_MAPPING_H
+#include "ace/pre.h"
+
+#include "rt_notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Priority_Mapping.h"
+#include "tao/RTCORBA/Priority_Mapping_Manager.h"
+
+/**
+ * @class TAO_NS_RT_Priority_Mapping
+ *
+ * @brief Delegates to a RTCORBA::PriorityMapping
+ *
+ */
+class TAO_RT_NOTIFY_TEST_Export TAO_NS_RT_Priority_Mapping : public TAO_NS_Priority_Mapping
+{
+public:
+ /// The destructor
+ virtual ~TAO_NS_RT_Priority_Mapping (void);
+
+ /// Init the Mapping manager.
+ void init (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL);
+
+ virtual CORBA::Boolean
+ to_native (CORBA::Short corba_priority,
+ CORBA::Short &native_priority);
+ virtual CORBA::Boolean
+ to_CORBA (CORBA::Short native_priority,
+ CORBA::Short &corba_priority);
+
+protected:
+
+ /// The Priority Mapping helper.
+ RTCORBA::PriorityMapping *priority_mapping_;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_RT_PRIORITY_MAPPING_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_Test_Filter.cpp b/TAO/orbsvcs/tests/Notify/lib/RT_Test_Filter.cpp
new file mode 100644
index 00000000000..30cbf6f982e
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_Test_Filter.cpp
@@ -0,0 +1,298 @@
+// $Id$
+
+#include "RT_Test_Filter.h"
+
+ACE_RCSID(Notify, TAO_RT_Test_Filter, "$id$")
+
+#include "tao/debug.h"
+#include "tao/ORB_Core.h"
+#include "tao/RTCORBA/Thread_Pool.h"
+#include "tao/PortableServer/POA.h"
+
+TAO_NS_RT_Test_Filter::TAO_NS_RT_Test_Filter (void)
+ : expected_pool_id_ (0)
+ , expected_lane_id_ (0)
+{
+}
+
+TAO_NS_RT_Test_Filter::~TAO_NS_RT_Test_Filter ()
+{
+
+}
+
+char*
+TAO_NS_RT_Test_Filter::constraint_grammar (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ return CORBA::string_dup ("ETCL");
+}
+
+
+CosNotifyFilter::ConstraintInfoSeq*
+TAO_NS_RT_Test_Filter::add_constraints (const CosNotifyFilter::ConstraintExpSeq& constraint_list
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::InvalidConstraint
+ ))
+{
+ const char* PoolId_prefix = "PoolId = ";
+ size_t poolId_index = ACE_OS::strlen (PoolId_prefix);
+
+ const char* LaneId_prefix = "LaneId = ";
+ size_t laneId_index = ACE_OS::strlen (LaneId_prefix);
+
+ for (CORBA::ULong i = 0; i < constraint_list.length (); ++i)
+ {
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "(%t) received = %s\n", constraint_list[i].constraint_expr.in ()));
+
+ // Check Poolid
+ if (ACE_OS::strncmp (constraint_list[i].constraint_expr.in (), PoolId_prefix, poolId_index) == 0)
+ {
+ if (ACE_OS::strlen (constraint_list[i].constraint_expr) > poolId_index)
+ {
+ this->expected_pool_id_ = ACE_OS::atoi (&constraint_list[i].constraint_expr[poolId_index]);
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "(%t) Parsed Pool Id = %d\n", this->expected_pool_id_));
+ }
+ }
+ // Check Poolid
+ else if (ACE_OS::strncmp (constraint_list[i].constraint_expr.in (), LaneId_prefix, laneId_index) == 0)
+ {
+ if (ACE_OS::strlen (constraint_list[i].constraint_expr) > laneId_index)
+ {
+ this->expected_lane_id_ = ACE_OS::atoi (&constraint_list[i].constraint_expr[laneId_index]);
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "(%t) Parsed Lane Id = %d\n", this->expected_lane_id_));
+ }
+ }
+ }
+
+ // Create the list that goes out.
+ CosNotifyFilter::ConstraintInfoSeq* infoseq_ptr;
+ ACE_NEW_THROW_EX (infoseq_ptr,
+ CosNotifyFilter::ConstraintInfoSeq (0),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (0);
+
+ return infoseq_ptr;
+}
+
+void
+TAO_NS_RT_Test_Filter::modify_constraints (const CosNotifyFilter::ConstraintIDSeq & /*del_list*/,
+ const CosNotifyFilter::ConstraintInfoSeq & /*modify_list*/
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::InvalidConstraint,
+ CosNotifyFilter::ConstraintNotFound
+ ))
+{
+
+}
+
+CosNotifyFilter::ConstraintInfoSeq*
+TAO_NS_RT_Test_Filter::get_constraints (const CosNotifyFilter::ConstraintIDSeq & /*id_list*/
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosNotifyFilter::ConstraintNotFound))
+{
+ return 0;
+}
+
+CosNotifyFilter::ConstraintInfoSeq *
+TAO_NS_RT_Test_Filter::get_all_constraints (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return 0;
+}
+
+void
+TAO_NS_RT_Test_Filter::remove_all_constraints (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+
+}
+
+void
+TAO_NS_RT_Test_Filter::destroy (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK;
+
+ PortableServer::POA_var my_POA = _default_POA ();
+
+ PortableServer::ObjectId_var refTemp = my_POA->servant_to_id (this);
+
+ my_POA->deactivate_object (refTemp.in ());
+}
+
+CORBA::Boolean
+TAO_NS_RT_Test_Filter::match (const CORBA::Any & /*filterable_data */
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosNotifyFilter::UnsupportedFilterableData))
+{
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
+ 0);
+}
+
+CORBA::Boolean
+TAO_NS_RT_Test_Filter::match_structured (const CosNotification::StructuredEvent & notification
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosNotifyFilter::UnsupportedFilterableData))
+{
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "TAO_NS_RT_Test_Filter (%x) ::match_structured (%t)\n", this));
+
+ TAO_POA *poa = this->_default_POA ()->_tao_poa_downcast();
+
+ ACE_ASSERT (poa != 0);
+
+ CORBA::ORB_ptr orb = poa->orb_core ().orb ();
+
+ CORBA::Object_var object =
+ orb->resolve_initial_references ("RTCurrent"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ RTCORBA::Current_var current =
+ RTCORBA::Current::_narrow (object.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ // Get the ORB_Core's TSS resources.
+ TAO_ORB_Core_TSS_Resources *tss =
+ orb->orb_core ()->get_tss_resources ();
+
+ // Get the lane attribute in TSS.
+ TAO_Thread_Lane *lane =
+ (TAO_Thread_Lane *) tss->lane_;
+
+ // Check if the event carries a Priority.
+ const CosNotification::PropertySeq& prop_seq = notification.header.variable_header;
+
+ for (CORBA::ULong i = 0; i < prop_seq.length (); ++i)
+ {
+ if (ACE_OS::strcmp (prop_seq[i].name.in (), CosNotification::Priority) == 0)
+ {
+ CORBA::Short event_priority = 0;
+ prop_seq[i].value >>= event_priority;
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,"(%P, %t) Event at %d priority, expected at %d\n",
+ current->the_priority (), event_priority));
+
+ if (current->the_priority () != event_priority)
+ {
+ ACE_DEBUG ((LM_DEBUG,"(%t) Error: Event at %d priority, expected at %d\n",
+ current->the_priority (), event_priority));
+ }
+
+ break;
+ }
+ }
+
+ if (lane)
+ {
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ " (%t) Expected (pool = %d; lane = %d), Received (pool = %d; lane = %d)\n",
+ this->expected_pool_id_,
+ this->expected_lane_id_,
+ lane->pool ().id (),
+ lane->id ()));
+
+ if (this->expected_lane_id_ != lane->id ()
+ ||
+ this->expected_pool_id_ != lane->pool ().id ())
+ ACE_DEBUG ((LM_DEBUG,
+ " (%t) Error: Expected (pool = %d; lane = %d), Received (pool = %d; lane = %d)\n",
+ this->expected_pool_id_,
+ this->expected_lane_id_,
+ lane->pool ().id (),
+ lane->id ()));
+ }
+ else
+ {
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ " (%t)(default thread pool) Expected (pool = %d; lane = %d)\n",
+ this->expected_pool_id_,
+ this->expected_lane_id_));
+
+ if (this->expected_lane_id_ != 0
+ ||
+ this->expected_pool_id_ != 0)
+ ACE_DEBUG ((LM_DEBUG,
+ " (%t) Error: (default thread pool) Expected (pool = %d; lane = %d)\n",
+ this->expected_pool_id_,
+ this->expected_lane_id_));
+ }
+
+ return 1;
+}
+
+CORBA::Boolean
+TAO_NS_RT_Test_Filter::match_typed (
+ const CosNotification::PropertySeq & /* filterable_data */
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC (( CORBA::SystemException,
+ CosNotifyFilter::UnsupportedFilterableData))
+{
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
+ 0);
+}
+
+CosNotifyFilter::CallbackID
+TAO_NS_RT_Test_Filter::attach_callback (
+ CosNotifyComm::NotifySubscribe_ptr /* callback */
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
+ 0);
+}
+
+void
+TAO_NS_RT_Test_Filter::detach_callback (
+ CosNotifyFilter::CallbackID /* callback */
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosNotifyFilter::CallbackNotFound))
+{
+ ACE_THROW (CORBA::NO_IMPLEMENT ());
+}
+
+CosNotifyFilter::CallbackIDSeq *
+TAO_NS_RT_Test_Filter::get_callbacks (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
+ 0);
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_Test_Filter.h b/TAO/orbsvcs/tests/Notify/lib/RT_Test_Filter.h
new file mode 100644
index 00000000000..311221bc5c7
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_Test_Filter.h
@@ -0,0 +1,137 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_Test_Filter.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_Test_FILTER_H
+#define TAO_NS_RT_Test_FILTER_H
+#include "ace/pre.h"
+
+#include "rt_test_filter_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "orbsvcs/CosNotifyFilterS.h"
+
+#if defined(_MSC_VER)
+#if (_MSC_VER >= 1200)
+#pragma warning(push)
+#endif /* _MSC_VER >= 1200 */
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+/**
+ * @class TAO_RT_Test_Filter
+ *
+ * @brief Implementation of CosNotifyFilter::Filter servant.
+ *
+ */
+class TAO_RT_Test_Filter_Export TAO_NS_RT_Test_Filter : public POA_CosNotifyFilter::Filter, public PortableServer::RefCountServantBase
+{
+public:
+ /// Constuctor
+ TAO_NS_RT_Test_Filter (void);
+
+ /// Destructor
+ ~TAO_NS_RT_Test_Filter ();
+
+protected:
+ virtual char * constraint_grammar (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual CosNotifyFilter::ConstraintInfoSeq * add_constraints (const CosNotifyFilter::ConstraintExpSeq & constraint_list ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::InvalidConstraint
+ ));
+
+ virtual void modify_constraints (const CosNotifyFilter::ConstraintIDSeq & del_list,
+ const CosNotifyFilter::ConstraintInfoSeq & modify_list
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::InvalidConstraint,
+ CosNotifyFilter::ConstraintNotFound
+ ));
+
+ virtual CosNotifyFilter::ConstraintInfoSeq * get_constraints (const CosNotifyFilter::ConstraintIDSeq & id_list ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::ConstraintNotFound
+ ));
+
+ virtual CosNotifyFilter::ConstraintInfoSeq * get_all_constraints (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual void remove_all_constraints (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual CORBA::Boolean match (const CORBA::Any & filterable_data ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::UnsupportedFilterableData
+ ));
+
+ virtual CORBA::Boolean match_structured (const CosNotification::StructuredEvent & filterable_data ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::UnsupportedFilterableData
+ ));
+
+ virtual CORBA::Boolean match_typed (const CosNotification::PropertySeq & filterable_data ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::UnsupportedFilterableData
+ ));
+
+ virtual CosNotifyFilter::CallbackID attach_callback (CosNotifyComm::NotifySubscribe_ptr callback ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual void detach_callback (CosNotifyFilter::CallbackID callback ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::CallbackNotFound
+ ));
+
+ virtual CosNotifyFilter::CallbackIDSeq * get_callbacks (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+protected:
+
+ /// Lock to serialize access to data members.
+ TAO_SYNCH_MUTEX lock_;
+
+ CORBA::ULong expected_pool_id_;
+ CORBA::ULong expected_lane_id_;
+};
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#include "ace/post.h"
+#endif /* TAO_RT_Test_FILTER_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_Test_FilterFactory.cpp b/TAO/orbsvcs/tests/Notify/lib/RT_Test_FilterFactory.cpp
new file mode 100644
index 00000000000..00e1e8254d4
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_Test_FilterFactory.cpp
@@ -0,0 +1,81 @@
+// $Id$
+
+#include "RT_Test_FilterFactory.h"
+
+ACE_RCSID(Notify, TAO_RT_Test_FilterFactory, "$id$")
+
+#include "RT_Test_Filter.h"
+#include "tao/debug.h"
+
+TAO_NS_RT_Test_FilterFactory::TAO_NS_RT_Test_FilterFactory (void)
+{
+}
+
+TAO_NS_RT_Test_FilterFactory::~TAO_NS_RT_Test_FilterFactory ()
+{
+}
+
+CosNotifyFilter::FilterFactory_ptr
+TAO_NS_RT_Test_FilterFactory::create (PortableServer::POA_var& filter_poa ACE_ENV_ARG_DECL)
+{
+ this->filter_poa_ = filter_poa; // save the filter poa.
+
+ PortableServer::ServantBase_var servant_var (this);
+
+ return _this (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+CosNotifyFilter::Filter_ptr
+TAO_NS_RT_Test_FilterFactory::create_filter (const char *constraint_grammar ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::InvalidGrammar
+ ))
+{
+ if (TAO_debug_level)
+ ACE_DEBUG ((LM_DEBUG, "(%P, %t)In TAO_NS_RT_Test_FilterFactory::create_filter\n"));
+
+ // @@: change to "ExTCL" later.
+ if (ACE_OS::strcmp (constraint_grammar, "TCL") != 0 &&
+ ACE_OS::strcmp (constraint_grammar, "ETCL") != 0 &&
+ ACE_OS::strcmp (constraint_grammar, "EXTENDED_TCL") != 0)
+ ACE_THROW_RETURN (CosNotifyFilter::InvalidGrammar (), 0);
+
+
+ // Create the RefCounted servant.
+ TAO_NS_RT_Test_Filter* filter = 0;
+
+ ACE_NEW_THROW_EX (filter,
+ TAO_NS_RT_Test_Filter (),
+ CORBA::NO_MEMORY ());
+
+ PortableServer::ServantBase_var filter_var (filter);
+
+ PortableServer::ObjectId_var oid =
+ this->filter_poa_->activate_object (filter
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CosNotifyFilter::Filter::_nil ());
+
+ CORBA::Object_var obj =
+ this->filter_poa_->id_to_reference (oid.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CosNotifyFilter::Filter::_nil ());
+
+ return CosNotifyFilter::Filter::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+}
+
+CosNotifyFilter::MappingFilter_ptr
+TAO_NS_RT_Test_FilterFactory::create_mapping_filter (const char * /*constraint_grammar*/,
+ const CORBA::Any & /*default_value*/
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::InvalidGrammar
+ ))
+{
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosNotifyFilter::MappingFilter::_nil ());
+}
+
+ACE_FACTORY_DEFINE (TAO_RT_Test_Filter, TAO_NS_RT_Test_FilterFactory)
diff --git a/TAO/orbsvcs/tests/Notify/lib/RT_Test_FilterFactory.h b/TAO/orbsvcs/tests/Notify/lib/RT_Test_FilterFactory.h
new file mode 100644
index 00000000000..8d275197eb0
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/RT_Test_FilterFactory.h
@@ -0,0 +1,84 @@
+/* -*- C++ -*- */
+/**
+ * @file RT_Test_FilterFactory.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_RT_Test_FILTERFACTORY_H
+#define TAO_NS_RT_Test_FILTERFACTORY_H
+#include "ace/pre.h"
+
+#include "rt_test_filter_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "orbsvcs/CosNotifyFilterS.h"
+#include "orbsvcs/Notify/FilterFactory.h"
+
+#if defined(_MSC_VER)
+#if (_MSC_VER >= 1200)
+#pragma warning(push)
+#endif /* _MSC_VER >= 1200 */
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+/**
+ * @class TAO_NS_RT_Test_FilterFactory
+ *
+ * @brief
+ *
+ */
+class TAO_RT_Test_Filter_Export TAO_NS_RT_Test_FilterFactory : public virtual PortableServer::RefCountServantBase
+ , public virtual POA_CosNotifyFilter::FilterFactory
+ , public TAO_NS_FilterFactory
+{
+public:
+ /// Constuctor
+ TAO_NS_RT_Test_FilterFactory (void);
+
+ /// Destructor
+ ~TAO_NS_RT_Test_FilterFactory ();
+
+ ///= TAO_NS_FilterFactory methods.
+
+ virtual CosNotifyFilter::FilterFactory_ptr create (PortableServer::POA_var& filter_poa ACE_ENV_ARG_DECL);
+
+ ///= CosNotifyFilter::FilterFactory methods
+
+ virtual CosNotifyFilter::Filter_ptr create_filter (const char * constraint_grammar
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::InvalidGrammar
+ ));
+
+ virtual CosNotifyFilter::MappingFilter_ptr create_mapping_filter (const char * constraint_grammar,
+ const CORBA::Any & default_value
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ CosNotifyFilter::InvalidGrammar
+ ));
+
+protected:
+ /// The POA in which to activate the Filters.
+ PortableServer::POA_var filter_poa_;
+};
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+ACE_FACTORY_DECLARE (TAO_RT_Test_Filter, TAO_NS_RT_Test_FilterFactory)
+
+#include "ace/post.h"
+#endif /* TAO_NS_RT_Test_FILTERFACTORY_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/StructuredEvent.cpp b/TAO/orbsvcs/tests/Notify/lib/StructuredEvent.cpp
new file mode 100644
index 00000000000..a19c1b84a5c
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/StructuredEvent.cpp
@@ -0,0 +1,88 @@
+// $Id$
+
+#include "StructuredEvent.h"
+
+ACE_RCSID(RT_Notify, TAO_NS_StructuredEvent, "$id$")
+
+TAO_NS_StructuredEvent::TAO_NS_StructuredEvent (void)
+{
+}
+
+TAO_NS_StructuredEvent::~TAO_NS_StructuredEvent ()
+{
+}
+
+TAO_NS_StructuredEvent::TAO_NS_StructuredEvent (const char* name)
+{
+ event_.header.fixed_header.event_name = CORBA::string_dup(name);
+}
+
+TAO_NS_StructuredEvent::TAO_NS_StructuredEvent (const char* domain, const char* type)
+{
+ event_.header.fixed_header.event_type.domain_name = CORBA::string_dup(domain);
+ event_.header.fixed_header.event_type.type_name = CORBA::string_dup(type);
+}
+
+TAO_NS_StructuredEvent::TAO_NS_StructuredEvent (const char* name, const char* domain, const char* type)
+{
+ event_.header.fixed_header.event_name = CORBA::string_dup(name);
+ event_.header.fixed_header.event_type.domain_name = CORBA::string_dup(domain);
+ event_.header.fixed_header.event_type.type_name = CORBA::string_dup(type);
+}
+
+void
+TAO_NS_StructuredEvent::name (const char* name)
+{
+ event_.header.fixed_header.event_name = CORBA::string_dup(name);
+}
+
+void
+TAO_NS_StructuredEvent::type (const char* domain, const char* type)
+{
+ event_.header.fixed_header.event_type.domain_name = CORBA::string_dup(domain);
+ event_.header.fixed_header.event_type.type_name = CORBA::string_dup(type);
+}
+
+const char*
+TAO_NS_StructuredEvent::type (void)
+{
+ return event_.header.fixed_header.event_type.type_name;
+}
+
+void
+TAO_NS_StructuredEvent::opt_header (const char* name, CORBA::Any& value)
+{
+ CosNotification::PropertySeq& opt = event_.header.variable_header;
+ opt.length (opt.length () + 1);
+
+ opt[opt.length () - 1].name = CORBA::string_dup (name);
+ opt[opt.length () - 1].value = value;
+}
+
+void
+TAO_NS_StructuredEvent::filter (const char* name, CORBA::Any& value)
+{
+ CosNotification::PropertySeq& filter = event_.filterable_data;
+ filter.length (filter.length () + 1);
+
+ filter[filter.length () - 1].name = CORBA::string_dup (name);
+ filter[filter.length () - 1].value = value;
+}
+
+void
+TAO_NS_StructuredEvent::qos (const char* name, CORBA::Any& value)
+{
+ this->opt_header (name, value);
+}
+
+void
+TAO_NS_StructuredEvent::payload (CORBA::Any& value)
+{
+ event_.remainder_of_body = value;
+}
+
+CosNotification::StructuredEvent&
+TAO_NS_StructuredEvent::event (void)
+{
+ return this->event_;
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/StructuredEvent.h b/TAO/orbsvcs/tests/Notify/lib/StructuredEvent.h
new file mode 100644
index 00000000000..adfdd5af164
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/StructuredEvent.h
@@ -0,0 +1,67 @@
+/* -*- C++ -*- */
+/**
+ * @file NS_StructuredEvent.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_STRUCTUREDEVENT_H
+#define TAO_NS_STRUCTUREDEVENT_H
+
+#include "ace/pre.h"
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "orbsvcs/CosNotificationC.h"
+
+/**
+ * @class TAO_NS_StructuredEvent
+ *
+ * @brief Helper class to populate a CosNotification::StructuredEvent.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_StructuredEvent
+{
+public:
+ /// Constuctor
+ TAO_NS_StructuredEvent (void);
+ TAO_NS_StructuredEvent (const char* name);
+ TAO_NS_StructuredEvent (const char* domain, const char* type);
+ TAO_NS_StructuredEvent (const char* name, const char* domain, const char* type);
+
+ /// Destructor
+ ~TAO_NS_StructuredEvent ();
+
+ void name (const char* name);
+ void type (const char* domain, const char* type);
+
+ const char* type (void);
+
+ /// add <name,value> to optional header sequence.
+ void opt_header (const char* name, CORBA::Any& value);
+
+ /// add <name,value> to filterable body sequence.
+ void filter (const char* name, CORBA::Any& value);
+
+ /// add <name,value> to variable header sequence.
+ void qos (const char* name, CORBA::Any& value);
+
+ /// The remainder_of_body
+ void payload (CORBA::Any& value);
+
+ /// access the underlying event.
+ CosNotification::StructuredEvent& event (void);
+
+private:
+ CosNotification::StructuredEvent event_;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_STRUCTUREDEVENT_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/SupplierAdmin_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/SupplierAdmin_Command.cpp
new file mode 100644
index 00000000000..eaea60be1c8
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/SupplierAdmin_Command.cpp
@@ -0,0 +1,175 @@
+// $Id$
+
+#include "SupplierAdmin_Command.h"
+
+ACE_RCSID(lib, TAO_SupplierAdmin_Command, "$id$")
+
+#include "LookupManager.h"
+#include "Name.h"
+#include "Options_Parser.h"
+
+TAO_NS_SupplierAdmin_Command::TAO_NS_SupplierAdmin_Command (void)
+: ifgop_ (CosNotifyChannelAdmin::OR_OP), id_ (0)
+{
+}
+
+TAO_NS_SupplierAdmin_Command::~TAO_NS_SupplierAdmin_Command ()
+{
+}
+
+const char*
+TAO_NS_SupplierAdmin_Command::get_name (void)
+{
+ return TAO_NS_SupplierAdmin_Command::name ();
+}
+
+const char*
+TAO_NS_SupplierAdmin_Command::name (void)
+{
+ return TAO_NS_Name::supplier_admin_command;
+}
+
+void
+TAO_NS_SupplierAdmin_Command::init (ACE_Arg_Shifter& arg_shifter)
+{
+ if (arg_shifter.is_anything_left ())
+ {
+ /// -Create sa_name factory_name
+ if (arg_shifter.cur_arg_strncasecmp ("-Create") == 0)
+ {
+ this->command_ = CREATE;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ this->factory_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ if (arg_shifter.cur_arg_strncasecmp ("-AND_OP") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ this->ifgop_ = CosNotifyChannelAdmin::AND_OP;
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-OR_OP") == 0)
+ {
+ arg_shifter.consume_arg ();
+
+ this->ifgop_ = CosNotifyChannelAdmin::OR_OP;
+ }
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-Offer") == 0)
+ // -Subscription admin_name +added_type1 +-added_type2 ... -added_type3 -added_type4..
+ {
+ this->command_ = OFFER;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser options_parser;
+ options_parser.execute (this->added_, this->removed_, arg_shifter);
+ } // Subscription
+ else if (arg_shifter.cur_arg_strncasecmp ("-Set_QoS") == 0) // -Set_QoS ec_name [Qos Options]
+ {
+ this->command_ = SET_QOS;
+
+ arg_shifter.consume_arg ();
+
+ this->name_ = arg_shifter.get_current ();
+
+ arg_shifter.consume_arg ();
+
+ TAO_NS_Options_Parser qos_parser;
+ qos_parser.execute (this->qos_, arg_shifter);
+ }
+ } /* if */
+}
+
+void
+TAO_NS_SupplierAdmin_Command::handle_create (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::EventChannel_var ec;
+
+ LOOKUP_MANAGER->resolve (ec, this->factory_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // create supplier admin
+ CosNotifyChannelAdmin::SupplierAdmin_var sa =
+ ec->new_for_suppliers (this->ifgop_,
+ this->id_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ LOOKUP_MANAGER->_register (sa.in(), this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_SupplierAdmin_Command::handle_offers (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::SupplierAdmin_var admin;
+
+ LOOKUP_MANAGER->resolve (admin, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Let the user see what we're subscribed for,
+ ACE_DEBUG ((LM_DEBUG, "Calling SupplierAdmin offer_change : "));
+
+ CORBA::ULong i = 0;
+
+ for (; i < added_.length (); ++i)
+ {
+ ACE_DEBUG ((LM_DEBUG, "+(%s,%s), ", added_[i].domain_name.in (), added_[i].type_name.in ()));
+ }
+ for (i = 0; i < removed_.length (); ++i)
+ {
+ ACE_DEBUG ((LM_DEBUG, "-(%s,%s), ", removed_[i].domain_name.in (), removed_[i].type_name.in ()));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n"));
+
+ admin->offer_change (this->added_, this->removed_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_SupplierAdmin_Command::handle_status (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+}
+
+void
+TAO_NS_SupplierAdmin_Command::handle_set_qos (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::SupplierAdmin_var admin;
+
+ LOOKUP_MANAGER->resolve (admin, this->name_.c_str () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ admin->set_qos (this->qos_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_NS_SupplierAdmin_Command::execute_i (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (this->command_ == CREATE)
+ {
+ this->handle_create (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == OFFER)
+ {
+ this->handle_offers (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == SET_QOS)
+ {
+ this->handle_set_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ else if (this->command_ == DUMP_STATE)
+ {
+ this->handle_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/SupplierAdmin_Command.h b/TAO/orbsvcs/tests/Notify/lib/SupplierAdmin_Command.h
new file mode 100644
index 00000000000..7318f212f55
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/SupplierAdmin_Command.h
@@ -0,0 +1,85 @@
+/* -*- C++ -*- */
+/**
+ * @file SupplierAdmin_Command.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_SUPPLIERADMIN_COMMAND_H
+#define TAO_NS_SUPPLIERADMIN_COMMAND_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/SString.h"
+#include "orbsvcs/CosNotifyChannelAdminC.h"
+#include "Command.h"
+
+/**
+ * @class TAO_NS_SupplierAdmin_Command
+ *
+ * @brief Command for Supplier Admins.
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_SupplierAdmin_Command : public TAO_NS_Command
+{
+public:
+ /// Constuctor
+ TAO_NS_SupplierAdmin_Command (void);
+
+ /// Destructor
+ ~TAO_NS_SupplierAdmin_Command ();
+
+ /// Parse args and populate options.
+ virtual void init (ACE_Arg_Shifter& arg_shifter);
+
+ /// Execute the command.
+ virtual void execute_i (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Name of object
+ virtual const char* get_name (void);
+ static const char* name (void);
+
+protected:
+
+ enum COMMAND
+ {
+ CREATE,
+ OFFER,
+ DESTROY,
+ SET_QOS,
+ SET_ADMIN,
+ DUMP_STATE
+ };
+
+ ACE_CString name_;
+
+ ACE_CString factory_;
+
+ CosNotifyChannelAdmin::InterFilterGroupOperator ifgop_;
+
+ CosNotifyChannelAdmin::AdminID id_;
+
+ CosNotification::QoSProperties qos_;
+
+ // Subscription change
+ CosNotification::EventTypeSeq added_;
+ CosNotification::EventTypeSeq removed_;
+
+ /// = Handlers
+ void handle_create (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_offers (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_status (ACE_ENV_SINGLE_ARG_DECL);
+ void handle_set_qos (ACE_ENV_SINGLE_ARG_DECL);
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_SUPPLIERADMIN_COMMAND_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests.dsp b/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests.dsp
index be724c153dd..130ff3591d5 100644
--- a/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests.dsp
+++ b/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests.dsp
@@ -6,84 +6,62 @@
CFG=TAO_NotifyTests DLL - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
!MESSAGE NMAKE /f "TAO_NotifyTests.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "TAO_NotifyTests.mak" CFG="TAO_NotifyTests DLL - Win32 Debug"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "TAO_NotifyTests DLL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "TAO_NotifyTests DLL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
-MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "TAO_NotifyTests DLL - Win32 Release"
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "."
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /Gm /GX /Zi /Od /I "../../../" /I "../../../../" /I "../../../../../" /D "WIN32" /D "_WINDOWS" /D "TAO_NOTIFY_TEST_BUILD_DLL" /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
+# ADD CPP /nologo /W3 /GX /O2 /MD /Zi /Ob2 /GR /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D NDEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_NOTIFY_TEST_BUILD_DLL=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
+# ADD BSC32 /nologo /o".\TAO_NotifyTests.bsc"
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 TAO_ETCL.lib TAO_ETCL.lib TAO_CosNotification.lib TAO_CosNaming.lib TAO_CosEvent.lib TAO_PortableServer.lib TAO.lib ace.lib /nologo /dll /machine:I386 /out:"..\..\..\..\..\bin\TAO_NotifyTests.dll" /pdbtype:sept /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\orbsvcs\ETCL" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
-# SUBTRACT LINK32 /pdb:none /incremental:yes /debug
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_CosNotification.lib TAO_ETCL.lib TAO_CosNaming.lib TAO_Svc_Utils.lib TAO_IORTable.lib TAO_DynamicAny.lib TAO_PortableServer.lib TAO.lib ACE.lib /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\tao\DynamicAny" /libpath:"..\..\..\..\tao\IORTable" /libpath:"..\..\..\..\orbsvcs\orbsvcs\ETCL" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3 /subsystem:windows /dll /machine:I386 /out:"..\..\..\..\..\bin\TAO_NotifyTests.dll"
!ELSEIF "$(CFG)" == "TAO_NotifyTests DLL - Win32 Debug"
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
+# PROP Output_Dir "."
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../" /I "../../../../" /I "../../../../../" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "TAO_NOTIFY_TEST_BUILD_DLL" /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /MDd /GR /Gy /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D _DEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_NOTIFY_TEST_BUILD_DLL=1 /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
+# ADD BSC32 /nologo /o".\TAO_NotifyTests.bsc"
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAOd.lib TAO_PortableServerd.lib TAO_ETCLd.lib TAO_ETCLd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_CosEventd.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\..\..\bin\TAO_NotifyTestsd.dll" /pdbtype:sept /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\orbsvcs\ETCL" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
-# SUBTRACT LINK32 /pdb:none
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_CosNotificationd.lib TAO_ETCLd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_IORTabled.lib TAO_DynamicAnyd.lib TAO_PortableServerd.lib TAOd.lib ACEd.lib /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\tao\DynamicAny" /libpath:"..\..\..\..\tao\IORTable" /libpath:"..\..\..\..\orbsvcs\orbsvcs\ETCL" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3 /subsystem:windows /dll /debug /pdb:TAO_NotifyTestsd.pdb /machine:I386 /out:"..\..\..\..\..\bin\TAO_NotifyTestsd.dll"
-!ENDIF
+!ENDIF
# Begin Target
@@ -91,7 +69,67 @@ LINK32=link.exe
# Name "TAO_NotifyTests DLL - Win32 Debug"
# Begin Group "Source Files"
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\Activation_Manager.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Application_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Builder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ConsumerAdmin_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Driver.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\EventChannel_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Factories_Define.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Filter_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\LookupManager.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Name.cpp
+# End Source File
# Begin Source File
SOURCE=.\Notify_PushConsumer.cpp
@@ -120,10 +158,110 @@ SOURCE=.\Notify_StructuredPushSupplier.cpp
SOURCE=.\Notify_Test_Client.cpp
# End Source File
+# Begin Source File
+
+SOURCE=.\Options_Parser.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Consumer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Consumer_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Supplier.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Supplier_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Priority_Mapping.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StructuredEvent.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SupplierAdmin_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Task_Stats.cpp
+# End Source File
# End Group
# Begin Group "Header Files"
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# PROP Default_Filter "h;hpp;hxx;hh"
+# Begin Source File
+
+SOURCE=.\Activation_Manager.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerC.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Application_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Builder.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ConsumerAdmin_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Driver.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\EventChannel_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Factories_Define.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Filter_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\LookupManager.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Name.h
+# End Source File
# Begin Source File
SOURCE=.\Notify_PushConsumer.h
@@ -154,7 +292,156 @@ SOURCE=.\Notify_Test_Client.h
# End Source File
# Begin Source File
-SOURCE=.\notify_test_export.h
+SOURCE=.\Options_Parser.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Consumer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Consumer_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Supplier.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Supplier_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Priority_Mapping.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StructuredEvent.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SupplierAdmin_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Task_Stats.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+# Begin Source File
+
+SOURCE=.\Activation_ManagerC.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Task_Stats.inl
+# End Source File
+# End Group
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Group
+# Begin Group "IDL Files"
+
+# PROP Default_Filter "idl"
+# Begin Source File
+
+SOURCE=.\Activation_Manager.idl
+
+!IF "$(CFG)" == "TAO_NotifyTests DLL - Win32 Release"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath)
+InputPath=.\Activation_Manager.idl
+InputName=Activation_Manager
+InputDir=.
+OutDir=.
+
+BuildCmds= \
+ ..\..\..\..\..\bin\tao_idl -o $(OutDir) -I..\..\..\.. -I$(TAO_ROOT)\orbsvcs -Ge 1 -Sc $(InputPath)
+
+"$(OutDir)\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "TAO_NotifyTests DLL - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath)
+InputPath=.\Activation_Manager.idl
+InputName=Activation_Manager
+InputDir=.
+OutDir=.
+
+BuildCmds= \
+ ..\..\..\..\..\bin\tao_idl -o $(OutDir) -I..\..\..\.. -I$(TAO_ROOT)\orbsvcs -Ge 1 -Sc $(InputPath)
+
+"$(OutDir)\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+# End Custom Build
+
+!ENDIF
+
# End Source File
# End Group
# End Target
diff --git a/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests_Static.dsp b/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests_Static.dsp
new file mode 100644
index 00000000000..1c41b20b080
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests_Static.dsp
@@ -0,0 +1,448 @@
+# Microsoft Developer Studio Project File - Name="TAO_NotifyTests LIB" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=TAO_NotifyTests LIB - Win32 Static Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_NotifyTests_Static.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_NotifyTests_Static.mak" CFG="TAO_NotifyTests LIB - Win32 Static Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "TAO_NotifyTests LIB - Win32 Static Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "TAO_NotifyTests LIB - Win32 Static Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "TAO_NotifyTests LIB - Win32 Static Release"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Target_Dir ""
+LINK32=link.exe -lib
+# ADD CPP /nologo /G5 /W3 /GX /O2 /MD /Zi /GR /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D NDEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_AS_STATIC_LIBS=1 /D ACE_AS_STATIC_LIBS=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_NotifyTests.bsc"
+LIB32=link.exe -lib
+# ADD LIB32 /nologo /out:".\TAO_NotifyTestss.lib"
+
+!ELSEIF "$(CFG)" == "TAO_NotifyTests LIB - Win32 Static Debug"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Target_Dir ""
+LINK32=link.exe -lib
+# ADD CPP /nologo /G5 /W3 /Gm /GX /Zi /Od /GR /Gy /MDd /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D _DEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_AS_STATIC_LIBS=1 /D ACE_AS_STATIC_LIBS=1 /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_NotifyTests.bsc"
+LIB32=link.exe -lib
+# ADD LIB32 /nologo /out:".\TAO_NotifyTestssd.lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "TAO_NotifyTests LIB - Win32 Static Release"
+# Name "TAO_NotifyTests LIB - Win32 Static Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\Activation_Manager.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Application_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Builder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ConsumerAdmin_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Driver.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\EventChannel_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Factories_Define.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Filter_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\LookupManager.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Name.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_PushConsumer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_PushSupplier.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_SequencePushConsumer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_SequencePushSupplier.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_StructuredPushConsumer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_StructuredPushSupplier.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_Test_Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Options_Parser.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Consumer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Consumer_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Supplier.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Supplier_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Priority_Mapping.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StructuredEvent.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SupplierAdmin_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Task_Stats.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hh"
+# Begin Source File
+
+SOURCE=.\Activation_Manager.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerC.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Application_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Builder.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ConsumerAdmin_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Driver.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\EventChannel_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Factories_Define.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Filter_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\LookupManager.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Name.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_PushConsumer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_PushSupplier.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_SequencePushConsumer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_SequencePushSupplier.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_StructuredPushConsumer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_StructuredPushSupplier.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Notify_Test_Client.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Options_Parser.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Consumer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Consumer_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Supplier.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Periodic_Supplier_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Priority_Mapping.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StructuredEvent.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SupplierAdmin_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Task_Stats.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+# Begin Source File
+
+SOURCE=.\Activation_ManagerC.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Task_Stats.inl
+# End Source File
+# End Group
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Group
+# Begin Group "IDL Files"
+
+# PROP Default_Filter "idl"
+# Begin Source File
+
+SOURCE=.\Activation_Manager.idl
+
+!IF "$(CFG)" == "TAO_NotifyTests LIB - Win32 Static Release"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath)
+InputPath=.\Activation_Manager.idl
+InputName=Activation_Manager
+InputDir=.
+OutDir=.
+
+BuildCmds= \
+ ..\..\..\..\..\bin\tao_idl -o $(OutDir) -I..\..\..\.. -I$(TAO_ROOT)\orbsvcs -Ge 1 -Sc $(InputPath)
+
+"$(OutDir)\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "TAO_NotifyTests LIB - Win32 Static Debug"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath)
+InputPath=.\Activation_Manager.idl
+InputName=Activation_Manager
+InputDir=.
+OutDir=.
+
+BuildCmds= \
+ ..\..\..\..\..\bin\tao_idl -o $(OutDir) -I..\..\..\.. -I$(TAO_ROOT)\orbsvcs -Ge 1 -Sc $(InputPath)
+
+"$(OutDir)\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests.dsp b/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests.dsp
new file mode 100644
index 00000000000..d63991b215c
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests.dsp
@@ -0,0 +1,145 @@
+# Microsoft Developer Studio Project File - Name="TAO_RT_NotifyTests DLL" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=TAO_RT_NotifyTests DLL - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_RT_NotifyTests.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_RT_NotifyTests.mak" CFG="TAO_RT_NotifyTests DLL - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "TAO_RT_NotifyTests DLL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "TAO_RT_NotifyTests DLL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "TAO_RT_NotifyTests DLL - Win32 Release"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "."
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /GX /O2 /MD /Zi /Ob2 /GR /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D NDEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_RT_NOTIFY_TEST_BUILD_DLL=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_RT_NotifyTests.bsc"
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_NotifyTests.lib TAO_RTCORBA.lib TAO_RTPortableServer.lib TAO_CosNotification.lib TAO_ETCL.lib TAO_CosNaming.lib TAO_Svc_Utils.lib TAO_IORTable.lib TAO_DynamicAny.lib TAO_PortableServer.lib TAO.lib ACE.lib /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\tao\DynamicAny" /libpath:"..\..\..\..\tao\IORTable" /libpath:"..\..\..\..\orbsvcs\orbsvcs\ETCL" /libpath:"..\..\..\..\tao\RTPortableServer" /libpath:"..\..\..\..\tao\RTCORBA" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3 /subsystem:windows /dll /machine:I386 /out:"..\..\..\..\..\bin\TAO_RT_NotifyTests.dll"
+
+!ELSEIF "$(CFG)" == "TAO_RT_NotifyTests DLL - Win32 Debug"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "."
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /MDd /GR /Gy /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D _DEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_RT_NOTIFY_TEST_BUILD_DLL=1 /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_RT_NotifyTests.bsc"
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_NotifyTestsd.lib TAO_RTCORBAd.lib TAO_RTPortableServerd.lib TAO_CosNotificationd.lib TAO_ETCLd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_IORTabled.lib TAO_DynamicAnyd.lib TAO_PortableServerd.lib TAOd.lib ACEd.lib /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\tao\DynamicAny" /libpath:"..\..\..\..\tao\IORTable" /libpath:"..\..\..\..\orbsvcs\orbsvcs\ETCL" /libpath:"..\..\..\..\tao\RTPortableServer" /libpath:"..\..\..\..\tao\RTCORBA" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3 /subsystem:windows /dll /debug /pdb:TAO_RT_NotifyTestsd.pdb /machine:I386 /out:"..\..\..\..\..\bin\TAO_RT_NotifyTestsd.dll"
+
+!ENDIF
+
+# Begin Target
+
+# Name "TAO_RT_NotifyTests DLL - Win32 Release"
+# Name "TAO_RT_NotifyTests DLL - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\RT_Application_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Factories_Define.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_POA_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Priority_Mapping.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hh"
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Application_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_POA_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Priority_Mapping.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.i
+# End Source File
+# End Group
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Filter.dsp b/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Filter.dsp
new file mode 100644
index 00000000000..60ee460cabc
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Filter.dsp
@@ -0,0 +1,133 @@
+# Microsoft Developer Studio Project File - Name="TAO_RT_NotifyTests_Filter DLL" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=TAO_RT_NotifyTests_Filter DLL - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_RT_NotifyTests_Filter.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_RT_NotifyTests_Filter.mak" CFG="TAO_RT_NotifyTests_Filter DLL - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "TAO_RT_NotifyTests_Filter DLL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "TAO_RT_NotifyTests_Filter DLL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "TAO_RT_NotifyTests_Filter DLL - Win32 Release"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "."
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /GX /O2 /MD /Zi /Ob2 /GR /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D NDEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_RT_Test_Filter_BUILD_DLL=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_RT_NotifyTests_Filter.bsc"
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_RTCORBA.lib TAO_CosNotification.lib TAO_ETCL.lib TAO_CosNaming.lib TAO_Svc_Utils.lib TAO_IORTable.lib TAO_DynamicAny.lib TAO_PortableServer.lib TAO.lib ACE.lib /libpath:"..\..\..\..\tao\RTCORBA" /libpath:"..\..\..\..\tao\IORTable" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\tao\DynamicAny" /libpath:"..\..\..\..\orbsvcs\orbsvcs\ETCL" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3 /subsystem:windows /dll /machine:I386 /out:"..\..\..\..\..\bin\TAO_RT_NotifyTests_Filter.dll"
+
+!ELSEIF "$(CFG)" == "TAO_RT_NotifyTests_Filter DLL - Win32 Debug"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "."
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /MDd /GR /Gy /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D _DEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_RT_Test_Filter_BUILD_DLL=1 /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_RT_NotifyTests_Filter.bsc"
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO TAO_RTCORBAd.lib TAO_CosNotificationd.lib TAO_ETCLd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_IORTabled.lib TAO_DynamicAnyd.lib TAO_PortableServerd.lib TAOd.lib ACEd.lib /libpath:"..\..\..\..\tao\RTCORBA" /libpath:"..\..\..\..\tao\IORTable" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\tao\DynamicAny" /libpath:"..\..\..\..\orbsvcs\orbsvcs\ETCL" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3 /subsystem:windows /dll /debug /pdb:TAO_RT_NotifyTests_Filterd.pdb /machine:I386 /out:"..\..\..\..\..\bin\TAO_RT_NotifyTests_Filterd.dll"
+
+!ENDIF
+
+# Begin Target
+
+# Name "TAO_RT_NotifyTests_Filter DLL - Win32 Release"
+# Name "TAO_RT_NotifyTests_Filter DLL - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\RT_Test_Filter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Test_FilterFactory.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hh"
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Test_Filter.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Test_FilterFactory.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.i
+# End Source File
+# End Group
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Filter_Static.dsp b/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Filter_Static.dsp
new file mode 100644
index 00000000000..ca787b42c86
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Filter_Static.dsp
@@ -0,0 +1,133 @@
+# Microsoft Developer Studio Project File - Name="TAO_RT_NotifyTests_Filter LIB" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=TAO_RT_NotifyTests_Filter LIB - Win32 Static Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_RT_NotifyTests_Filter_Static.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_RT_NotifyTests_Filter_Static.mak" CFG="TAO_RT_NotifyTests_Filter LIB - Win32 Static Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "TAO_RT_NotifyTests_Filter LIB - Win32 Static Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "TAO_RT_NotifyTests_Filter LIB - Win32 Static Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "TAO_RT_NotifyTests_Filter LIB - Win32 Static Release"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Target_Dir ""
+LINK32=link.exe -lib
+# ADD CPP /nologo /G5 /W3 /GX /O2 /MD /Zi /GR /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D NDEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_AS_STATIC_LIBS=1 /D ACE_AS_STATIC_LIBS=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_RT_NotifyTests_Filter.bsc"
+LIB32=link.exe -lib
+# ADD LIB32 /nologo /out:".\TAO_RT_NotifyTests_Filters.lib"
+
+!ELSEIF "$(CFG)" == "TAO_RT_NotifyTests_Filter LIB - Win32 Static Debug"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Target_Dir ""
+LINK32=link.exe -lib
+# ADD CPP /nologo /G5 /W3 /Gm /GX /Zi /Od /GR /Gy /MDd /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D _DEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_AS_STATIC_LIBS=1 /D ACE_AS_STATIC_LIBS=1 /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_RT_NotifyTests_Filter.bsc"
+LIB32=link.exe -lib
+# ADD LIB32 /nologo /out:".\TAO_RT_NotifyTests_Filtersd.lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "TAO_RT_NotifyTests_Filter LIB - Win32 Static Release"
+# Name "TAO_RT_NotifyTests_Filter LIB - Win32 Static Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\RT_Test_Filter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Test_FilterFactory.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hh"
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Test_Filter.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Test_FilterFactory.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.i
+# End Source File
+# End Group
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Static.dsp b/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Static.dsp
new file mode 100644
index 00000000000..b99dc954cee
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/TAO_RT_NotifyTests_Static.dsp
@@ -0,0 +1,145 @@
+# Microsoft Developer Studio Project File - Name="TAO_RT_NotifyTests LIB" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=TAO_RT_NotifyTests LIB - Win32 Static Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_RT_NotifyTests_Static.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_RT_NotifyTests_Static.mak" CFG="TAO_RT_NotifyTests LIB - Win32 Static Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "TAO_RT_NotifyTests LIB - Win32 Static Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "TAO_RT_NotifyTests LIB - Win32 Static Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "TAO_RT_NotifyTests LIB - Win32 Static Release"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Target_Dir ""
+LINK32=link.exe -lib
+# ADD CPP /nologo /G5 /W3 /GX /O2 /MD /Zi /GR /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D NDEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_AS_STATIC_LIBS=1 /D ACE_AS_STATIC_LIBS=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_RT_NotifyTests.bsc"
+LIB32=link.exe -lib
+# ADD LIB32 /nologo /out:".\TAO_RT_NotifyTestss.lib"
+
+!ELSEIF "$(CFG)" == "TAO_RT_NotifyTests LIB - Win32 Static Debug"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Target_Dir ""
+LINK32=link.exe -lib
+# ADD CPP /nologo /G5 /W3 /Gm /GX /Zi /Od /GR /Gy /MDd /I "..\..\..\..\orbsvcs" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D _DEBUG=1 /D WIN32=1 /D _WINDOWS=1 /D TAO_AS_STATIC_LIBS=1 /D ACE_AS_STATIC_LIBS=1 /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\..\..\orbsvcs" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo /o".\TAO_RT_NotifyTests.bsc"
+LIB32=link.exe -lib
+# ADD LIB32 /nologo /out:".\TAO_RT_NotifyTestssd.lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "TAO_RT_NotifyTests LIB - Win32 Static Release"
+# Name "TAO_RT_NotifyTests LIB - Win32 Static Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\RT_Application_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Factories_Define.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_POA_Command.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Priority_Mapping.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hh"
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Application_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_POA_Command.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RT_Priority_Mapping.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.i
+# End Source File
+# End Group
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\Activation_ManagerS_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Command_Factory_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/orbsvcs/tests/Notify/lib/Task_Callback.h b/TAO/orbsvcs/tests/Notify/lib/Task_Callback.h
new file mode 100644
index 00000000000..01d1b2ea8fd
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Task_Callback.h
@@ -0,0 +1,39 @@
+/* -*- C++ -*- */
+/**
+ * @file NS_Task_Callback.h
+ *
+ * $Id$
+ *
+ * @author Pradeep Gore <pradeep@oomworks.com>
+ *
+ *
+ */
+
+#ifndef TAO_NS_TASK_CALLBACK_H
+#define TAO_NS_TASK_CALLBACK_H
+#include "ace/pre.h"
+
+#include "notify_test_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_NS_Periodic_Supplier;
+class TAO_NS_Periodic_Consumer;
+
+/**
+ * @class TAO_NS_Task_Callback
+ *
+ * @brief
+ *
+ */
+class TAO_NOTIFY_TEST_Export TAO_NS_Task_Callback
+{
+public:
+ virtual void done (TAO_NS_Periodic_Supplier* supplier) = 0;
+ virtual void done (TAO_NS_Periodic_Consumer* consumer) = 0;
+};
+
+#include "ace/post.h"
+#endif /* TAO_NS_TASK_CALLBACK_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp
new file mode 100644
index 00000000000..c5f9a395b5f
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp
@@ -0,0 +1,193 @@
+//$Id$
+#include "Task_Stats.h"
+#include "ace/OS.h"
+#include "ace/Log_Msg.h"
+
+#if !defined (__ACE_INLINE__)
+#include "Task_Stats.inl"
+#endif /* __ACE_INLINE__ */
+
+Base_Time::Base_Time (void)
+{
+ base_time_ = ACE_OS::gethrtime ();
+}
+
+Task_Stats::Task_Stats (void)
+ : base_time_(0),
+ end_time_ (0),
+ max_samples_ (0),
+ samples_count_ (0),
+ time_inv_ (0),
+ time_exec_ (0),
+ exec_time_min_ (0),
+ exec_time_min_at_ (0),
+ exec_time_max_ (0),
+ exec_time_max_at_(0),
+ sum_ (0),
+ sum2_ (0)
+{
+}
+
+Task_Stats::~Task_Stats (void)
+{
+ delete[] this->time_inv_;
+ delete[] this->time_exec_;
+}
+
+int
+Task_Stats::init (size_t max_samples)
+{
+ this->max_samples_ = max_samples;
+
+ ACE_NEW_RETURN (this->time_inv_, ACE_UINT64[this->max_samples_], -1);
+ ACE_NEW_RETURN (this->time_exec_, ACE_UINT64[this->max_samples_], -1);
+ return 0;
+}
+
+void
+Task_Stats::base_time (ACE_hrtime_t time)
+{
+ base_time_ = time;
+}
+
+void
+Task_Stats::end_time (ACE_hrtime_t time)
+{
+ end_time_ = time;
+}
+
+void
+Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg,
+ ACE_UINT32 scale_factor)
+{
+ FILE* output_file = ACE_OS::fopen (file_name, "w");
+
+ // first dump what the caller has to say.
+ ACE_OS::fprintf (output_file, "%s\n",msg);
+
+ // next, compose and dump what we want to say.
+
+ // calc throughput.
+
+ ACE_TCHAR out_msg[BUFSIZ];
+
+ ACE_hrtime_t elapsed_microseconds = (end_time_ - base_time_) / scale_factor;
+ double elapsed_seconds =
+ ACE_CU64_TO_CU32(elapsed_microseconds) / 1000000.0;
+ double throughput =
+ double(samples_count_) / elapsed_seconds;
+
+ ACE_OS::sprintf (out_msg, "#Throughtput: %f\n", throughput);
+ ACE_OS::fprintf (output_file, "%s\n",out_msg);
+
+ // dump latency stats.
+ this->dump_latency_stats (out_msg, scale_factor);
+ ACE_OS::fprintf (output_file, "%s\n",out_msg);
+ ACE_OS::fprintf (output_file, "#Invocation time \t Execution time\n");
+
+ // dump the samples recorded.
+ for (size_t i = 0; i != this->samples_count_; ++i)
+ {
+ ACE_UINT64 x = this->time_inv_[i] / scale_factor;
+ ACE_UINT32 val_1 = ACE_CU64_TO_CU32 (x);
+
+ ACE_UINT64 y = this->time_exec_[i] / scale_factor;
+ ACE_UINT32 val_2 = ACE_CU64_TO_CU32 (y);
+
+ ACE_OS::fprintf (output_file, "%u \t %u\n",val_1, val_2);
+ }
+
+ ACE_OS::fclose (output_file);
+}
+
+void
+Task_Stats::dump_latency_stats (ACE_TCHAR *out_msg, ACE_UINT32 sf)
+{
+ if (this->samples_count_ == 0u)
+ {
+ ACE_OS::sprintf (out_msg,
+ ACE_LIB_TEXT ("# no data collected\n"));
+ return;
+ }
+
+ ACE_UINT64 avg = this->sum_ / this->samples_count_;
+ ACE_UINT64 dev =
+#if defined ACE_LACKS_LONGLONG_T
+ ACE_static_cast (ACE_U_LongLong,
+ this->sum2_ / this->samples_count_)
+ - avg * ACE_U64_TO_U32(avg);
+#else /* ! ACE_LACKS_LONGLONG_T */
+ this->sum2_ / this->samples_count_ - avg * avg;
+#endif /* ! ACE_LACKS_LONGLONG_T */
+
+ ACE_UINT64 l_min_ = this->exec_time_min_ / sf;
+ ACE_UINT32 l_min = ACE_CU64_TO_CU32 (l_min_);
+
+ ACE_UINT64 l_max_ = this->exec_time_max_ / sf;
+ ACE_UINT32 l_max = ACE_CU64_TO_CU32 (l_max_);
+
+ /*
+ ACE_UINT64 l_avg_ = avg / sf;
+ ACE_UINT32 l_avg = ACE_CU64_TO_CU32 (l_avg_);
+
+ ACE_UINT64 l_dev_ = dev / sf;
+ ACE_UINT32 l_dev = ACE_CU64_TO_CU32 (l_dev_);
+ */
+
+ double l_avg = ACE_CU64_TO_CU32 (avg) / sf;
+ double l_dev = ACE_CU64_TO_CU32 (dev) / (sf * sf);
+
+ ACE_UINT64 tmin_ = this->time_inv_[0] / sf;
+ ACE_UINT32 tmin = ACE_CU64_TO_CU32 (tmin_);
+
+ ACE_UINT64 tmax_ = this->time_inv_[samples_count_-1] / sf;
+ ACE_UINT32 tmax = ACE_CU64_TO_CU32 (tmax_);
+
+ ACE_OS::sprintf(out_msg,
+ ACE_LIB_TEXT ("#latency : %u[%d]/%.2f/%u[%d]/%.2f (min/avg/max/var^2)\n #first invocation time = %u, last invocation time = %u\n"),
+ l_min, this->exec_time_min_at_,
+ l_avg,
+ l_max, this->exec_time_max_at_,
+ l_dev,
+ tmin,tmax);
+ /*
+ double l_min = ACE_CU64_TO_CU32 (this->exec_time_min_) / sf;
+ double l_max = ACE_CU64_TO_CU32 (this->exec_time_max_) / sf;
+ double l_avg = ACE_CU64_TO_CU32 (avg) / sf;
+ double l_dev = ACE_CU64_TO_CU32 (dev) / (sf * sf);
+
+ double tmin = ACE_CU64_TO_CU32 (this->time_inv_[0])/sf;
+ double tmax = ACE_CU64_TO_CU32 (this->time_inv_[samples_count_-1])/sf;
+
+ ACE_OS::sprintf(out_msg,
+ ACE_LIB_TEXT ("#latency : %.2f[%d]/%.2f/%.2f[%d]/%.2f (min/avg/max/var^2)\n #first invocation time = %.0f, last invocation time = %.0f\n"),
+ l_min, this->exec_time_min_at_,
+ l_avg,
+ l_max, this->exec_time_max_at_,
+ l_dev,
+ tmin,tmax);
+
+
+ ACE_OS::sprintf(out_msg,
+ ACE_LIB_TEXT ("#latency : %.2f[%d]/%.2f/%.2f[%d]/%.2f (min/avg/max/var^2)\n"),
+ l_min, this->exec_time_min_at_,
+ l_avg,
+ l_max, this->exec_time_max_at_,
+ l_dev);
+
+ ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("#latency : %.2f[%d]/%.2f/%.2f[%d]/%.2f (min/avg/max/var^2)\n"),
+ l_min, this->exec_time_min_at_,
+ l_avg,
+ l_max, this->exec_time_max_at_,
+ l_dev));
+ */
+}
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class ACE_Singleton<Base_Time, TAO_SYNCH_MUTEX>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate ACE_Singleton<Base_Time, TAO_SYNCH_MUTEX>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.h b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.h
new file mode 100644
index 00000000000..cc7a68b2c43
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.h
@@ -0,0 +1,106 @@
+/* -*- C++ -*- */
+//=============================================================================
+/**
+ * @file Task_Stats.h
+ *
+ * $Id$
+ *
+ * Utility Stats class that maintains the readings.
+ *
+ * @author Pradeep Gore <pradeep@cs.wustl.edu>
+ */
+//=============================================================================
+#ifndef TASK_STATS_H
+#define TASK_STATS_H
+
+#include "ace/OS.h"
+#include "ace/Singleton.h"
+#include "tao/orbconf.h"
+#include "tao/debug.h"
+#include "notify_test_export.h"
+
+/**
+ * @class Base_Time
+ *
+ * @brief maintains readings recorded by tasks.
+ *
+ */
+class TAO_NOTIFY_TEST_Export Base_Time
+{
+ public:
+ Base_Time (void);
+ ACE_hrtime_t base_time_;
+};
+
+typedef ACE_Singleton<Base_Time, TAO_SYNCH_MUTEX> BASE_TIME;
+
+/**
+ * @class Task_Stats
+ *
+ * @brief maintains readings recorded by tasks.
+ *
+ */
+class TAO_NOTIFY_TEST_Export Task_Stats
+{
+ public:
+ /// Constructor
+ Task_Stats (void);
+
+ /// Destructor
+ ~Task_Stats (void);
+
+ /// Init
+ int init (size_t max_samples);
+
+ /// Set the base time value.
+ void base_time (ACE_hrtime_t time);
+
+ /// Set the end time value.
+ void end_time (ACE_hrtime_t time);
+
+ /// Record a sample
+ int sample (ACE_UINT64 inv_start_time, ACE_UINT64 inv_end_time);
+
+ void dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg,
+ ACE_UINT32 scale_factor);
+ protected:
+ void dump_latency_stats (ACE_TCHAR *out_msg, ACE_UINT32 sf);
+
+ /// Base and end times
+ ACE_hrtime_t base_time_;
+ ACE_hrtime_t end_time_;
+
+ /// The maximum number of samples
+ ACE_UINT32 max_samples_;
+
+ /// The number of samples
+ ACE_UINT32 samples_count_;
+
+ /// The samples : the time of invocation. and the recorded exec. time .
+ ACE_UINT64 *time_inv_;
+ ACE_UINT64 *time_exec_;
+
+ /// The minimum value
+ ACE_UINT64 exec_time_min_;
+
+ /// The number of the sample that had the minimum value
+ ACE_UINT32 exec_time_min_at_;
+
+ /// The maximum value
+ ACE_UINT64 exec_time_max_;
+
+ /// The number of the sample that had the maximum value
+ ACE_UINT32 exec_time_max_at_;
+
+ /// The sum of all the values
+ ACE_UINT64 sum_;
+
+ /// The sum of the square of all the values
+ ACE_UINT64 sum2_;
+};
+
+#if defined (__ACE_INLINE__)
+#include "Task_Stats.inl"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TASK_STATS_H */
diff --git a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.inl b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.inl
new file mode 100644
index 00000000000..0e9aa2b2bb7
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.inl
@@ -0,0 +1,55 @@
+//$Id$
+
+ACE_INLINE int
+Task_Stats::sample (ACE_UINT64 inv_start_time, ACE_UINT64 inv_end_time)
+{
+ if (this->samples_count_ >= this->max_samples_)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Task_Stats::sample ret -1\n"));
+ return -1;
+ }
+ ACE_UINT64 inv_value, exec_value;
+
+ inv_value = inv_start_time - base_time_;
+ exec_value = inv_end_time - inv_start_time;
+
+ this->time_inv_[this->samples_count_] = inv_value;
+ this->time_exec_[this->samples_count_] = exec_value;
+
+ this->samples_count_++;
+
+ if (this->samples_count_ == 1u)
+ {
+ this->exec_time_min_ = exec_value;
+ this->exec_time_min_at_ = this->samples_count_;
+ this->exec_time_max_ = exec_value;
+ this->exec_time_max_at_ = this->samples_count_;
+ this->sum_ = exec_value;
+#if defined ACE_LACKS_LONGLONG_T
+ this->sum2_ = exec_value * ACE_U64_TO_U32 (exec_value);
+#else /* ! ACE_LACKS_LONGLONG_T */
+ this->sum2_ = exec_value * exec_value;
+#endif /* ! ACE_LACKS_LONGLONG_T */
+ }
+ else
+ {
+ if (this->exec_time_min_ > exec_value)
+ {
+ this->exec_time_min_ = exec_value;
+ this->exec_time_min_at_ = this->samples_count_;
+ }
+ if (this->exec_time_max_ < exec_value)
+ {
+ this->exec_time_max_ = exec_value;
+ this->exec_time_max_at_ = this->samples_count_;
+ }
+
+ this->sum_ += exec_value;
+#if defined ACE_LACKS_LONGLONG_T
+ this->sum2_ += exec_value * ACE_U64_TO_U32 (exec_value);
+#else /* ! ACE_LACKS_LONGLONG_T */
+ this->sum2_ += exec_value * exec_value;
+#endif /* ! ACE_LACKS_LONGLONG_T */
+ }
+ return 0;
+}
diff --git a/TAO/orbsvcs/tests/Notify/lib/rt_notify_test_export.h b/TAO/orbsvcs/tests/Notify/lib/rt_notify_test_export.h
new file mode 100644
index 00000000000..356b8f92976
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/rt_notify_test_export.h
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl
+// ------------------------------
+#ifndef TAO_RT_NOTIFY_TEST_EXPORT_H
+#define TAO_RT_NOTIFY_TEST_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if defined (TAO_AS_STATIC_LIBS)
+# if !defined (TAO_RT_NOTIFY_TEST_HAS_DLL)
+# define TAO_RT_NOTIFY_TEST_HAS_DLL 0
+# endif /* ! TAO_RT_NOTIFY_TEST_HAS_DLL */
+#else
+# if !defined (TAO_RT_NOTIFY_TEST_HAS_DLL)
+# define TAO_RT_NOTIFY_TEST_HAS_DLL 1
+# endif /* ! TAO_RT_NOTIFY_TEST_HAS_DLL */
+#endif
+
+#if defined (TAO_RT_NOTIFY_TEST_HAS_DLL) && (TAO_RT_NOTIFY_TEST_HAS_DLL == 1)
+# if defined (TAO_RT_NOTIFY_TEST_BUILD_DLL)
+# define TAO_RT_NOTIFY_TEST_Export ACE_Proper_Export_Flag
+# define TAO_RT_NOTIFY_TEST_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define TAO_RT_NOTIFY_TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* TAO_RT_NOTIFY_TEST_BUILD_DLL */
+# define TAO_RT_NOTIFY_TEST_Export ACE_Proper_Import_Flag
+# define TAO_RT_NOTIFY_TEST_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define TAO_RT_NOTIFY_TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* TAO_RT_NOTIFY_TEST_BUILD_DLL */
+#else /* TAO_RT_NOTIFY_TEST_HAS_DLL == 1 */
+# define TAO_RT_NOTIFY_TEST_Export
+# define TAO_RT_NOTIFY_TEST_SINGLETON_DECLARATION(T)
+# define TAO_RT_NOTIFY_TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* TAO_RT_NOTIFY_TEST_HAS_DLL == 1 */
+
+#endif /* TAO_RT_NOTIFY_TEST_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/orbsvcs/tests/Notify/lib/rt_test_filter_export.h b/TAO/orbsvcs/tests/Notify/lib/rt_test_filter_export.h
new file mode 100644
index 00000000000..df775803699
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/lib/rt_test_filter_export.h
@@ -0,0 +1,40 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl
+// ------------------------------
+#ifndef TAO_RT_Test_Filter_EXPORT_H
+#define TAO_RT_Test_Filter_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if defined (TAO_AS_STATIC_LIBS)
+# if !defined (TAO_RT_Test_Filter_HAS_DLL)
+# define TAO_RT_Test_Filter_HAS_DLL 0
+# endif /* ! TAO_RT_Test_Filter_HAS_DLL */
+#else
+# if !defined (TAO_RT_Test_Filter_HAS_DLL)
+# define TAO_RT_Test_Filter_HAS_DLL 1
+# endif /* ! TAO_RT_Test_Filter_HAS_DLL */
+#endif
+
+#if defined (TAO_RT_Test_Filter_HAS_DLL) && (TAO_RT_Test_Filter_HAS_DLL == 1)
+# if defined (TAO_RT_Test_Filter_BUILD_DLL)
+# define TAO_RT_Test_Filter_Export ACE_Proper_Export_Flag
+# define TAO_RT_Test_Filter_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define TAO_RT_Test_Filter_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* TAO_RT_Test_Filter_BUILD_DLL */
+# define TAO_RT_Test_Filter_Export ACE_Proper_Import_Flag
+# define TAO_RT_Test_Filter_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define TAO_RT_Test_Filter_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* TAO_RT_Test_Filter_BUILD_DLL */
+#else /* TAO_RT_Test_Filter_HAS_DLL == 1 */
+# define TAO_RT_Test_Filter_Export
+# define TAO_RT_Test_Filter_SINGLETON_DECLARATION(T)
+# define TAO_RT_Test_Filter_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* TAO_RT_Test_Filter_HAS_DLL == 1 */
+
+#endif /* TAO_RT_Test_Filter_EXPORT_H */
+
+// End of auto generated file.