summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2003-06-07 08:53:32 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2003-06-07 08:53:32 +0000
commitbfb6a6b7469d3f7bcfb3f7519870437f762fae7e (patch)
tree42ab7df74e148231a4e4defe08a63a8cb78ea525
parent19923004638add27768ae76eb3037d62d267cfb2 (diff)
downloadATCD-bfb6a6b7469d3f7bcfb3f7519870437f762fae7e.tar.gz
ChangeLogTag: Sat Jun 07 08:50:12 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/ChangeLog192
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.cpp8
-rw-r--r--TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.h14
-rw-r--r--TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.i17
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h15
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.cpp63
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.h91
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.i24
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp1
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_And_Filter.h2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp44
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.h28
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.i4
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.i2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp16
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h8
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ConsumerControl.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp109
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.h46
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.i24
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.cpp195
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.h83
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.i1
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.cpp222
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.h79
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.i2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.cpp35
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.h38
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp275
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h294
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.i195
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp344
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.h381
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.i214
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Factory.h30
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Filter.h10
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp45
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h49
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i22
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h4
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h8
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.i2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_MT_Dispatching.h2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp44
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.h28
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.i4
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp180
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.h63
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.i2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h9
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.i2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.i2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.h4
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp204
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h52
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp254
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.h69
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.i40
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Dispatching.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.cpp28
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.h28
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp8
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.cpp44
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.h61
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.i1
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp8
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.h8
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.i2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp16
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.h8
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_SupplierControl.cpp7
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_SupplierControl.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Event_Channel.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Makefile.am13
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Timer_Module.h23
-rw-r--r--TAO/orbsvcs/orbsvcs/Event_Utilities.h293
-rw-r--r--TAO/orbsvcs/orbsvcs/Makefile.RTEvent5
-rw-r--r--TAO/orbsvcs/orbsvcs/RTEvent.bor5
-rw-r--r--TAO/orbsvcs/orbsvcs/RTEvent.dsp106
-rw-r--r--TAO/orbsvcs/orbsvcs/RTEvent.mpc5
-rw-r--r--TAO/orbsvcs/orbsvcs/RTEvent_Static.dsp90
-rw-r--r--TAO/orbsvcs/tests/EC_MT_Mcast/MCast.cpp1
-rw-r--r--TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h1
-rw-r--r--TAO/orbsvcs/tests/Event/Basic/BCast.cpp1
-rwxr-xr-xTAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl2
113 files changed, 3078 insertions, 2063 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 4d7af533d03..42a94aa4327 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,8 +1,198 @@
+Sat Jun 7 08:49:12 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ This checkin merges a first set of changes from Carlos O'Ryan into the
+ RTEC code. This are mostly restructering changes so that Carlos could
+ develop his ReliableEvent service. Also a small number of fixes and
+ extensions are included. There will be a second set of changes with
+ all ECG changes.
+
+ * orbsvcs/orbsvcs/Event_Utilities.h:
+ Converted comments to doxygen style
+
+ * orbsvcs/orbsvcs/Makefile.RTEvent:
+ * orbsvcs/orbsvcs/RTEvent.bor:
+ * orbsvcs/orbsvcs/RTEvent.dsp:
+ * orbsvcs/orbsvcs/RTEvent.mpc:
+ * orbsvcs/orbsvcs/RTEvent_Static.dsp:
+ Updated makefiles for all changes below.
+
+ * orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.h:
+ * orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.i:
+ * orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.cpp:
+ Added TAO_ESF_RefCountedRef<T> class, which calls
+ T::_decr_refcnt () on its contained pointer in its destructor.
+
+ Modified TAO_ESF_Proxy_Admin<CHANNEL, PROXY, INTERFACE>::obtain ()
+ to use TAO_ESF_RefCountedRef<PROXY> instead of the
+ PortableServer::ServantBase_var to relieve the requirement that
+ PROXY derives from PortableServer::ServantBase.
+
+ * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp:
+ * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.h:
+ * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp:
+ * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.h:
+ * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp:
+ * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.h:
+ * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp:
+ * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.h:
+ Updated because of change in TAO_ESF_Proxy_Admin
+
+ * orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.cpp:
+ * orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.h:
+ * orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.i:
+ * orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h:
+ * orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i:
+ Moved TAO_ECG_UDP_Out_Endpoint to a separate file.
+
+ * orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Event_Channel.h:
+ * orbsvcs/orbsvcs/Event/EC_Event_Channel.i:
+ * orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.h:
+ * orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.i:
+ Changed TAO_EC_Event_Channel to TAO_EC_Event_Channel_Base and
+ created a new derived class TAO_EC_Event_Channel. All code in the
+ RTEC has been modified to use TAO_EC_Event_Channel_Base.
+
+ * orbsvcs/orbsvcs/Event/EC_And_Filter.h:
+ Removed typedef Word
+
+ * orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Basic_Factory.h:
+ * orbsvcs/orbsvcs/Event/EC_Basic_Factory.i:
+ Changed TAO_EC_Event_Channel to TAO_EC_Event_Channel_Base. Moved
+ constructor from i to cpp file.
+
+ * orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.h:
+ * orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp:
+ * orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h:
+ * orbsvcs/orbsvcs/Event/EC_ConsumerControl.h
+ * orbsvcs/orbsvcs/Event/EC_Factory.h:
+ * orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h:
+ * orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h:
+ * orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.h:
+ * orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.i:
+ * orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp
+ * orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h
+ * orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.i
+ * orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.h
+ * orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.i
+ * orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.cpp
+ * orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.h
+ * orbsvcs/orbsvcs/Event/EC_RTCORBA_Dispatching.h
+ * orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.cpp
+ * orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.h
+ * orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp
+ * orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h
+ * orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp
+ * orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h
+ * orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp
+ * orbsvcs/orbsvcs/Event/EC_Sched_Factory.h
+ * orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp
+ * orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.h
+ * orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.i
+ * orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp
+ * orbsvcs/orbsvcs/Event/EC_SupplierAdmin.h
+ * orbsvcs/orbsvcs/Event/EC_SupplierControl.cpp
+ * orbsvcs/orbsvcs/Event/EC_SupplierControl.h
+ * orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h
+ * orbsvcs/orbsvcs/Event/EC_Timeout_Filter.cpp
+ * orbsvcs/orbsvcs/Event/EC_Timeout_Filter.h
+ * orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp
+ * orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h
+ * orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.i
+ Changed TAO_EC_Event_Channel to TAO_EC_Event_Channel_Base.
+
+ * orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Default_Factory.h:
+ * orbsvcs/orbsvcs/Event/EC_Default_Factory.i:
+ Changed TAO_EC_Event_Channel to TAO_EC_Event_Channel_Base and make
+ a helper function to printout messages about unsupported option
+ values and used this in this class to reduce code duplication.
+
+ * orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp:
+ Added include ECG_UDP_Out_Endpoint.h
+
+ * orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.h:
+ * orbsvcs/orbsvcs/Event/EC_Filter.h:
+ * orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h:
+ Doxygen comment update.
+
+ * orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp:
+ * orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h:
+ Don't derive from POA_RtecEventChannelAdmin::ProxyPushConsumer and
+ don't implement the methods from that interface.
+
+ * orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp:
+ * orbsvcs/orbsvcs/Event/EC_ProxySupplier.h:
+ * orbsvcs/orbsvcs/Event/EC_ProxySupplier.i:
+ Don't derive from POA_RtecEventChannelAdmin::ProxyPushSupplier and
+ don't implement the methods from that interface.
+
+ * orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.h:
+ * orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.i:
+ New class that implements POA_RtecEventChannelAdmin::ProxyPushConsumer
+ and is derived from EC_ProxyConsumer.
+
+ * orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.h:
+ * orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.i:
+ New class that implements
+ POA_RtecEventChannelAdmin::ProxyPushSupplier and is derived from
+ EC_ProxyConsumer.
+
+ * orbsvcs/orbsvcs/Event/EC_Dispatching.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Dispatching.h:
+ * orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.h:
+ * orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.i:
+ Moved TAO_EC_Reactive_Dispatching to a separate file.
+
+ * orbsvcs/orbsvcs/Event/EC_MT_Dispatching.h:
+ Don't forward declare TAO_EC_Event_Channel
+
+ * orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Null_Factory.h:
+ * orbsvcs/orbsvcs/Event/EC_Null_Factory.i:
+ Changed TAO_EC_Event_Channel to TAO_EC_Event_Channel_Base and create
+ a TAO_EC_Default_ProxyConsumer/Supplier instead of a
+ TAO_EC_ProxyConsumer/Supplier
+
+ * orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp:
+ * orbsvcs/orbsvcs/Event/EC_ObserverStrategy.h:
+ * orbsvcs/orbsvcs/Event/EC_ObserverStrategy.i:
+ Code refactored to removed duplicated code
+
+ * orbsvcs/orbsvcs/Event/Event_Channel.h:
+ Don't include ace/Containers.h
+
+ * orbsvcs/orbsvcs/Event/Makefile.am:
+ Updated
+
+ * orbsvcs/orbsvcs/Event/Memory_Pools.h:
+ Removed not needed include
+
+ * orbsvcs/orbsvcs/Event/Timer_Module.h:
+ Doxygen update
+
+ * orbsvcs/tests/EC_MT_Mcast/MCast.cpp:
+ * orbsvcs/tests/EC_Mcast/EC_Mcast.h:
+ * orbsvcs/tests/Event/Basic/BCast.cpp:
+ Added missing includes because classes are now in new files
+
+ * orbsvcs/tests/Event/Basic/exhaustive_test.pl:
+ Fixed error in this perl script
+
Wed Jun 4 13:44:16 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
* tao/TypeCodeFactory/TypeCodeFactory_i.cpp: Fixed compilation
errors on VxWorks. Thanks to Rob Andzik for providing the
- patches.
+ patches.
Wed Jun 4 12:40:43 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp
index b34ac957c10..02da6560908 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp
@@ -31,8 +31,10 @@ TAO_CEC_ProxyPullConsumer::~TAO_CEC_ProxyPullConsumer (void)
this->event_channel_->destroy_consumer_lock (this->lock_);
}
-CosEventChannelAdmin::ProxyPullConsumer_ptr
-TAO_CEC_ProxyPullConsumer::activate (ACE_ENV_SINGLE_ARG_DECL)
+void
+TAO_CEC_ProxyPullConsumer::activate (
+ CosEventChannelAdmin::ProxyPullConsumer_ptr &activated_proxy
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CosEventChannelAdmin::ProxyPullConsumer_var result;
@@ -43,10 +45,10 @@ TAO_CEC_ProxyPullConsumer::activate (ACE_ENV_SINGLE_ARG_DECL)
}
ACE_CATCHANY
{
- return CosEventChannelAdmin::ProxyPullConsumer::_nil ();
+ result = CosEventChannelAdmin::ProxyPullConsumer::_nil ();
}
ACE_ENDTRY;
- return result._retn ();
+ activated_proxy = result._retn ();
}
void
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.h
index c02dc393684..c86bccf9f6e 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.h
@@ -53,7 +53,10 @@ public:
virtual ~TAO_CEC_ProxyPullConsumer (void);
/// Activate in the POA
- virtual CosEventChannelAdmin::ProxyPullConsumer_ptr activate (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void activate (
+ CosEventChannelAdmin::ProxyPullConsumer_ptr &activated_proxy
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
/// Deactivate from the POA
virtual void deactivate (ACE_ENV_SINGLE_ARG_DECL)
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp
index 63a03cae494..877b8946c32 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp
@@ -30,8 +30,10 @@ TAO_CEC_ProxyPullSupplier::~TAO_CEC_ProxyPullSupplier (void)
this->event_channel_->destroy_supplier_lock (this->lock_);
}
-CosEventChannelAdmin::ProxyPullSupplier_ptr
-TAO_CEC_ProxyPullSupplier::activate (ACE_ENV_SINGLE_ARG_DECL)
+void
+TAO_CEC_ProxyPullSupplier::activate (
+ CosEventChannelAdmin::ProxyPullSupplier_ptr &activated_proxy
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CosEventChannelAdmin::ProxyPullSupplier_var result;
@@ -42,10 +44,10 @@ TAO_CEC_ProxyPullSupplier::activate (ACE_ENV_SINGLE_ARG_DECL)
}
ACE_CATCHANY
{
- return CosEventChannelAdmin::ProxyPullSupplier::_nil ();
+ result = CosEventChannelAdmin::ProxyPullSupplier::_nil ();
}
ACE_ENDTRY;
- return result._retn ();
+ activated_proxy = result._retn ();
}
void
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.h
index 64627f44280..06e91444c92 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.h
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.h
@@ -56,7 +56,10 @@ public:
virtual ~TAO_CEC_ProxyPullSupplier (void);
/// Activate in the POA
- virtual CosEventChannelAdmin::ProxyPullSupplier_ptr activate (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void activate (
+ CosEventChannelAdmin::ProxyPullSupplier_ptr &activated_proxy
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
/// Deactivate from the POA
virtual void deactivate (ACE_ENV_SINGLE_ARG_DECL)
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp
index c66ced24c75..b1a3ba1ff39 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp
@@ -31,8 +31,10 @@ TAO_CEC_ProxyPushConsumer::~TAO_CEC_ProxyPushConsumer (void)
this->event_channel_->destroy_consumer_lock (this->lock_);
}
-CosEventChannelAdmin::ProxyPushConsumer_ptr
-TAO_CEC_ProxyPushConsumer::activate (ACE_ENV_SINGLE_ARG_DECL)
+void
+TAO_CEC_ProxyPushConsumer::activate (
+ CosEventChannelAdmin::ProxyPushConsumer_ptr &activated_proxy
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CosEventChannelAdmin::ProxyPushConsumer_var result;
@@ -43,10 +45,10 @@ TAO_CEC_ProxyPushConsumer::activate (ACE_ENV_SINGLE_ARG_DECL)
}
ACE_CATCHANY
{
- return CosEventChannelAdmin::ProxyPushConsumer::_nil ();
+ result = CosEventChannelAdmin::ProxyPushConsumer::_nil ();
}
ACE_ENDTRY;
- return result._retn ();
+ activated_proxy = result._retn ();
}
void
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.h
index 11f903f48ed..cb0249c929b 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.h
@@ -53,7 +53,10 @@ public:
virtual ~TAO_CEC_ProxyPushConsumer (void);
/// Activate in the POA
- virtual CosEventChannelAdmin::ProxyPushConsumer_ptr activate (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void activate (
+ CosEventChannelAdmin::ProxyPushConsumer_ptr &activated_proxy
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
/// Deactivate from the POA
virtual void deactivate (ACE_ENV_SINGLE_ARG_DECL)
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp
index 8c079cc057b..88382ca8f90 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp
@@ -31,8 +31,10 @@ TAO_CEC_ProxyPushSupplier::~TAO_CEC_ProxyPushSupplier (void)
this->event_channel_->destroy_supplier_lock (this->lock_);
}
-CosEventChannelAdmin::ProxyPushSupplier_ptr
-TAO_CEC_ProxyPushSupplier::activate (ACE_ENV_SINGLE_ARG_DECL)
+void
+TAO_CEC_ProxyPushSupplier::activate (
+ CosEventChannelAdmin::ProxyPushSupplier_ptr &activated_proxy
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CosEventChannelAdmin::ProxyPushSupplier_var result;
@@ -43,10 +45,10 @@ TAO_CEC_ProxyPushSupplier::activate (ACE_ENV_SINGLE_ARG_DECL)
}
ACE_CATCHANY
{
- return CosEventChannelAdmin::ProxyPushSupplier::_nil ();
+ result = CosEventChannelAdmin::ProxyPushSupplier::_nil ();
}
ACE_ENDTRY;
- return result._retn ();
+ activated_proxy = result._retn ();
}
void
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.h
index c83f3ac5679..211b19aef0a 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.h
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.h
@@ -54,7 +54,10 @@ public:
virtual ~TAO_CEC_ProxyPushSupplier (void);
/// Activate in the POA
- virtual CosEventChannelAdmin::ProxyPushSupplier_ptr activate (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void activate (
+ CosEventChannelAdmin::ProxyPushSupplier_ptr &
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
/// Deactivate from the POA
virtual void deactivate (ACE_ENV_SINGLE_ARG_DECL)
diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.cpp b/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.cpp
index a4bbb416902..b74bb231759 100644
--- a/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.cpp
+++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.cpp
@@ -36,12 +36,14 @@ TAO_ESF_Proxy_Admin<EVENT_CHANNEL,PROXY,INTERFACE>::
PROXY* proxy;
this->event_channel_->create_proxy (proxy);
- PortableServer::ServantBase_var holder = proxy;
+ TAO_ESF_RefCountedRef<PROXY> holder (proxy);
- ACE_TYPENAME PROXY::_var_type result =
- proxy->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TYPENAME PROXY::_ptr_type r;
+ proxy->activate (r ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (INTERFACE::_nil ());
+ ACE_TYPENAME PROXY::_var_type result = r;
+
this->collection_->connected (proxy ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (INTERFACE::_nil ());
diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.h b/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.h
index dfe39ce311e..babfd4a4fcc 100644
--- a/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.h
+++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.h
@@ -132,6 +132,20 @@ private:
};
// ****************************************************************
+template <class COUNTED>
+class TAO_ESF_RefCountedRef
+{
+public:
+ TAO_ESF_RefCountedRef (COUNTED *counted);
+ ~TAO_ESF_RefCountedRef ();
+private:
+ TAO_ESF_RefCountedRef (TAO_ESF_RefCountedRef<COUNTED> const & );
+ TAO_ESF_RefCountedRef& operator= (TAO_ESF_RefCountedRef<COUNTED> const & );
+
+ COUNTED *counted_;
+};
+
+// ****************************************************************
#if defined (__ACE_INLINE__)
#include "ESF_Proxy_Admin.i"
diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.i b/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.i
index 9eec0894754..f6b4d29bc6f 100644
--- a/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.i
+++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_Admin.i
@@ -8,3 +8,20 @@ TAO_ESF_Proxy_Admin<EC,P,I>::
{
this->collection_->for_each (worker ACE_ENV_ARG_PARAMETER);
}
+
+template <class C>
+ACE_INLINE
+TAO_ESF_RefCountedRef<C>::TAO_ESF_RefCountedRef (C *counted)
+ : counted_ (counted)
+{}
+
+template <class C>
+ACE_INLINE
+TAO_ESF_RefCountedRef<C>::~TAO_ESF_RefCountedRef ()
+{
+ if (this->counted_ != 0)
+ {
+ this->counted_->_decr_refcnt ();
+ }
+}
+
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h b/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h
index 1ce709b1472..67393abedab 100644
--- a/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h
@@ -6,7 +6,7 @@
*
* @author Carlos O'Ryan <coryan@uci.edu>
* @author Jaiganesh Balasubramanian <jai@doc.ece.uci.edu>
- * @author and Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@ieee.org>
*
* http://doc.ece.uci.edu/~coryan/EC/index.html
*
@@ -38,7 +38,7 @@
* This class is a simple refcounted wrapper around ACE_SOCK_Dgram_Mcast that
* makes takes care of deleting itself if the refcount drops to zero.
*/
-class TAO_RTEvent_Export TAO_ECG_Mcast_Socket :
+class TAO_RTEvent_Export TAO_ECG_Mcast_Socket :
public ACE_SOCK_Dgram_Mcast, private TAO_Synch_Refcountable
{
public:
@@ -126,7 +126,7 @@ public:
* compilers.
*/
- class Observer
+ class Observer
: public POA_RtecEventChannelAdmin::Observer
{
public:
@@ -241,6 +241,15 @@ private:
ACE_Lock *lock_;
/// We callback to this object when a message arrives.
+ /*
+ * We can keep a raw pointer to the receiver (even though it may
+ * be a refcounted object) because receiver guarantees
+ * to notify us (by calling shutdown ()) before going away.
+ *
+ * We have to use raw pointer instead of a refcounting mechanism
+ * here to avoid a circular refcounting dependency between
+ * receiver and handler.
+ */
TAO_ECG_UDP_Receiver* receiver_;
/// This object will call us back when the subscription list
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.cpp
new file mode 100644
index 00000000000..f7ddbbb1002
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.cpp
@@ -0,0 +1,63 @@
+// $Id$
+
+#include "ECG_UDP_Out_Endpoint.h"
+#include "ace/INET_Addr.h"
+#include "ace/Sock_Connect.h"
+
+#if !defined(__ACE_INLINE__)
+#include "ECG_UDP_Out_Endpoint.i"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(Event, ECG_UDP_Out_Endpoint, "$Id$")
+
+TAO_ECG_UDP_Out_Endpoint::~TAO_ECG_UDP_Out_Endpoint (void)
+{
+ this->dgram_.close ();
+
+ delete[] this->ifs_;
+ this->ifs_ = 0;
+}
+
+CORBA::Boolean
+TAO_ECG_UDP_Out_Endpoint::is_loopback (const ACE_INET_Addr& from)
+{
+ if (this->port_number_ == 0)
+ {
+ // Cache the port number...
+ ACE_INET_Addr local_addr;
+ if (this->dgram ().get_local_addr (local_addr) == -1)
+ return 0;
+ this->port_number_ = local_addr.get_port_number ();
+ }
+
+ // Most of the time the port number is enough to determine if the
+ // message is remote, only when the local port number and the remote
+ // port number match we have to look at the local ip addresses.
+ if (from.get_port_number () != this->port_number_)
+ return 0;
+
+ if (this->ifs_ == 0)
+ {
+ ACE_Sock_Connect::get_ip_interfaces (this->if_count_, this->ifs_);
+ }
+
+ for (ACE_INET_Addr* i = this->ifs_;
+ i != this->ifs_ + this->if_count_;
+ ++i)
+ {
+ if ((*i).get_ip_address () == from.get_ip_address ())
+ return 1;
+ }
+ return 0;
+}
+
+
+// ****************************************************************
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+template class ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong>;
+template class ACE_Atomic_Op_Ex<TAO_SYNCH_MUTEX, CORBA::ULong>;
+#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#pragma instantiate ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong>
+#pragma instantiate ACE_Atomic_Op_Ex<TAO_SYNCH_MUTEX, CORBA::ULong>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.h b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.h
new file mode 100644
index 00000000000..b6cfb556354
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.h
@@ -0,0 +1,91 @@
+/* -*- C++ -*- */
+/**
+ * @file ECG_UDP_Out_Endpoint.h
+ *
+ * $Id$
+ *
+ * @author Carlos O'Ryan (coryan@cs.wustl.edu)
+ * @author Marina Spivak (marina@atdesk.com)
+ */
+
+#ifndef TAO_ECG_UDP_OUT_ENDPOINT_H
+#define TAO_ECG_UDP_OUT_ENDPOINT_H
+#include "ace/pre.h"
+
+#include "event_export.h"
+#include "tao/corbafwd.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/Refcounted_Auto_Ptr.h"
+#include "ace/SOCK_Dgram.h"
+#include "ace/Atomic_Op.h"
+
+class ACE_INET_Addr;
+
+/**
+ * @class TAO_ECG_UDP_Out_Endpoint
+ *
+ * @brief Maintains information about an outgoing endpoint.
+ *
+ * UDP senders can share a single endpoint to send UDP packets,
+ * but there is more state associated with this endpoint than its
+ * datagram SAP; for instance we need to keep track of the request
+ * id.
+ */
+class TAO_RTEvent_Export TAO_ECG_UDP_Out_Endpoint
+{
+public:
+ /// Constructor
+ TAO_ECG_UDP_Out_Endpoint (void);
+
+ /// Constructor
+ ~TAO_ECG_UDP_Out_Endpoint (void);
+
+ /// Obtain the datagram associated with this endpoint. Clients of
+ /// this class must open, and register (if necessary) this datagram.
+ ACE_SOCK_Dgram& dgram (void);
+
+ /// Obtain the next request id.
+ CORBA::ULong next_request_id (void);
+
+ /// The endpoint can detect if a data-gram was sent by itself, this
+ /// is useful to ignore or remove messages sent by the same process.
+ CORBA::Boolean is_loopback (const ACE_INET_Addr& from);
+
+private:
+ /// The request id....
+ ACE_Atomic_Op<TAO_SYNCH_MUTEX,CORBA::ULong> request_id_generator_;
+
+ /// The datagram....
+ ACE_SOCK_Dgram dgram_;
+
+ /// Cache the port-number so we can quickly determine if an event is
+ /// coming from another endpoint.
+ u_short port_number_;
+
+ /// Keep the list of local interfaces, needed for the is_loopback
+ /// method.
+ size_t if_count_;
+ ACE_INET_Addr* ifs_;
+};
+
+/**
+ * @typedef TAO_ECG_Refcounted_Endpoint
+ *
+ * @brief Reference counted pointer to TAO_ECG_UDP_Out_Endpoint
+ *
+ * Instances of TAO_ECG_UDP_Out_Endpoint are used by multiple objects
+ * in the Event Channel gateways, the endpoints are reference counted
+ * to manage their lifetime automatically.
+ */
+typedef ACE_Refcounted_Auto_Ptr<TAO_ECG_UDP_Out_Endpoint,ACE_Null_Mutex> TAO_ECG_Refcounted_Endpoint;
+
+#if defined(__ACE_INLINE__)
+#include "ECG_UDP_Out_Endpoint.i"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_ECG_UDP_OUT_ENDPOINT_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.i b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.i
new file mode 100644
index 00000000000..8cd70603ef1
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.i
@@ -0,0 +1,24 @@
+//
+// $Id$
+//
+
+ACE_INLINE
+TAO_ECG_UDP_Out_Endpoint::TAO_ECG_UDP_Out_Endpoint (void)
+ : port_number_ (0),
+ if_count_ (0),
+ ifs_ (0)
+{
+}
+
+ACE_INLINE ACE_SOCK_Dgram&
+TAO_ECG_UDP_Out_Endpoint::dgram (void)
+{
+ return this->dgram_;
+}
+
+ACE_INLINE CORBA::ULong
+TAO_ECG_UDP_Out_Endpoint::next_request_id (void)
+{
+ return this->request_id_generator_++;
+}
+
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp
index 8a83893a38a..d0959fef727 100644
--- a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp
@@ -11,6 +11,7 @@
#include "orbsvcs/Event/ECG_UDP_Sender.h"
#include "orbsvcs/Event/ECG_UDP_Protocol.h"
+#include "orbsvcs/Event/ECG_UDP_Out_Endpoint.h"
#include "orbsvcs/Event/EC_Gateway_UDP.h"
#include "ace/Unbounded_Set.h"
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_And_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_And_Filter.h
index 631198f7014..95e2ae3eb06 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_And_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_And_Filter.h
@@ -68,8 +68,6 @@ public:
const TAO_EC_QOS_Info &qos_info
ACE_ENV_ARG_DECL);
- typedef unsigned int Word;
-
private:
ACE_UNIMPLEMENTED_FUNC (TAO_EC_And_Filter
(const TAO_EC_And_Filter&))
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp
index a9690acfe21..fa99c051722 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp
@@ -1,19 +1,19 @@
// $Id$
#include "EC_Basic_Factory.h"
-#include "EC_Dispatching.h"
+#include "EC_Reactive_Dispatching.h"
#include "EC_Basic_Filter_Builder.h"
#include "EC_Trivial_Supplier_Filter.h"
#include "EC_ConsumerAdmin.h"
#include "EC_SupplierAdmin.h"
-#include "EC_ProxyConsumer.h"
-#include "EC_ProxySupplier.h"
+#include "EC_Default_ProxyConsumer.h"
+#include "EC_Default_ProxySupplier.h"
#include "EC_ObserverStrategy.h"
#include "EC_Null_Scheduling.h"
#include "EC_Reactive_Timeout_Generator.h"
#include "EC_Reactive_ConsumerControl.h"
#include "EC_Reactive_SupplierControl.h"
-#include "EC_Event_Channel.h" // @@ MSVC 6 bug
+#include "EC_Event_Channel_Base.h" // @@ MSVC 6 bug
#include "orbsvcs/ESF/ESF_Proxy_List.h"
#include "orbsvcs/ESF/ESF_Delayed_Changes.h"
@@ -25,12 +25,16 @@
ACE_RCSID(Event, EC_Basic_Factory, "$Id$")
+TAO_EC_Basic_Factory::TAO_EC_Basic_Factory (void)
+{
+}
+
TAO_EC_Basic_Factory::~TAO_EC_Basic_Factory (void)
{
}
TAO_EC_Dispatching*
-TAO_EC_Basic_Factory::create_dispatching (TAO_EC_Event_Channel *)
+TAO_EC_Basic_Factory::create_dispatching (TAO_EC_Event_Channel_Base *)
{
return new TAO_EC_Reactive_Dispatching ();
}
@@ -42,7 +46,7 @@ TAO_EC_Basic_Factory::destroy_dispatching (TAO_EC_Dispatching *x)
}
TAO_EC_Filter_Builder*
-TAO_EC_Basic_Factory::create_filter_builder (TAO_EC_Event_Channel *ec)
+TAO_EC_Basic_Factory::create_filter_builder (TAO_EC_Event_Channel_Base *ec)
{
return new TAO_EC_Basic_Filter_Builder (ec);
}
@@ -54,7 +58,7 @@ TAO_EC_Basic_Factory::destroy_filter_builder (TAO_EC_Filter_Builder *x)
}
TAO_EC_Supplier_Filter_Builder*
-TAO_EC_Basic_Factory::create_supplier_filter_builder (TAO_EC_Event_Channel *ec)
+TAO_EC_Basic_Factory::create_supplier_filter_builder (TAO_EC_Event_Channel_Base *ec)
{
return new TAO_EC_Trivial_Supplier_Filter_Builder (ec);
}
@@ -66,7 +70,7 @@ TAO_EC_Basic_Factory::destroy_supplier_filter_builder (TAO_EC_Supplier_Filter_Bu
}
TAO_EC_ConsumerAdmin*
-TAO_EC_Basic_Factory::create_consumer_admin (TAO_EC_Event_Channel *ec)
+TAO_EC_Basic_Factory::create_consumer_admin (TAO_EC_Event_Channel_Base *ec)
{
return new TAO_EC_ConsumerAdmin (ec);
}
@@ -78,7 +82,7 @@ TAO_EC_Basic_Factory::destroy_consumer_admin (TAO_EC_ConsumerAdmin *x)
}
TAO_EC_SupplierAdmin*
-TAO_EC_Basic_Factory::create_supplier_admin (TAO_EC_Event_Channel *ec)
+TAO_EC_Basic_Factory::create_supplier_admin (TAO_EC_Event_Channel_Base *ec)
{
return new TAO_EC_SupplierAdmin (ec);
}
@@ -90,9 +94,9 @@ TAO_EC_Basic_Factory::destroy_supplier_admin (TAO_EC_SupplierAdmin *x)
}
TAO_EC_ProxyPushSupplier*
-TAO_EC_Basic_Factory::create_proxy_push_supplier (TAO_EC_Event_Channel *ec)
+TAO_EC_Basic_Factory::create_proxy_push_supplier (TAO_EC_Event_Channel_Base *ec)
{
- return new TAO_EC_ProxyPushSupplier (ec, TAO_EC_DEFAULT_CONSUMER_VALIDATE_CONNECTION);
+ return new TAO_EC_Default_ProxyPushSupplier (ec, TAO_EC_DEFAULT_CONSUMER_VALIDATE_CONNECTION);
}
void
@@ -102,9 +106,9 @@ TAO_EC_Basic_Factory::destroy_proxy_push_supplier (TAO_EC_ProxyPushSupplier *x)
}
TAO_EC_ProxyPushConsumer*
-TAO_EC_Basic_Factory::create_proxy_push_consumer (TAO_EC_Event_Channel *ec)
+TAO_EC_Basic_Factory::create_proxy_push_consumer (TAO_EC_Event_Channel_Base *ec)
{
- return new TAO_EC_ProxyPushConsumer (ec);
+ return new TAO_EC_Default_ProxyPushConsumer (ec);
}
void
@@ -114,7 +118,7 @@ TAO_EC_Basic_Factory::destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer *x)
}
TAO_EC_Timeout_Generator*
-TAO_EC_Basic_Factory::create_timeout_generator (TAO_EC_Event_Channel *)
+TAO_EC_Basic_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *)
{
int argc = 0;
char **argv = 0;
@@ -131,7 +135,7 @@ TAO_EC_Basic_Factory::destroy_timeout_generator (TAO_EC_Timeout_Generator *x)
}
TAO_EC_ObserverStrategy*
-TAO_EC_Basic_Factory::create_observer_strategy (TAO_EC_Event_Channel *ec)
+TAO_EC_Basic_Factory::create_observer_strategy (TAO_EC_Event_Channel_Base *ec)
{
ACE_Lock* lock;
ACE_NEW_RETURN (lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, 0);
@@ -145,7 +149,7 @@ TAO_EC_Basic_Factory::destroy_observer_strategy (TAO_EC_ObserverStrategy *x)
}
TAO_EC_Scheduling_Strategy*
-TAO_EC_Basic_Factory::create_scheduling_strategy (TAO_EC_Event_Channel*)
+TAO_EC_Basic_Factory::create_scheduling_strategy (TAO_EC_Event_Channel_Base*)
{
return new TAO_EC_Null_Scheduling;
}
@@ -157,7 +161,7 @@ TAO_EC_Basic_Factory::destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy* x
}
TAO_EC_ProxyPushConsumer_Collection*
-TAO_EC_Basic_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel *)
+TAO_EC_Basic_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base *)
{
// This typedef is a workaround for a SunCC 4.2 bug
typedef TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>::Iterator TAO_EC_Consumer_List_Iterator;
@@ -174,7 +178,7 @@ TAO_EC_Basic_Factory::destroy_proxy_push_consumer_collection (TAO_EC_ProxyPushCo
}
TAO_EC_ProxyPushSupplier_Collection*
-TAO_EC_Basic_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Channel *)
+TAO_EC_Basic_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base *)
{
// This typedef is a workaround for a SunCC 4.2 bug
typedef TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>::Iterator TAO_EC_Supplier_List_Iterator;
@@ -215,7 +219,7 @@ TAO_EC_Basic_Factory::destroy_supplier_lock (ACE_Lock* x)
}
TAO_EC_ConsumerControl*
-TAO_EC_Basic_Factory::create_consumer_control (TAO_EC_Event_Channel* ec)
+TAO_EC_Basic_Factory::create_consumer_control (TAO_EC_Event_Channel_Base* ec)
{
int argc = 0;
char **argv = 0;
@@ -235,7 +239,7 @@ TAO_EC_Basic_Factory::destroy_consumer_control (TAO_EC_ConsumerControl* x)
}
TAO_EC_SupplierControl*
-TAO_EC_Basic_Factory::create_supplier_control (TAO_EC_Event_Channel* ec)
+TAO_EC_Basic_Factory::create_supplier_control (TAO_EC_Event_Channel_Base* ec)
{
int argc = 0;
char **argv = 0;
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.h b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.h
index f805e47c4ac..7260226b0b8 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.h
@@ -46,51 +46,51 @@ public:
// = The EC_Factory methods
virtual TAO_EC_Dispatching*
- create_dispatching (TAO_EC_Event_Channel*);
+ create_dispatching (TAO_EC_Event_Channel_Base*);
virtual void
destroy_dispatching (TAO_EC_Dispatching*);
virtual TAO_EC_Filter_Builder*
- create_filter_builder (TAO_EC_Event_Channel*);
+ create_filter_builder (TAO_EC_Event_Channel_Base*);
virtual void
destroy_filter_builder (TAO_EC_Filter_Builder*);
virtual TAO_EC_Supplier_Filter_Builder*
- create_supplier_filter_builder (TAO_EC_Event_Channel*);
+ create_supplier_filter_builder (TAO_EC_Event_Channel_Base*);
virtual void
destroy_supplier_filter_builder (TAO_EC_Supplier_Filter_Builder*);
virtual TAO_EC_ConsumerAdmin*
- create_consumer_admin (TAO_EC_Event_Channel*);
+ create_consumer_admin (TAO_EC_Event_Channel_Base*);
virtual void
destroy_consumer_admin (TAO_EC_ConsumerAdmin*);
virtual TAO_EC_SupplierAdmin*
- create_supplier_admin (TAO_EC_Event_Channel*);
+ create_supplier_admin (TAO_EC_Event_Channel_Base*);
virtual void
destroy_supplier_admin (TAO_EC_SupplierAdmin*);
virtual TAO_EC_ProxyPushSupplier*
- create_proxy_push_supplier (TAO_EC_Event_Channel*);
+ create_proxy_push_supplier (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_supplier (TAO_EC_ProxyPushSupplier*);
virtual TAO_EC_ProxyPushConsumer*
- create_proxy_push_consumer (TAO_EC_Event_Channel*);
+ create_proxy_push_consumer (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer*);
virtual TAO_EC_Timeout_Generator*
- create_timeout_generator (TAO_EC_Event_Channel*);
+ create_timeout_generator (TAO_EC_Event_Channel_Base*);
virtual void
destroy_timeout_generator (TAO_EC_Timeout_Generator*);
virtual TAO_EC_ObserverStrategy*
- create_observer_strategy (TAO_EC_Event_Channel*);
+ create_observer_strategy (TAO_EC_Event_Channel_Base*);
virtual void
destroy_observer_strategy (TAO_EC_ObserverStrategy*);
virtual TAO_EC_Scheduling_Strategy*
- create_scheduling_strategy (TAO_EC_Event_Channel*);
+ create_scheduling_strategy (TAO_EC_Event_Channel_Base*);
virtual void
destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy*);
virtual TAO_EC_ProxyPushConsumer_Collection*
- create_proxy_push_consumer_collection (TAO_EC_Event_Channel*);
+ create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_consumer_collection (TAO_EC_ProxyPushConsumer_Collection*);
virtual TAO_EC_ProxyPushSupplier_Collection*
- create_proxy_push_supplier_collection (TAO_EC_Event_Channel*);
+ create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_supplier_collection (TAO_EC_ProxyPushSupplier_Collection*);
@@ -100,11 +100,11 @@ public:
virtual void destroy_supplier_lock (ACE_Lock*);
virtual TAO_EC_ConsumerControl*
- create_consumer_control (TAO_EC_Event_Channel*);
+ create_consumer_control (TAO_EC_Event_Channel_Base*);
virtual void
destroy_consumer_control (TAO_EC_ConsumerControl*);
virtual TAO_EC_SupplierControl*
- create_supplier_control (TAO_EC_Event_Channel*);
+ create_supplier_control (TAO_EC_Event_Channel_Base*);
virtual void
destroy_supplier_control (TAO_EC_SupplierControl*);
};
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.i b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.i
index 115f6915927..74e88caa0c5 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.i
@@ -1,6 +1,2 @@
// $Id$
-ACE_INLINE
-TAO_EC_Basic_Factory::TAO_EC_Basic_Factory (void)
-{
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.h b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.h
index ddbfcfe1bbd..28e30d7b01f 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.h
@@ -24,7 +24,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
class TAO_EC_Filter;
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
/**
* @class TAO_EC_Basic_Filter_Builder
@@ -39,7 +39,7 @@ class TAO_RTEvent_Export TAO_EC_Basic_Filter_Builder : public TAO_EC_Filter_Buil
{
public:
/// constructor.
- TAO_EC_Basic_Filter_Builder (TAO_EC_Event_Channel* ec);
+ TAO_EC_Basic_Filter_Builder (TAO_EC_Event_Channel_Base* ec);
/// destructor...
virtual ~TAO_EC_Basic_Filter_Builder (void);
@@ -62,7 +62,7 @@ private:
private:
/// The event channel.
- TAO_EC_Event_Channel* event_channel_;
+ TAO_EC_Event_Channel_Base* event_channel_;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.i b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.i
index 3ee17166869..c4cffeb9f08 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.i
@@ -2,7 +2,7 @@
ACE_INLINE
TAO_EC_Basic_Filter_Builder::
- TAO_EC_Basic_Filter_Builder (TAO_EC_Event_Channel *ec)
+ TAO_EC_Basic_Filter_Builder (TAO_EC_Event_Channel_Base *ec)
: event_channel_ (ec)
{
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.h
index b2788d196a2..376c73e904e 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.h
@@ -93,10 +93,13 @@ private:
/**
* The number of words in the bit vector
+ */
+ size_t nwords_;
+
+ /**
* The bit vector to keep track of the children that have received
* their events.
*/
- size_t nwords_;
Word* bitvec_;
/// The current child in the iteration, used in the push() method...
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp
index 90f84370770..d026218286d 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp
@@ -3,7 +3,7 @@
#include "EC_ConsumerAdmin.h"
#include "EC_ProxySupplier.h"
#include "EC_ProxyConsumer.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "orbsvcs/ESF/ESF_Peer_Workers.h"
#include "orbsvcs/ESF/ESF_Peer_Admin.h"
#include "orbsvcs/ESF/ESF_Shutdown_Proxy.h"
@@ -14,8 +14,8 @@
ACE_RCSID(Event, EC_ConsumerAdmin, "$Id$")
-TAO_EC_ConsumerAdmin::TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel *ec)
- : TAO_ESF_Peer_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier,TAO_EC_ProxyPushConsumer> (ec)
+TAO_EC_ConsumerAdmin::TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel_Base *ec)
+ : TAO_ESF_Peer_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier,TAO_EC_ProxyPushConsumer> (ec)
{
this->default_POA_ =
this->event_channel_->consumer_poa ();
@@ -40,22 +40,24 @@ TAO_EC_ConsumerAdmin::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class TAO_ESF_Peer_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier,TAO_EC_ProxyPushConsumer>;
-template class TAO_ESF_Proxy_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier>;
+template class TAO_ESF_Peer_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier,TAO_EC_ProxyPushConsumer>;
+template class TAO_ESF_Proxy_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier>;
template class TAO_ESF_Worker<TAO_EC_ProxyPushSupplier>;
template class TAO_ESF_Shutdown_Proxy<TAO_EC_ProxyPushSupplier>;
template class TAO_ESF_Peer_Connected<TAO_EC_ProxyPushSupplier,TAO_EC_ProxyPushConsumer>;
template class TAO_ESF_Peer_Reconnected<TAO_EC_ProxyPushSupplier,TAO_EC_ProxyPushConsumer>;
template class TAO_ESF_Peer_Disconnected<TAO_EC_ProxyPushSupplier,TAO_EC_ProxyPushConsumer>;
+template class TAO_ESF_RefCountedRef<TAO_EC_ProxyPushSupplier>;
#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate TAO_ESF_Peer_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier,TAO_EC_ProxyPushConsumer>
-#pragma instantiate TAO_ESF_Proxy_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier>
+#pragma instantiate TAO_ESF_Peer_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier,TAO_EC_ProxyPushConsumer>
+#pragma instantiate TAO_ESF_Proxy_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier>
#pragma instantiate TAO_ESF_Worker<TAO_EC_ProxyPushSupplier>
#pragma instantiate TAO_ESF_Shutdown_Proxy<TAO_EC_ProxyPushSupplier>
#pragma instantiate TAO_ESF_Peer_Connected<TAO_EC_ProxyPushSupplier,TAO_EC_ProxyPushConsumer>
#pragma instantiate TAO_ESF_Peer_Reconnected<TAO_EC_ProxyPushSupplier,TAO_EC_ProxyPushConsumer>
#pragma instantiate TAO_ESF_Peer_Disconnected<TAO_EC_ProxyPushSupplier,TAO_EC_ProxyPushConsumer>
+#pragma instantiate TAO_ESF_RefCountedRef<TAO_EC_ProxyPushSupplier>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h
index 7914fc9f6c2..3185f8b9065 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h
@@ -25,7 +25,7 @@
#include "orbsvcs/ESF/ESF_Peer_Admin.h"
#include "event_export.h"
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
class TAO_EC_ProxyPushConsumer;
@@ -36,7 +36,7 @@ class TAO_EC_ProxyPushConsumer;
* TAO_EC_ProxyPushSupplier objects.
*
* <H2> Memory Management</H2>
- * It does not assume ownership of the TAO_EC_Event_Channel object;
+ * It does not assume ownership of the TAO_EC_Event_Channel_Base object;
* but it *does* assume ownership of the TAO_EC_ProxyPushSupplier_Set
* object.
*
@@ -45,7 +45,7 @@ class TAO_EC_ProxyPushConsumer;
*/
class TAO_RTEvent_Export TAO_EC_ConsumerAdmin
: public POA_RtecEventChannelAdmin::ConsumerAdmin
- , public TAO_ESF_Peer_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier,TAO_EC_ProxyPushConsumer>
+ , public TAO_ESF_Peer_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushSupplier,RtecEventChannelAdmin::ProxyPushSupplier,TAO_EC_ProxyPushConsumer>
{
public:
/**
@@ -53,7 +53,7 @@ public:
* the <event_channel> argument.
* In any case it assumes ownership.
*/
- TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel* event_channel);
+ TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel_Base* event_channel);
/// destructor...
virtual ~TAO_EC_ConsumerAdmin (void);
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerControl.h b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerControl.h
index 1d39d13cf24..0ed075d5a84 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerControl.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerControl.h
@@ -23,7 +23,7 @@
#include "tao/corba.h"
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
class TAO_EC_ProxyPushSupplier;
/**
@@ -41,7 +41,7 @@ public:
/// parameter.
TAO_EC_ConsumerControl (void);
- /// destructor...
+ /// Destructor...
virtual ~TAO_EC_ConsumerControl (void);
/// Activate any internal threads or timers used to poll the state of
@@ -58,7 +58,8 @@ public:
virtual void consumer_not_exist (TAO_EC_ProxyPushSupplier *proxy
ACE_ENV_ARG_DECL_NOT_USED);
- /// Some system exception was rasied while trying to push an event.
+ /// Some system exception was raised while trying to contact the
+ /// consumer
virtual void system_exception (TAO_EC_ProxyPushSupplier *proxy,
CORBA::SystemException &
ACE_ENV_ARG_DECL_NOT_USED);
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp
index a5f0a0b2871..53bf23ae00b 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp
@@ -1,20 +1,21 @@
// $Id$
#include "EC_Default_Factory.h"
+#include "EC_Reactive_Dispatching.h"
#include "EC_MT_Dispatching.h"
#include "EC_Basic_Filter_Builder.h"
#include "EC_Prefix_Filter_Builder.h"
#include "EC_ConsumerAdmin.h"
#include "EC_SupplierAdmin.h"
-#include "EC_ProxyConsumer.h"
-#include "EC_ProxySupplier.h"
+#include "EC_Default_ProxyConsumer.h"
+#include "EC_Default_ProxySupplier.h"
#include "EC_Trivial_Supplier_Filter.h"
#include "EC_Per_Supplier_Filter.h"
#include "EC_ObserverStrategy.h"
#include "EC_Null_Scheduling.h"
#include "EC_Group_Scheduling.h"
#include "EC_Reactive_Timeout_Generator.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_Reactive_ConsumerControl.h"
#include "EC_Reactive_SupplierControl.h"
@@ -48,6 +49,18 @@ TAO_EC_Default_Factory::init_svcs (void)
insert (&ace_svc_desc_TAO_EC_Default_Factory);
}
+void
+TAO_EC_Default_Factory::unsupported_option_value (const char * option_name,
+ const char * option_value)
+{
+ ACE_ERROR ((LM_ERROR,
+ "EC_Default_Factory -"
+ "Unsupported <%s> option value: <%s>. "
+ "Ignoring this option - using defaults instead.",
+ option_name,
+ option_value));
+}
+
int
TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
{
@@ -75,10 +88,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("mt")) == 0)
this->dispatching_ = 1;
else
- ACE_ERROR ((LM_ERROR,
- "EC_Default_Factory - "
- "unsupported dispatching <%s>\n",
- opt));
+ this->unsupported_option_value ("-ECDispatching", opt);
arg_shifter.consume_arg ();
}
}
@@ -109,10 +119,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("prefix")) == 0)
this->filtering_ = 2;
else
- ACE_ERROR ((LM_ERROR,
- "EC_Default_Factory - "
- "unsupported filtering <%s>\n",
- opt));
+ this->unsupported_option_value ("-ECFiltering", opt);
arg_shifter.consume_arg ();
}
}
@@ -131,10 +138,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("per-supplier")) == 0)
this->supplier_filtering_ = 1;
else
- ACE_ERROR ((LM_ERROR,
- "EC_Default_Factory - "
- "unsupported supplier filtering <%s>\n",
- opt));
+ this->unsupported_option_value ("-ECSupplierFilter", opt);
arg_shifter.consume_arg ();
}
}
@@ -149,10 +153,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("reactive")) == 0)
this->timeout_ = 0;
else
- ACE_ERROR ((LM_ERROR,
- "EC_Default_Factory - "
- "unsupported timeout <%s>\n",
- opt));
+ this->unsupported_option_value ("-ECTimeout", opt);
arg_shifter.consume_arg ();
}
}
@@ -169,10 +170,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("basic")) == 0)
this->observer_ = 1;
else
- ACE_ERROR ((LM_ERROR,
- "EC_Default_Factory - "
- "unsupported observer <%s>\n",
- opt));
+ this->unsupported_option_value ("-ECObserver", opt);
arg_shifter.consume_arg ();
}
}
@@ -189,10 +187,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("group")) == 0)
this->scheduling_ = 1;
else
- ACE_ERROR ((LM_ERROR,
- ACE_LIB_TEXT("EC_Default_Factory - ")
- ACE_LIB_TEXT("unsupported scheduling <%s>\n"),
- opt));
+ this->unsupported_option_value ("-ECScheduling", opt);
arg_shifter.consume_arg ();
}
}
@@ -233,8 +228,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else
ACE_ERROR ((LM_ERROR,
"EC_Default_Factory - "
- "unknown collection modifier <%s>\n",
- arg));
+ "Unknown consumer collection modifier <%s>.\n", arg));
}
ACE_OS::free (opt);
this->consumer_collection_ =
@@ -279,8 +273,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else
ACE_ERROR ((LM_ERROR,
"EC_Default_Factory - "
- "unknown collection modifier <%s>\n",
- arg));
+ "Unknown supplier collection modifier <%s>.\n", arg));
}
ACE_OS::free(opt);
this->supplier_collection_ =
@@ -303,10 +296,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("recursive")) == 0)
this->consumer_lock_ = 2;
else
- ACE_ERROR ((LM_ERROR,
- "EC_Default_Factory - "
- "unsupported consumer lock <%s>\n",
- opt));
+ this->unsupported_option_value ("-ECProxyConsumerLock", opt);
arg_shifter.consume_arg ();
}
}
@@ -325,10 +315,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("recursive")) == 0)
this->supplier_lock_ = 2;
else
- ACE_ERROR ((LM_ERROR,
- "EC_Default_Factory - "
- "unsupported supplier lock <%s>\n",
- opt));
+ this->unsupported_option_value ("-ECProxySupplierLock", opt);
arg_shifter.consume_arg ();
}
}
@@ -357,10 +344,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("reactive")) == 0)
this->consumer_control_ = 1;
else
- ACE_ERROR ((LM_ERROR,
- "EC_Default_Factory - "
- "unsupported consumer control <%s>\n",
- opt));
+ this->unsupported_option_value ("-ECConsumerControl", opt);
arg_shifter.consume_arg ();
}
}
@@ -377,10 +361,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[])
else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("reactive")) == 0)
this->supplier_control_ = 1;
else
- ACE_ERROR ((LM_ERROR,
- "EC_Default_Factory - "
- "unsupported supplier control <%s>\n",
- opt));
+ this->unsupported_option_value ("-ECSupplierControl", opt);
arg_shifter.consume_arg ();
}
}
@@ -500,7 +481,7 @@ TAO_EC_Default_Factory::fini (void)
// ****************************************************************
TAO_EC_Dispatching*
-TAO_EC_Default_Factory::create_dispatching (TAO_EC_Event_Channel *)
+TAO_EC_Default_Factory::create_dispatching (TAO_EC_Event_Channel_Base *)
{
if (this->dispatching_ == 0)
return new TAO_EC_Reactive_Dispatching ();
@@ -519,7 +500,7 @@ TAO_EC_Default_Factory::destroy_dispatching (TAO_EC_Dispatching *x)
}
TAO_EC_Filter_Builder*
-TAO_EC_Default_Factory::create_filter_builder (TAO_EC_Event_Channel *ec)
+TAO_EC_Default_Factory::create_filter_builder (TAO_EC_Event_Channel_Base *ec)
{
if (this->filtering_ == 0)
return new TAO_EC_Null_Filter_Builder ();
@@ -537,7 +518,7 @@ TAO_EC_Default_Factory::destroy_filter_builder (TAO_EC_Filter_Builder *x)
}
TAO_EC_Supplier_Filter_Builder*
-TAO_EC_Default_Factory::create_supplier_filter_builder (TAO_EC_Event_Channel *ec)
+TAO_EC_Default_Factory::create_supplier_filter_builder (TAO_EC_Event_Channel_Base *ec)
{
if (this->supplier_filtering_ == 0)
return new TAO_EC_Trivial_Supplier_Filter_Builder (ec);
@@ -553,7 +534,7 @@ TAO_EC_Default_Factory::destroy_supplier_filter_builder (TAO_EC_Supplier_Filter_
}
TAO_EC_ConsumerAdmin*
-TAO_EC_Default_Factory::create_consumer_admin (TAO_EC_Event_Channel *ec)
+TAO_EC_Default_Factory::create_consumer_admin (TAO_EC_Event_Channel_Base *ec)
{
return new TAO_EC_ConsumerAdmin (ec);
}
@@ -565,7 +546,7 @@ TAO_EC_Default_Factory::destroy_consumer_admin (TAO_EC_ConsumerAdmin *x)
}
TAO_EC_SupplierAdmin*
-TAO_EC_Default_Factory::create_supplier_admin (TAO_EC_Event_Channel *ec)
+TAO_EC_Default_Factory::create_supplier_admin (TAO_EC_Event_Channel_Base *ec)
{
return new TAO_EC_SupplierAdmin (ec);
}
@@ -577,9 +558,9 @@ TAO_EC_Default_Factory::destroy_supplier_admin (TAO_EC_SupplierAdmin *x)
}
TAO_EC_ProxyPushSupplier*
-TAO_EC_Default_Factory::create_proxy_push_supplier (TAO_EC_Event_Channel *ec)
+TAO_EC_Default_Factory::create_proxy_push_supplier (TAO_EC_Event_Channel_Base *ec)
{
- return new TAO_EC_ProxyPushSupplier (ec, consumer_validate_connection_);
+ return new TAO_EC_Default_ProxyPushSupplier (ec, consumer_validate_connection_);
}
void
@@ -589,9 +570,9 @@ TAO_EC_Default_Factory::destroy_proxy_push_supplier (TAO_EC_ProxyPushSupplier *x
}
TAO_EC_ProxyPushConsumer*
-TAO_EC_Default_Factory::create_proxy_push_consumer (TAO_EC_Event_Channel *ec)
+TAO_EC_Default_Factory::create_proxy_push_consumer (TAO_EC_Event_Channel_Base *ec)
{
- return new TAO_EC_ProxyPushConsumer (ec);
+ return new TAO_EC_Default_ProxyPushConsumer (ec);
}
void
@@ -601,7 +582,7 @@ TAO_EC_Default_Factory::destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer *x
}
TAO_EC_Timeout_Generator*
-TAO_EC_Default_Factory::create_timeout_generator (TAO_EC_Event_Channel *)
+TAO_EC_Default_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *)
{
if (this->timeout_ == 0)
{
@@ -628,14 +609,14 @@ TAO_EC_Default_Factory::destroy_timeout_generator (TAO_EC_Timeout_Generator *x)
}
TAO_EC_ObserverStrategy*
-TAO_EC_Default_Factory::create_observer_strategy (TAO_EC_Event_Channel *ec)
+TAO_EC_Default_Factory::create_observer_strategy (TAO_EC_Event_Channel_Base *ec)
{
if (this->observer_ == 0)
return new TAO_EC_Null_ObserverStrategy;
else if (this->observer_ == 1)
{
// @@ The lock should also be under control of the user...
- ACE_Lock* lock;
+ ACE_Lock* lock = 0;
ACE_NEW_RETURN (lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, 0);
return new TAO_EC_Basic_ObserverStrategy (ec, lock);
}
@@ -649,7 +630,7 @@ TAO_EC_Default_Factory::destroy_observer_strategy (TAO_EC_ObserverStrategy *x)
}
TAO_EC_Scheduling_Strategy*
-TAO_EC_Default_Factory::create_scheduling_strategy (TAO_EC_Event_Channel*)
+TAO_EC_Default_Factory::create_scheduling_strategy (TAO_EC_Event_Channel_Base*)
{
if (this->scheduling_ == 0)
return new TAO_EC_Null_Scheduling;
@@ -680,7 +661,7 @@ typedef
TAO_EC_ProxyPushConsumer_Collection*
-TAO_EC_Default_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel *)
+TAO_EC_Default_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base *)
{
if (this->consumer_collection_ == 0x000)
return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushConsumer,
@@ -773,7 +754,7 @@ TAO_EC_Default_Factory::destroy_proxy_push_consumer_collection (TAO_EC_ProxyPush
}
TAO_EC_ProxyPushSupplier_Collection*
-TAO_EC_Default_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Channel *)
+TAO_EC_Default_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base *)
{
if (this->supplier_collection_ == 0x000)
return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushSupplier,
@@ -902,7 +883,7 @@ TAO_EC_Default_Factory::destroy_supplier_lock (ACE_Lock* x)
}
TAO_EC_ConsumerControl*
-TAO_EC_Default_Factory::create_consumer_control (TAO_EC_Event_Channel* ec)
+TAO_EC_Default_Factory::create_consumer_control (TAO_EC_Event_Channel_Base* ec)
{
if (this->consumer_control_ == 0)
return new TAO_EC_ConsumerControl ();
@@ -926,7 +907,7 @@ TAO_EC_Default_Factory::destroy_consumer_control (TAO_EC_ConsumerControl* x)
}
TAO_EC_SupplierControl*
-TAO_EC_Default_Factory::create_supplier_control (TAO_EC_Event_Channel* ec)
+TAO_EC_Default_Factory::create_supplier_control (TAO_EC_Event_Channel_Base* ec)
{
if (this->supplier_control_ == 0)
return new TAO_EC_SupplierControl ();
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.h b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.h
index 3d054ee4221..f8213d3e805 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.h
@@ -57,51 +57,51 @@ public:
// = The EC_Factory methods
virtual TAO_EC_Dispatching*
- create_dispatching (TAO_EC_Event_Channel*);
+ create_dispatching (TAO_EC_Event_Channel_Base*);
virtual void
destroy_dispatching (TAO_EC_Dispatching*);
virtual TAO_EC_Filter_Builder*
- create_filter_builder (TAO_EC_Event_Channel*);
+ create_filter_builder (TAO_EC_Event_Channel_Base*);
virtual void
destroy_filter_builder (TAO_EC_Filter_Builder*);
virtual TAO_EC_Supplier_Filter_Builder*
- create_supplier_filter_builder (TAO_EC_Event_Channel*);
+ create_supplier_filter_builder (TAO_EC_Event_Channel_Base*);
virtual void
destroy_supplier_filter_builder (TAO_EC_Supplier_Filter_Builder*);
virtual TAO_EC_ConsumerAdmin*
- create_consumer_admin (TAO_EC_Event_Channel*);
+ create_consumer_admin (TAO_EC_Event_Channel_Base*);
virtual void
destroy_consumer_admin (TAO_EC_ConsumerAdmin*);
virtual TAO_EC_SupplierAdmin*
- create_supplier_admin (TAO_EC_Event_Channel*);
+ create_supplier_admin (TAO_EC_Event_Channel_Base*);
virtual void
destroy_supplier_admin (TAO_EC_SupplierAdmin*);
virtual TAO_EC_ProxyPushSupplier*
- create_proxy_push_supplier (TAO_EC_Event_Channel*);
+ create_proxy_push_supplier (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_supplier (TAO_EC_ProxyPushSupplier*);
virtual TAO_EC_ProxyPushConsumer*
- create_proxy_push_consumer (TAO_EC_Event_Channel*);
+ create_proxy_push_consumer (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer*);
virtual TAO_EC_Timeout_Generator*
- create_timeout_generator (TAO_EC_Event_Channel*);
+ create_timeout_generator (TAO_EC_Event_Channel_Base*);
virtual void
destroy_timeout_generator (TAO_EC_Timeout_Generator*);
virtual TAO_EC_ObserverStrategy*
- create_observer_strategy (TAO_EC_Event_Channel*);
+ create_observer_strategy (TAO_EC_Event_Channel_Base*);
virtual void
destroy_observer_strategy (TAO_EC_ObserverStrategy*);
virtual TAO_EC_Scheduling_Strategy*
- create_scheduling_strategy (TAO_EC_Event_Channel*);
+ create_scheduling_strategy (TAO_EC_Event_Channel_Base*);
virtual void
destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy*);
virtual TAO_EC_ProxyPushConsumer_Collection*
- create_proxy_push_consumer_collection (TAO_EC_Event_Channel*);
+ create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_consumer_collection (TAO_EC_ProxyPushConsumer_Collection*);
virtual TAO_EC_ProxyPushSupplier_Collection*
- create_proxy_push_supplier_collection (TAO_EC_Event_Channel*);
+ create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_supplier_collection (TAO_EC_ProxyPushSupplier_Collection*);
@@ -111,14 +111,32 @@ public:
virtual void destroy_supplier_lock (ACE_Lock*);
virtual TAO_EC_ConsumerControl*
- create_consumer_control (TAO_EC_Event_Channel*);
+ create_consumer_control (TAO_EC_Event_Channel_Base*);
virtual void
destroy_consumer_control (TAO_EC_ConsumerControl*);
virtual TAO_EC_SupplierControl*
- create_supplier_control (TAO_EC_Event_Channel*);
+ create_supplier_control (TAO_EC_Event_Channel_Base*);
virtual void
destroy_supplier_control (TAO_EC_SupplierControl*);
+ /// Accessors to consumer collection flags
+ int consumer_collection (void) const;
+
+ /// Accessors to supplier collection flags
+ int supplier_collection (void) const;
+
+ /// Accessors to supplier filtering flags
+ int supplier_filtering (void) const;
+
+ /// Accessor to ORBid
+ const ACE_CString& orb_id (void) const;
+protected:
+
+ /// Helper for agrument parsing. Prints out an error message about
+ /// unsupported option value.
+ void unsupported_option_value (const char * option_name,
+ const char * option_value);
+
protected:
/// Several flags to control the kind of object created.
int dispatching_;
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.i b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.i
index b41124a189c..08dbae36c08 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.i
@@ -26,3 +26,27 @@ TAO_EC_Default_Factory::TAO_EC_Default_Factory (void)
consumer_validate_connection_ (TAO_EC_DEFAULT_CONSUMER_VALIDATE_CONNECTION)
{
}
+
+ACE_INLINE int
+TAO_EC_Default_Factory::consumer_collection (void) const
+{
+ return this->consumer_collection_;
+}
+
+ACE_INLINE int
+TAO_EC_Default_Factory::supplier_collection (void) const
+{
+ return this->supplier_collection_;
+}
+
+ACE_INLINE int
+TAO_EC_Default_Factory::supplier_filtering (void) const
+{
+ return this->supplier_filtering_;
+}
+
+ACE_INLINE const ACE_CString&
+TAO_EC_Default_Factory::orb_id (void) const
+{
+ return this->orbid_;
+}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.cpp
new file mode 100644
index 00000000000..3d859dacdc0
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.cpp
@@ -0,0 +1,195 @@
+// $Id$
+
+#include "EC_Default_ProxyConsumer.h"
+#include "EC_Event_Channel_Base.h"
+#include "EC_Supplier_Filter_Builder.h"
+#include "EC_Supplier_Filter.h"
+#include "ace/Synch_T.h"
+
+
+#if ! defined (__ACE_INLINE__)
+#include "EC_Default_ProxyConsumer.i"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(Event, EC_Default_ProxyConsumer, "$Dd$")
+
+typedef ACE_Reverse_Lock<ACE_Lock> TAO_EC_Unlock;
+
+TAO_EC_Default_ProxyPushConsumer::
+ TAO_EC_Default_ProxyPushConsumer (TAO_EC_Event_Channel_Base* ec)
+ : TAO_EC_ProxyPushConsumer (ec)
+{
+}
+
+TAO_EC_Default_ProxyPushConsumer::~TAO_EC_Default_ProxyPushConsumer (void)
+{
+}
+
+void
+TAO_EC_Default_ProxyPushConsumer::connect_push_supplier (
+ RtecEventComm::PushSupplier_ptr push_supplier,
+ const RtecEventChannelAdmin::SupplierQOS& qos
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ RtecEventChannelAdmin::AlreadyConnected))
+{
+ {
+ ACE_GUARD_THROW_EX (
+ ACE_Lock, ace_mon, *this->lock_,
+ CORBA::INTERNAL ());
+ // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
+ ACE_CHECK;
+
+ if (this->is_connected_i ())
+ {
+ if (this->event_channel_->supplier_reconnect () == 0)
+ ACE_THROW (RtecEventChannelAdmin::AlreadyConnected ());
+
+ // Re-connections are allowed, go ahead and disconnect the
+ // consumer...
+ this->cleanup_i ();
+
+ // @@ Please read the comments in EC_ProxySuppliers about
+ // possible race conditions in this area...
+ TAO_EC_Unlock reverse_lock (*this->lock_);
+
+ {
+ ACE_GUARD_THROW_EX (
+ TAO_EC_Unlock, ace_mon, reverse_lock,
+ CORBA::INTERNAL ());
+ // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
+ ACE_CHECK;
+
+ this->event_channel_->reconnected (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+ // A separate thread could have connected siomultaneously,
+ // this is probably an application error, handle it as
+ // gracefully as possible
+ if (this->is_connected_i ())
+ return; // @@ Should we throw
+ }
+
+ this->supplier_ =
+ RtecEventComm::PushSupplier::_duplicate (push_supplier);
+ this->connected_ = 1;
+ this->qos_ = qos;
+
+#if TAO_EC_ENABLE_DEBUG_MESSAGES
+ ACE_DEBUG ((EC_FORMAT (DEBUG,
+ "Building filter for supplier <%x>."),
+ this));
+#endif /* TAO_EC_ENABLED_DEBUG_MESSAGES */
+ this->filter_ =
+ this->event_channel_->supplier_filter_builder ()->create (this->qos_);
+ this->filter_->bind (this);
+ }
+
+ // Notify the event channel...
+ this->event_channel_->connected (this ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_EC_Default_ProxyPushConsumer::push (const RtecEventComm::EventSet& event
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ TAO_EC_ProxyPushConsumer_Guard ace_mon (this->lock_,
+ this->refcount_,
+ this->event_channel_,
+ this);
+ if (!ace_mon.locked ())
+ return;
+
+ // No need to keep the lock, the filter_ class is supposed to be
+ // thread safe....
+ ace_mon.filter->push (event, this
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_EC_Default_ProxyPushConsumer::disconnect_push_consumer (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ RtecEventComm::PushSupplier_var supplier;
+ int connected = 0;
+
+ {
+ ACE_GUARD_THROW_EX (
+ ACE_Lock, ace_mon, *this->lock_,
+ CORBA::INTERNAL ());
+ // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
+ ACE_CHECK;
+
+ connected = this->is_connected_i ();
+ supplier = this->supplier_._retn ();
+ this->connected_ = 0;
+
+ if (connected)
+ this->cleanup_i ();
+ }
+
+ // Notify the event channel...
+ this->event_channel_->disconnected (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (supplier.in ()))
+ {
+ return;
+ }
+
+ if (this->event_channel_->disconnect_callbacks ())
+ {
+ ACE_TRY
+ {
+ supplier->disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ // Ignore exceptions, we must isolate other clients from
+ // failures on this one.
+ }
+ ACE_ENDTRY;
+ }
+}
+
+PortableServer::POA_ptr
+TAO_EC_Default_ProxyPushConsumer::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ return PortableServer::POA::_duplicate (this->default_POA_.in ());
+}
+
+void
+TAO_EC_Default_ProxyPushConsumer::_add_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ this->_incr_refcnt ();
+}
+
+void
+TAO_EC_Default_ProxyPushConsumer::_remove_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ this->_decr_refcnt ();
+}
+
+void
+TAO_EC_Default_ProxyPushConsumer::activate (
+ RtecEventChannelAdmin::ProxyPushConsumer_ptr &proxy
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ proxy = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+PortableServer::ObjectId
+TAO_EC_Default_ProxyPushConsumer::object_id (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ PortableServer::ObjectId_var result =
+ this->default_POA_->servant_to_id (this ACE_ENV_ARG_PARAMETER);
+ return result.in ();
+}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.h b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.h
new file mode 100644
index 00000000000..5ea34a693bd
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.h
@@ -0,0 +1,83 @@
+/* -*- C++ -*- */
+/**
+ * @file EC_Default_ProxyConsumer.h
+ *
+ * $Id$
+ *
+ * @author Carlos O'Ryan (coryan@cs.wustl.edu)
+ * @author Marina Spivak (marina@atdesk.com)
+ * @author Jason Smith (jason@atdesk.com)
+ *
+ */
+
+#ifndef TAO_EC_DEFAULT_PROXYCONSUMER_H
+#define TAO_EC_DEFAULT_PROXYCONSUMER_H
+#include "ace/pre.h"
+
+#include "orbsvcs/RtecEventChannelAdminS.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "EC_ProxyConsumer.h"
+
+class TAO_EC_Event_Channel_Base;
+class TAO_EC_ProxyPushSupplier;
+class TAO_EC_Supplier_Filter;
+
+/**
+ * @class TAO_EC_Default_ProxyPushConsumer
+ *
+ * @brief implements RtecEventChannelAdmin::ProxyPushConsumer interface.
+ *
+ */
+class TAO_RTEvent_Export TAO_EC_Default_ProxyPushConsumer :
+ public POA_RtecEventChannelAdmin::ProxyPushConsumer,
+ public TAO_EC_ProxyPushConsumer
+{
+public:
+
+ /// Constructor...
+ TAO_EC_Default_ProxyPushConsumer (TAO_EC_Event_Channel_Base* event_channel);
+
+ /// Destructor...
+ virtual ~TAO_EC_Default_ProxyPushConsumer (void);
+
+ void activate (
+ RtecEventChannelAdmin::ProxyPushConsumer_ptr &proxy
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // = The RtecEventChannelAdmin::ProxyPushConsumer methods...
+ virtual void connect_push_supplier (
+ RtecEventComm::PushSupplier_ptr push_supplier,
+ const RtecEventChannelAdmin::SupplierQOS& qos
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ RtecEventChannelAdmin::AlreadyConnected));
+ virtual void push (const RtecEventComm::EventSet& event
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // = The Servant methods
+ virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
+ virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL);
+ virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL);
+
+private:
+
+ virtual PortableServer::ObjectId
+ object_id (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+};
+
+
+#if defined (__ACE_INLINE__)
+#include "EC_Default_ProxyConsumer.i"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_EC_DEFAULT_PROXYCONSUMER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.i b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.i
new file mode 100644
index 00000000000..cfa1da318d3
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.i
@@ -0,0 +1 @@
+// $Id$
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.cpp
new file mode 100644
index 00000000000..1d141f7f95c
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.cpp
@@ -0,0 +1,222 @@
+// $Id$
+
+#include "EC_Default_ProxySupplier.h"
+#include "EC_Event_Channel_Base.h"
+#include "EC_Filter_Builder.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "EC_Default_ProxySupplier.i"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(Event, EC_ProxySupplier, "$Id$")
+
+typedef ACE_Reverse_Lock<ACE_Lock> TAO_EC_Unlock;
+
+TAO_EC_Default_ProxyPushSupplier::TAO_EC_Default_ProxyPushSupplier (
+ TAO_EC_Event_Channel_Base* ec,
+ int validate_connection)
+ : TAO_EC_ProxyPushSupplier (ec, validate_connection)
+{
+}
+
+TAO_EC_Default_ProxyPushSupplier::~TAO_EC_Default_ProxyPushSupplier (void)
+{
+}
+
+void
+TAO_EC_Default_ProxyPushSupplier::connect_push_consumer (
+ RtecEventComm::PushConsumer_ptr push_consumer,
+ const RtecEventChannelAdmin::ConsumerQOS& qos
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ RtecEventChannelAdmin::AlreadyConnected,
+ RtecEventChannelAdmin::TypeError))
+{
+ // Nil PushConsumers are illegal
+ if (CORBA::is_nil (push_consumer))
+ ACE_THROW (CORBA::BAD_PARAM ());
+
+ {
+ ACE_GUARD_THROW_EX (
+ ACE_Lock, ace_mon, *this->lock_,
+ CORBA::INTERNAL ());
+ // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
+ ACE_CHECK;
+
+ if (this->is_connected_i ())
+ {
+ if (this->event_channel_->consumer_reconnect () == 0)
+ ACE_THROW (RtecEventChannelAdmin::AlreadyConnected ());
+
+ // Re-connections are allowed....
+ this->cleanup_i ();
+
+ this->consumer_ =
+ RtecEventComm::PushConsumer::_duplicate (push_consumer);
+ this->qos_ = qos;
+ this->child_ =
+ this->event_channel_->filter_builder ()->build (this,
+ this->qos_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->adopt_child (this->child_);
+
+ TAO_EC_Unlock reverse_lock (*this->lock_);
+
+ {
+ ACE_GUARD_THROW_EX (
+ TAO_EC_Unlock, ace_mon, reverse_lock,
+ CORBA::INTERNAL ());
+ // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
+ ACE_CHECK;
+
+ this->event_channel_->reconnected (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+ // A separate thread could have connected simultaneously,
+ // this is probably an application error, handle it as
+ // gracefully as possible
+ if (this->is_connected_i ())
+ return; // @@ Should we throw
+ }
+
+ if ( consumer_validate_connection_ == 1 )
+ {
+ // Validate connection during connect.
+ CORBA::PolicyList_var unused;
+ int status = push_consumer->_validate_connection (unused
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+#if TAO_EC_ENABLE_DEBUG_MESSAGES
+ ACE_DEBUG ((LM_DEBUG, "Validated connection to PushConsumer on connect. Status[%d]\n", status));
+#else
+ ACE_UNUSED_ARG(status);
+#endif /* TAO_EC_ENABLED_DEBUG_MESSAGES */
+ }
+
+ this->consumer_ =
+ RtecEventComm::PushConsumer::_duplicate (push_consumer);
+ this->qos_ = qos;
+
+#if TAO_EC_ENABLE_DEBUG_MESSAGES
+ ACE_DEBUG ((EC_FORMAT (DEBUG,
+ "Building filters for consumer <%x>."),
+ this));
+#endif /* TAO_EC_ENABLED_DEBUG_MESSAGES */
+ this->child_ =
+ this->event_channel_->filter_builder ()->build (this,
+ this->qos_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->adopt_child (this->child_);
+ }
+
+ // Notify the event channel...
+ this->event_channel_->connected (this ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_EC_Default_ProxyPushSupplier::disconnect_push_supplier (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ RtecEventComm::PushConsumer_var consumer;
+ int connected = 0;
+
+ {
+ ACE_GUARD_THROW_EX (
+ ACE_Lock, ace_mon, *this->lock_,
+ CORBA::INTERNAL ());
+ // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
+ ACE_CHECK;
+
+ connected = this->is_connected_i ();
+ consumer = this->consumer_._retn ();
+
+ if (connected)
+ this->cleanup_i ();
+ }
+
+ // Notify the event channel....
+ this->event_channel_->disconnected (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (!connected)
+ {
+ return;
+ }
+
+ if (this->event_channel_->disconnect_callbacks ())
+ {
+ ACE_TRY
+ {
+ consumer->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ // Ignore exceptions, we must isolate other clients from
+ // problems on this one.
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "ProxySupplier::disconnect_push_supplier");
+ }
+ ACE_ENDTRY;
+ }
+}
+
+void
+TAO_EC_Default_ProxyPushSupplier::suspend_connection (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->suspend_connection_locked (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_EC_Default_ProxyPushSupplier::resume_connection (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->resume_connection_locked (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+PortableServer::POA_ptr
+TAO_EC_Default_ProxyPushSupplier::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ return PortableServer::POA::_duplicate (this->default_POA_.in ());
+}
+
+void
+TAO_EC_Default_ProxyPushSupplier::_add_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ this->_incr_refcnt ();
+}
+
+void
+TAO_EC_Default_ProxyPushSupplier::_remove_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ this->_decr_refcnt ();
+}
+
+void
+TAO_EC_Default_ProxyPushSupplier::activate (
+ RtecEventChannelAdmin::ProxyPushSupplier_ptr &proxy
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ proxy = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+PortableServer::ObjectId
+TAO_EC_Default_ProxyPushSupplier::object_id (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ PortableServer::ObjectId_var result =
+ this->default_POA_->servant_to_id (this ACE_ENV_ARG_PARAMETER);
+
+ return result.in ();
+}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.h b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.h
new file mode 100644
index 00000000000..1925324a27a
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.h
@@ -0,0 +1,79 @@
+/* -*- C++ -*- */
+/**
+ * @file EC_Default_ProxySupplier.h
+ *
+ * $Id$
+ *
+ * @author Carlos O'Ryan (coryan@cs.wustl.edu)
+ * @author Marina Spivak (marina@atdesk.com)
+ * @author Jason Smith (jason@atdesk.com)
+ */
+
+#ifndef TAO_DEFAULT_EC_PROXYSUPPLIER_H
+#define TAO_DEFAULT_EC_PROXYSUPPLIER_H
+#include "ace/pre.h"
+
+#include "orbsvcs/RtecEventChannelAdminS.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "EC_ProxySupplier.h"
+
+/**
+ * @class TAO_EC_Default_ProxyPushSupplier
+ *
+ * @brief Implement the ReliableEventChannelAdmin::ProxyPushSupplier
+ * interface
+ */
+class TAO_RTEvent_Export TAO_EC_Default_ProxyPushSupplier :
+ public POA_RtecEventChannelAdmin::ProxyPushSupplier,
+ public TAO_EC_ProxyPushSupplier
+{
+public:
+
+ /// Constructor...
+ TAO_EC_Default_ProxyPushSupplier (TAO_EC_Event_Channel_Base* event_channel, int validate_connection);
+
+ /// Destructor...
+ virtual ~TAO_EC_Default_ProxyPushSupplier (void);
+
+ void activate (
+ RtecEventChannelAdmin::ProxyPushSupplier_ptr &proxy
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// IDL methods.
+ virtual void connect_push_consumer (
+ RtecEventComm::PushConsumer_ptr push_consumer,
+ const RtecEventChannelAdmin::ConsumerQOS &qos
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ RtecEventChannelAdmin::AlreadyConnected,
+ RtecEventChannelAdmin::TypeError));
+ virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void suspend_connection (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void resume_connection (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // = The Servant methods
+ virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
+ virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL);
+ virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL);
+
+private:
+
+ virtual PortableServer::ObjectId
+ object_id (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+};
+
+#if defined (__ACE_INLINE__)
+#include "EC_Default_ProxySupplier.i"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_EC_DEFAULT_PROXYSUPPLIER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.i b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.i
new file mode 100644
index 00000000000..74e88caa0c5
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.i
@@ -0,0 +1,2 @@
+// $Id$
+
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.cpp
index 71f099ef2f3..c39e6ce5fbf 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.cpp
@@ -13,38 +13,3 @@ TAO_EC_Dispatching::~TAO_EC_Dispatching (void)
{
}
-// ****************************************************************
-
-TAO_EC_Reactive_Dispatching::TAO_EC_Reactive_Dispatching (void)
-{
-}
-
-void
-TAO_EC_Reactive_Dispatching::activate (void)
-{
-}
-
-void
-TAO_EC_Reactive_Dispatching::shutdown (void)
-{
-}
-
-void
-TAO_EC_Reactive_Dispatching::push (TAO_EC_ProxyPushSupplier* proxy,
- RtecEventComm::PushConsumer_ptr consumer,
- const RtecEventComm::EventSet& event,
- TAO_EC_QOS_Info&
- ACE_ENV_ARG_DECL)
-{
- proxy->reactive_push_to_consumer (consumer, event ACE_ENV_ARG_PARAMETER);
-}
-
-void
-TAO_EC_Reactive_Dispatching::push_nocopy (TAO_EC_ProxyPushSupplier* proxy,
- RtecEventComm::PushConsumer_ptr consumer,
- RtecEventComm::EventSet& event,
- TAO_EC_QOS_Info&
- ACE_ENV_ARG_DECL)
-{
- proxy->reactive_push_to_consumer (consumer, event ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.h b/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.h
index 3aa53499fd4..36205a1a135 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.h
@@ -41,7 +41,7 @@ class TAO_EC_ProxyPushSupplier;
class TAO_RTEvent_Export TAO_EC_Dispatching
{
public:
- /// destructor...
+ /// Destructor...
virtual ~TAO_EC_Dispatching (void);
/// Initialize all the data structures, activate any internal threads,
@@ -56,8 +56,8 @@ public:
virtual void shutdown (void) = 0;
/**
- * The consumer represented by <proxy> should receive <event>.
- * It can use the information in <qos_info> to determine the event
+ * The consumer represented by @a proxy should receive @a event.
+ * It can use the information in @a qos_info to determine the event
* priority (among other things).
*/
virtual void push (TAO_EC_ProxyPushSupplier *proxy,
@@ -72,38 +72,6 @@ public:
ACE_ENV_ARG_DECL_WITH_DEFAULTS) = 0;
};
-// ****************************************************************
-
-/**
- * @class TAO_EC_Reactive_Dispatching
- *
- * @brief Dispatch using the caller thread.
- *
- * The events are dispatched in FIFO ordering, using the invoking
- * thread to push the event to the consumer.
- */
-class TAO_RTEvent_Export TAO_EC_Reactive_Dispatching : public TAO_EC_Dispatching
-{
-public:
- /// The scheduler is used to find the range of priorities and similar
- /// info.
- TAO_EC_Reactive_Dispatching (void);
-
- // = The EC_Dispatching methods.
- virtual void activate (void);
- virtual void shutdown (void);
- virtual void push (TAO_EC_ProxyPushSupplier *proxy,
- RtecEventComm::PushConsumer_ptr consumer,
- const RtecEventComm::EventSet &event,
- TAO_EC_QOS_Info &qos_info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- virtual void push_nocopy (TAO_EC_ProxyPushSupplier *proxy,
- RtecEventComm::PushConsumer_ptr consumer,
- RtecEventComm::EventSet &event,
- TAO_EC_QOS_Info &qos_info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-};
-
#if defined (__ACE_INLINE__)
#include "EC_Dispatching.i"
#endif /* __ACE_INLINE__ */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp
index 1de5de3116c..e15f04e497d 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp
@@ -2,13 +2,6 @@
#include "EC_Event_Channel.h"
#include "EC_Default_Factory.h"
-#include "EC_Dispatching.h"
-#include "EC_ConsumerAdmin.h"
-#include "EC_SupplierAdmin.h"
-#include "EC_Timeout_Generator.h"
-#include "EC_ObserverStrategy.h"
-#include "EC_ConsumerControl.h"
-#include "EC_SupplierControl.h"
#include "ace/Dynamic_Service.h"
#if ! defined (__ACE_INLINE__)
@@ -21,272 +14,24 @@ TAO_EC_Event_Channel::
TAO_EC_Event_Channel (const TAO_EC_Event_Channel_Attributes& attr,
TAO_EC_Factory* factory,
int own_factory)
- : supplier_poa_ (PortableServer::POA::_duplicate (attr.supplier_poa)),
- consumer_poa_ (PortableServer::POA::_duplicate (attr.consumer_poa)),
- factory_ (factory),
- own_factory_ (own_factory),
- consumer_reconnect_ (attr.consumer_reconnect),
- supplier_reconnect_ (attr.supplier_reconnect),
- disconnect_callbacks_ (attr.disconnect_callbacks),
- busy_hwm_ (attr.busy_hwm),
- max_write_delay_ (attr.max_write_delay)
- , status_ (EC_S_IDLE)
+ : TAO_EC_Event_Channel_Base (attr, factory, own_factory)
{
- if (this->factory_ == 0)
+ if (this->factory () == 0)
{
- this->factory_ =
- ACE_Dynamic_Service<TAO_EC_Factory>::instance ("EC_Factory");
- this->own_factory_ = 0;
+ this->factory (
+ ACE_Dynamic_Service<TAO_EC_Factory>::instance ("EC_Factory"),
+ 0);
- if (this->factory_ == 0)
+ if (this->factory () == 0)
{
- ACE_NEW (this->factory_,
+ TAO_EC_Factory *f = 0;
+ ACE_NEW (f,
TAO_EC_Default_Factory);
- this->own_factory_ = 1;
+ this->factory (f, 1);
}
}
this->scheduler_ =
CORBA::Object::_duplicate (attr.scheduler);
- this->dispatching_ =
- this->factory_->create_dispatching (this);
- this->filter_builder_ =
- this->factory_->create_filter_builder (this);
- this->supplier_filter_builder_ =
- this->factory_->create_supplier_filter_builder (this);
- this->consumer_admin_ =
- this->factory_->create_consumer_admin (this);
- this->supplier_admin_ =
- this->factory_->create_supplier_admin (this);
- this->timeout_generator_ =
- this->factory_->create_timeout_generator (this);
- this->observer_strategy_ =
- this->factory_->create_observer_strategy (this);
-
- this->scheduling_strategy_ =
- this->factory_->create_scheduling_strategy (this);
-
- this->consumer_control_ =
- this->factory_->create_consumer_control (this);
- this->supplier_control_ =
- this->factory_->create_supplier_control (this);
-}
-
-TAO_EC_Event_Channel::~TAO_EC_Event_Channel (void)
-{
- this->factory_->destroy_dispatching (this->dispatching_);
- this->dispatching_ = 0;
- this->factory_->destroy_filter_builder (this->filter_builder_);
- this->filter_builder_ = 0;
- this->factory_->destroy_supplier_filter_builder (this->supplier_filter_builder_);
- this->supplier_filter_builder_ = 0;
- this->factory_->destroy_consumer_admin (this->consumer_admin_);
- this->consumer_admin_ = 0;
- this->factory_->destroy_supplier_admin (this->supplier_admin_);
- this->supplier_admin_ = 0;
- this->factory_->destroy_timeout_generator (this->timeout_generator_);
- this->timeout_generator_ = 0;
- this->factory_->destroy_observer_strategy (this->observer_strategy_);
- this->observer_strategy_ = 0;
-
- this->factory_->destroy_scheduling_strategy (this->scheduling_strategy_);
- this->scheduling_strategy_ = 0;
-
- this->factory_->destroy_consumer_control (this->consumer_control_);
- this->consumer_control_ = 0;
- this->factory_->destroy_supplier_control (this->supplier_control_);
- this->supplier_control_ = 0;
-
- if (this->own_factory_)
- delete this->factory_;
-}
-
-void
-TAO_EC_Event_Channel::activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- {
- // First check if the EC is idle, if it is not then we need to
- // return right away...
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
- if (this->status_ != EC_S_IDLE)
- return;
- this->status_ = EC_S_ACTIVATING;
- }
- this->dispatching_->activate ();
- this->timeout_generator_->activate ();
- this->consumer_control_->activate ();
- this->supplier_control_->activate ();
- {
- // Only when all the operations complete successfully we can mark
- // the EC as active...
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
- ACE_ASSERT (this->status_ == EC_S_ACTIVATING);
- this->status_ = EC_S_ACTIVE;
- }
-}
-
-void
-TAO_EC_Event_Channel::shutdown (ACE_ENV_SINGLE_ARG_DECL)
-{
- {
- // First check if the EC is already active, if it is not then we
- // need to return right away...
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
- if (this->status_ != EC_S_ACTIVE)
- return;
- this->status_ = EC_S_DESTROYING;
- }
- this->dispatching_->shutdown ();
- this->timeout_generator_->shutdown ();
- this->supplier_control_->shutdown ();
- this->consumer_control_->shutdown ();
-
- PortableServer::POA_var consumer_poa =
- this->consumer_admin_->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- PortableServer::ObjectId_var consumer_id =
- consumer_poa->servant_to_id (this->consumer_admin_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- consumer_poa->deactivate_object (consumer_id.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::POA_var supplier_poa =
- this->supplier_admin_->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- PortableServer::ObjectId_var supplier_id =
- supplier_poa->servant_to_id (this->supplier_admin_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- supplier_poa->deactivate_object (supplier_id.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier_admin_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->consumer_admin_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- {
- // Wait until all the shutdown() operations return before marking
- // the EC as destroyed...
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
- ACE_ASSERT (this->status_ == EC_S_DESTROYING);
- this->status_ = EC_S_DESTROYED;
- }
-}
-
-void
-TAO_EC_Event_Channel::connected (TAO_EC_ProxyPushConsumer* consumer
- ACE_ENV_ARG_DECL)
-{
- this->consumer_admin_->peer_connected (consumer ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier_admin_->connected (consumer ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->observer_strategy_->connected (consumer ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_EC_Event_Channel::reconnected (TAO_EC_ProxyPushConsumer* consumer
- ACE_ENV_ARG_DECL)
-{
- this->consumer_admin_->peer_reconnected (consumer ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier_admin_->reconnected (consumer ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->observer_strategy_->connected (consumer ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_EC_Event_Channel::disconnected (TAO_EC_ProxyPushConsumer* consumer
- ACE_ENV_ARG_DECL)
-{
- this->consumer_admin_->peer_disconnected (consumer ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier_admin_->disconnected (consumer ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->observer_strategy_->disconnected (consumer ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_EC_Event_Channel::connected (TAO_EC_ProxyPushSupplier* supplier
- ACE_ENV_ARG_DECL)
-{
- this->supplier_admin_->peer_connected (supplier ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer_admin_->connected (supplier ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->observer_strategy_->connected (supplier ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_EC_Event_Channel::reconnected (TAO_EC_ProxyPushSupplier* supplier
- ACE_ENV_ARG_DECL)
-{
- this->supplier_admin_->peer_reconnected (supplier ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer_admin_->reconnected (supplier ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->observer_strategy_->connected (supplier ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_EC_Event_Channel::disconnected (TAO_EC_ProxyPushSupplier* supplier
- ACE_ENV_ARG_DECL)
-{
- this->supplier_admin_->peer_disconnected (supplier ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer_admin_->disconnected (supplier ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->observer_strategy_->disconnected (supplier ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-RtecEventChannelAdmin::ConsumerAdmin_ptr
-TAO_EC_Event_Channel::for_consumers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->consumer_admin_->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-RtecEventChannelAdmin::SupplierAdmin_ptr
-TAO_EC_Event_Channel::for_suppliers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->supplier_admin_->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_EC_Event_Channel::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-RtecEventChannelAdmin::Observer_Handle
-TAO_EC_Event_Channel::append_observer (
- RtecEventChannelAdmin::Observer_ptr observer
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
- RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER))
-{
- return this->observer_strategy_->append_observer (observer ACE_ENV_ARG_PARAMETER);
-}
-
-void
-TAO_EC_Event_Channel::remove_observer (
- RtecEventChannelAdmin::Observer_Handle handle
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
- RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER))
-{
- this->observer_strategy_->remove_observer (handle ACE_ENV_ARG_PARAMETER);
+ this->create_strategies ();
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h
index e67dea2f8c9..5bf1622232b 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h
@@ -5,6 +5,8 @@
* $Id$
*
* @author Carlos O'Ryan (coryan@cs.wustl.edu)
+ * @author Marina Spivak (marina@atdesk.com)
+ * @author Jason Smith (jason@atdesk.com)
*
* Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and
* other members of the DOC group. More details can be found in:
@@ -16,80 +18,12 @@
#define TAO_EC_EVENT_CHANNEL_H
#include "ace/pre.h"
-#include "EC_Factory.h"
+#include "EC_Event_Channel_Base.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "EC_Defaults.h"
-#include "orbsvcs/RtecEventChannelAdminS.h"
-
-/**
- * @class TAO_EC_Event_Channel_Attributes
- *
- * @brief Defines the construction time attributes for the Event
- * Channel.
- *
- * The event channel implementation is controlled by two
- * mechanisms:
- * The EC_Factory that provides the strategies for the EC
- * implementation.
- * The EC attributes that define constants and values required
- * by the EC construction.
- * This class encapsulates those constants and values, providing
- * an easy mechanism to extend the attributes without requiring
- * changes in the EC constructor.
- */
-class TAO_RTEvent_Export TAO_EC_Event_Channel_Attributes
-{
-public:
- /**
- * The basic constructor.
- * The attributes listed as arguments are *required* by the EC, and
- * no appropiate defaults are available for them.
- */
- TAO_EC_Event_Channel_Attributes (PortableServer::POA_ptr supplier_poa,
- PortableServer::POA_ptr consumer_poa);
-
- // Most fields are public, there is no need to protect them, in fact
- // the user should be able to set any values she wants.
-
- /// Can consumers or suppliers invoke connect_push_* multiple times?
- int consumer_reconnect;
- int supplier_reconnect;
-
- /**
- * It not zero the event channel will send disconnect callbacks when
- * a disconnect method is called on a Proxy. In other words, if a
- * consumer calls disconnect_push_supplier() on its proxy the EC
- * will invoke disconnect_push_consumer() on the consumer. A
- * similar thing is done for suppliers.
- * It is a matter of debate what the spec requires for the regular
- * event service.
- */
- int disconnect_callbacks;
-
- /// Flags for the Consumer Admin
- int busy_hwm;
- int max_write_delay;
-
- /**
- * The scheduling service that we will use with this event channel.
- * Notice that this is optional and will only take effect if the EC
- * is configured with the right filtering strategies.
- */
- CORBA::Object_ptr scheduler;
-
-private:
- /// Only the EC can read the private fields.
- friend class TAO_EC_Event_Channel;
-
- /// The POAs
- PortableServer::POA_ptr supplier_poa;
- PortableServer::POA_ptr consumer_poa;
-};
-
/**
* @class TAO_EC_Event_Channel
*
@@ -102,9 +36,8 @@ private:
* ConsumerAdmin and Dispatching) and to provide a simpler
* interface to the EC_Factory.
*/
-class TAO_RTEvent_Export TAO_EC_Event_Channel
- : public POA_RtecEventChannelAdmin::EventChannel
- , public PortableServer::RefCountServantBase
+class TAO_RTEvent_Export TAO_EC_Event_Channel :
+ public TAO_EC_Event_Channel_Base
{
public:
/**
@@ -116,223 +49,6 @@ public:
TAO_EC_Event_Channel (const TAO_EC_Event_Channel_Attributes& attributes,
TAO_EC_Factory* factory = 0,
int own_factory = 0);
-
- /// destructor
- virtual ~TAO_EC_Event_Channel (void);
-
- /// Start the internal threads (if any), etc.
- /// After this call the EC can be used.
- virtual void activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
- /// Shutdown any internal threads, cleanup all the internal
- /// structures, flush all the messages, etc.
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
- /// Access the dispatching module....
- TAO_EC_Dispatching* dispatching (void) const;
-
- /// Access the filter builder....
- TAO_EC_Filter_Builder* filter_builder (void) const;
-
- /// Access the filter builder....
- TAO_EC_Supplier_Filter_Builder* supplier_filter_builder (void) const;
-
- /// Access the consumer admin implementation, useful for controlling
- /// the activation...
- TAO_EC_ConsumerAdmin* consumer_admin (void) const;
-
- /// Access the supplier admin implementation, useful for controlling
- /// the activation...
- TAO_EC_SupplierAdmin* supplier_admin (void) const;
-
- /// Access the timer module...
- TAO_EC_Timeout_Generator* timeout_generator (void) const;
-
- /// Access the scheduling strategy
- TAO_EC_Scheduling_Strategy* scheduling_strategy (void) const;
-
- /// Access the client control strategies.
- TAO_EC_ConsumerControl *consumer_control (void) const;
- TAO_EC_SupplierControl *supplier_control (void) const;
-
- // = The factory methods, they delegate on the EC_Factory.
- /// Create and destroy a ProxyPushSupplier
- void create_proxy (TAO_EC_ProxyPushSupplier*&);
- void destroy_proxy (TAO_EC_ProxyPushSupplier*);
-
- /// Create and destroy a ProxyPushConsumer
- void create_proxy (TAO_EC_ProxyPushConsumer*&);
- void destroy_proxy (TAO_EC_ProxyPushConsumer*);
-
-
- /// Create and destroy a the collections used to store
- /// ProxyPushSuppliers
- void create_proxy_collection (TAO_EC_ProxyPushSupplier_Collection*&);
- void destroy_proxy_collection (TAO_EC_ProxyPushSupplier_Collection*);
-
-
- /// Create and destroy a the collections used to store
- /// ProxyPushConsumers
- void create_proxy_collection (TAO_EC_ProxyPushConsumer_Collection*&);
- void destroy_proxy_collection (TAO_EC_ProxyPushConsumer_Collection*);
-
- /// Access the supplier and consumer POAs from the factory.
- PortableServer::POA_ptr supplier_poa (void);
- PortableServer::POA_ptr consumer_poa (void);
-
- /// Locking strategies for the ProxyPushConsumer and
- /// ProxyPushSupplier objects
- ACE_Lock* create_consumer_lock (void);
- void destroy_consumer_lock (ACE_Lock*);
- ACE_Lock* create_supplier_lock (void);
- void destroy_supplier_lock (ACE_Lock*);
-
- /// Used to inform the EC that a Consumer has connected or
- /// disconnected from it.
- virtual void connected (TAO_EC_ProxyPushConsumer*
- ACE_ENV_ARG_DECL_NOT_USED);
- virtual void reconnected (TAO_EC_ProxyPushConsumer*
- ACE_ENV_ARG_DECL_NOT_USED);
- virtual void disconnected (TAO_EC_ProxyPushConsumer*
- ACE_ENV_ARG_DECL_NOT_USED);
-
- /// Used to inform the EC that a Supplier has connected or
- /// disconnected from it.
- virtual void connected (TAO_EC_ProxyPushSupplier*
- ACE_ENV_ARG_DECL_NOT_USED);
- virtual void reconnected (TAO_EC_ProxyPushSupplier*
- ACE_ENV_ARG_DECL_NOT_USED);
- virtual void disconnected (TAO_EC_ProxyPushSupplier*
- ACE_ENV_ARG_DECL_NOT_USED);
-
- // Simple flags to control the EC behavior, set by the application
- // at construction time.
-
- /// Can the consumers reconnect to the EC?
- int consumer_reconnect (void) const;
-
- /// Can the suppliers reconnect to the EC?
- int supplier_reconnect (void) const;
-
- /// Should we send callback disconnect messages when a proxy is
- /// disconnected by the client
- int disconnect_callbacks (void) const;
-
- /// Obtain the scheduler, the user must release
- CORBA::Object_ptr scheduler (void);
-
- /// Control the concurrency of the delayed connect/disconnect
- /// operations.
- int busy_hwm (void) const;
- int max_write_delay (void) const;
-
- // = The RtecEventChannelAdmin::EventChannel methods...
- /// The default implementation is:
- /// this->consumer_admin ()->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- virtual RtecEventChannelAdmin::ConsumerAdmin_ptr
- for_consumers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// The default implementation is:
- /// this->supplier_admin ()->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- virtual RtecEventChannelAdmin::SupplierAdmin_ptr
- for_suppliers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Commit suicide.
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual RtecEventChannelAdmin::Observer_Handle
- append_observer (RtecEventChannelAdmin::Observer_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
- RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER));
- virtual void
- remove_observer (RtecEventChannelAdmin::Observer_Handle
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
- RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER));
-
- /// Return 1 if the event channel is already destroyed.
- int destroyed (void);
-
-private:
- /// The POAs used to activate "supplier-side" and "consumer-side"
- /// objects.
- PortableServer::POA_var supplier_poa_;
- PortableServer::POA_var consumer_poa_;
-
- /**
- * This is the abstract factory that creates all the objects that
- * compose an event channel, the event channel simply acts as a
- * Mediator among them.
- */
- TAO_EC_Factory *factory_;
-
- /// Flag that indicates if we own the factory.
- int own_factory_;
-
- /// The dispatching "module"
- TAO_EC_Dispatching *dispatching_;
-
- /// The filter builder
- TAO_EC_Filter_Builder *filter_builder_;
-
- /// The filter builder for suppliers
- TAO_EC_Supplier_Filter_Builder *supplier_filter_builder_;
-
- /// The ConsumerAdmin implementation
- TAO_EC_ConsumerAdmin *consumer_admin_;
-
- /// The SupplierAdmin implementation
- TAO_EC_SupplierAdmin *supplier_admin_;
-
- /// The timeout generator
- TAO_EC_Timeout_Generator *timeout_generator_;
-
- /// The observer strategy
- TAO_EC_ObserverStrategy *observer_strategy_;
-
- /// The scheduler (may be nil)
- CORBA::Object_var scheduler_;
-
- /// The scheduling strategy
- TAO_EC_Scheduling_Strategy *scheduling_strategy_;
-
- /// Consumer/Supplier reconnection flags
- int consumer_reconnect_;
- int supplier_reconnect_;
-
- /// If not zero we send callbacks when a proxy is disconnected
- int disconnect_callbacks_;
-
- /// Control the level of concurrency in the supplier sets with
- /// delayed operations
- int busy_hwm_;
- int max_write_delay_;
-
- /// Strategies to disconnect misbehaving or destroyed consumers and
- /// suppliers
- TAO_EC_ConsumerControl *consumer_control_;
- TAO_EC_SupplierControl *supplier_control_;
-
- /// Mutex to protect the internal state
- TAO_SYNCH_MUTEX mutex_;
-
- /// Flag to track the status of the event channel
- enum {
- EC_S_IDLE
- , EC_S_ACTIVATING
- , EC_S_ACTIVE
- , EC_S_DESTROYING
- , EC_S_DESTROYED
- };
- int status_;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.i b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.i
index 4e3b104a717..74e88caa0c5 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.i
@@ -1,197 +1,2 @@
// $Id$
-ACE_INLINE
-TAO_EC_Event_Channel_Attributes::
-TAO_EC_Event_Channel_Attributes (PortableServer::POA_ptr s_poa,
- PortableServer::POA_ptr c_poa)
- : consumer_reconnect (TAO_EC_DEFAULT_CONSUMER_RECONNECT),
- supplier_reconnect (TAO_EC_DEFAULT_SUPPLIER_RECONNECT),
- disconnect_callbacks (TAO_EC_DEFAULT_DISCONNECT_CALLBACKS),
- busy_hwm (TAO_EC_DEFAULT_BUSY_HWM),
- max_write_delay (TAO_EC_DEFAULT_MAX_WRITE_DELAY),
- scheduler (CORBA::Object::_nil ()),
- supplier_poa (s_poa),
- consumer_poa (c_poa)
-{
-}
-
-ACE_INLINE TAO_EC_Dispatching*
-TAO_EC_Event_Channel::dispatching (void) const
-{
- return this->dispatching_;
-}
-
-ACE_INLINE TAO_EC_Filter_Builder*
-TAO_EC_Event_Channel::filter_builder (void) const
-{
- return this->filter_builder_;
-}
-
-ACE_INLINE TAO_EC_Supplier_Filter_Builder*
-TAO_EC_Event_Channel::supplier_filter_builder (void) const
-{
- return this->supplier_filter_builder_;
-}
-
-ACE_INLINE TAO_EC_ConsumerAdmin*
-TAO_EC_Event_Channel::consumer_admin (void) const
-{
- return this->consumer_admin_;
-}
-
-ACE_INLINE TAO_EC_SupplierAdmin*
-TAO_EC_Event_Channel::supplier_admin (void) const
-{
- return this->supplier_admin_;
-}
-
-ACE_INLINE TAO_EC_Timeout_Generator*
-TAO_EC_Event_Channel::timeout_generator (void) const
-{
- return this->timeout_generator_;
-}
-
-ACE_INLINE TAO_EC_Scheduling_Strategy*
-TAO_EC_Event_Channel::scheduling_strategy (void) const
-{
- return this->scheduling_strategy_;
-}
-
-ACE_INLINE TAO_EC_ConsumerControl*
-TAO_EC_Event_Channel::consumer_control (void) const
-{
- return this->consumer_control_;
-}
-
-ACE_INLINE TAO_EC_SupplierControl*
-TAO_EC_Event_Channel::supplier_control (void) const
-{
- return this->supplier_control_;
-}
-
-ACE_INLINE void
-TAO_EC_Event_Channel::create_proxy (TAO_EC_ProxyPushSupplier*& x)
-{
- x = this->factory_->create_proxy_push_supplier (this);
-}
-
-ACE_INLINE void
-TAO_EC_Event_Channel::destroy_proxy (TAO_EC_ProxyPushSupplier* supplier)
-{
- this->factory_->destroy_proxy_push_supplier (supplier);
-}
-
-ACE_INLINE void
-TAO_EC_Event_Channel::create_proxy (TAO_EC_ProxyPushConsumer*& x)
-{
- x = this->factory_->create_proxy_push_consumer (this);
-}
-
-ACE_INLINE void
-TAO_EC_Event_Channel::destroy_proxy (TAO_EC_ProxyPushConsumer* consumer)
-{
- this->factory_->destroy_proxy_push_consumer (consumer);
-}
-
-ACE_INLINE void
-TAO_EC_Event_Channel::create_proxy_collection (TAO_EC_ProxyPushConsumer_Collection*& x)
-{
- x = this->factory_->create_proxy_push_consumer_collection (this);
-}
-
-ACE_INLINE void
-TAO_EC_Event_Channel::destroy_proxy_collection (TAO_EC_ProxyPushConsumer_Collection* x)
-{
- this->factory_->destroy_proxy_push_consumer_collection (x);
-}
-
-ACE_INLINE void
-TAO_EC_Event_Channel::create_proxy_collection (TAO_EC_ProxyPushSupplier_Collection*& x)
-{
- x = this->factory_->create_proxy_push_supplier_collection (this);
-}
-
-ACE_INLINE void
-TAO_EC_Event_Channel::destroy_proxy_collection (TAO_EC_ProxyPushSupplier_Collection* x)
-{
- this->factory_->destroy_proxy_push_supplier_collection (x);
-}
-
-ACE_INLINE PortableServer::POA_ptr
-TAO_EC_Event_Channel::supplier_poa (void)
-{
- return PortableServer::POA::_duplicate (this->supplier_poa_.in ());
-}
-
-ACE_INLINE PortableServer::POA_ptr
-TAO_EC_Event_Channel::consumer_poa (void)
-{
- return PortableServer::POA::_duplicate (this->consumer_poa_.in ());
-}
-
-ACE_INLINE ACE_Lock*
-TAO_EC_Event_Channel::create_consumer_lock (void)
-{
- return this->factory_->create_consumer_lock ();
-}
-
-ACE_INLINE void
-TAO_EC_Event_Channel::destroy_consumer_lock (ACE_Lock* x)
-{
- this->factory_->destroy_consumer_lock (x);
-}
-
-ACE_INLINE ACE_Lock*
-TAO_EC_Event_Channel::create_supplier_lock (void)
-{
- return this->factory_->create_supplier_lock ();
-}
-
-ACE_INLINE void
-TAO_EC_Event_Channel::destroy_supplier_lock (ACE_Lock* x)
-{
- this->factory_->destroy_supplier_lock (x);
-}
-
-ACE_INLINE int
-TAO_EC_Event_Channel::consumer_reconnect (void) const
-{
- return this->consumer_reconnect_;
-}
-
-ACE_INLINE int
-TAO_EC_Event_Channel::supplier_reconnect (void) const
-{
- return this->supplier_reconnect_;
-}
-
-ACE_INLINE int
-TAO_EC_Event_Channel::disconnect_callbacks (void) const
-{
- return this->disconnect_callbacks_;
-}
-
-ACE_INLINE CORBA::Object_ptr
-TAO_EC_Event_Channel::scheduler (void)
-{
- return CORBA::Object::_duplicate (this->scheduler_.in ());
-}
-
-ACE_INLINE int
-TAO_EC_Event_Channel::busy_hwm (void) const
-{
- return this->busy_hwm_;
-}
-
-ACE_INLINE int
-TAO_EC_Event_Channel::max_write_delay (void) const
-{
- return this->max_write_delay_;
-}
-
-ACE_INLINE int
-TAO_EC_Event_Channel::destroyed (void)
-{
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, 0);
- return (this->status_ == EC_S_DESTROYED);
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp
new file mode 100644
index 00000000000..72a94ea7b19
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp
@@ -0,0 +1,344 @@
+// $Id$
+
+#include "EC_Event_Channel_Base.h"
+#include "EC_Factory.h"
+#include "EC_Dispatching.h"
+#include "EC_ConsumerAdmin.h"
+#include "EC_SupplierAdmin.h"
+#include "EC_Timeout_Generator.h"
+#include "EC_ObserverStrategy.h"
+#include "EC_ConsumerControl.h"
+#include "EC_SupplierControl.h"
+#include "ace/Dynamic_Service.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "EC_Event_Channel_Base.i"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(Event, EC_Event_Channel_Base, "$Id$")
+
+TAO_EC_Event_Channel_Base::
+TAO_EC_Event_Channel_Base (const TAO_EC_Event_Channel_Attributes& attr,
+ TAO_EC_Factory* factory,
+ int own_factory)
+ : supplier_poa_ (PortableServer::POA::_duplicate (attr.supplier_poa)),
+ consumer_poa_ (PortableServer::POA::_duplicate (attr.consumer_poa)),
+ factory_ (factory),
+ own_factory_ (own_factory),
+ dispatching_ (0),
+ filter_builder_ (0),
+ supplier_filter_builder_ (0),
+ consumer_admin_ (0),
+ supplier_admin_ (0),
+ timeout_generator_ (0),
+ observer_strategy_ (0),
+ scheduling_strategy_(0),
+ consumer_reconnect_ (attr.consumer_reconnect),
+ supplier_reconnect_ (attr.supplier_reconnect),
+ disconnect_callbacks_ (attr.disconnect_callbacks),
+ busy_hwm_ (attr.busy_hwm),
+ max_write_delay_ (attr.max_write_delay),
+ consumer_control_ (0),
+ supplier_control_ (0),
+ status_ (EC_S_IDLE)
+{
+ this->scheduler_ =
+ CORBA::Object::_duplicate (attr.scheduler);
+}
+
+TAO_EC_Event_Channel_Base::~TAO_EC_Event_Channel_Base (void)
+{
+ this->factory_->destroy_dispatching (this->dispatching_);
+ this->dispatching_ = 0;
+ this->factory_->destroy_filter_builder (this->filter_builder_);
+ this->filter_builder_ = 0;
+ this->factory_->destroy_supplier_filter_builder (this->supplier_filter_builder_);
+ this->supplier_filter_builder_ = 0;
+ this->factory_->destroy_consumer_admin (this->consumer_admin_);
+ this->consumer_admin_ = 0;
+ this->factory_->destroy_supplier_admin (this->supplier_admin_);
+ this->supplier_admin_ = 0;
+ this->factory_->destroy_timeout_generator (this->timeout_generator_);
+ this->timeout_generator_ = 0;
+ this->factory_->destroy_observer_strategy (this->observer_strategy_);
+ this->observer_strategy_ = 0;
+
+ this->factory_->destroy_scheduling_strategy (this->scheduling_strategy_);
+ this->scheduling_strategy_ = 0;
+
+ this->factory_->destroy_consumer_control (this->consumer_control_);
+ this->consumer_control_ = 0;
+ this->factory_->destroy_supplier_control (this->supplier_control_);
+ this->supplier_control_ = 0;
+
+ this->factory (0, 0);
+}
+
+void
+TAO_EC_Event_Channel_Base::create_strategies (void)
+{
+ this->dispatching_ =
+ this->factory_->create_dispatching (this);
+ this->filter_builder_ =
+ this->factory_->create_filter_builder (this);
+ this->supplier_filter_builder_ =
+ this->factory_->create_supplier_filter_builder (this);
+ this->consumer_admin_ =
+ this->factory_->create_consumer_admin (this);
+ this->supplier_admin_ =
+ this->factory_->create_supplier_admin (this);
+ this->timeout_generator_ =
+ this->factory_->create_timeout_generator (this);
+ this->observer_strategy_ =
+ this->factory_->create_observer_strategy (this);
+
+ this->scheduling_strategy_ =
+ this->factory_->create_scheduling_strategy (this);
+
+ this->consumer_control_ =
+ this->factory_->create_consumer_control (this);
+ this->supplier_control_ =
+ this->factory_->create_supplier_control (this);
+}
+
+void
+TAO_EC_Event_Channel_Base::activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ {
+ // First check if the EC is idle, if it is not then we need to
+ // return right away...
+ ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
+ if (this->status_ != EC_S_IDLE)
+ return;
+ this->status_ = EC_S_ACTIVATING;
+ }
+ this->dispatching_->activate ();
+ this->timeout_generator_->activate ();
+ this->consumer_control_->activate ();
+ this->supplier_control_->activate ();
+ {
+ // Only when all the operations complete successfully we can mark
+ // the EC as active...
+ ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
+ ACE_ASSERT (this->status_ == EC_S_ACTIVATING);
+ this->status_ = EC_S_ACTIVE;
+ }
+}
+
+void
+TAO_EC_Event_Channel_Base::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+{
+ {
+ // First check if the EC is already active, if it is not then we
+ // need to return right away...
+ ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
+ if (this->status_ != EC_S_ACTIVE)
+ return;
+ this->status_ = EC_S_DESTROYING;
+ }
+ this->dispatching_->shutdown ();
+ this->timeout_generator_->shutdown ();
+ this->supplier_control_->shutdown ();
+ this->consumer_control_->shutdown ();
+
+ this->deactivate_supplier_admin ();
+ this->deactivate_consumer_admin ();
+
+ this->supplier_admin_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->consumer_admin_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ {
+ // Wait until all the shutdown() operations return before marking
+ // the EC as destroyed...
+ ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
+ ACE_ASSERT (this->status_ == EC_S_DESTROYING);
+ this->status_ = EC_S_DESTROYED;
+ }
+}
+
+void
+TAO_EC_Event_Channel_Base::deactivate_supplier_admin (void)
+{
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
+ {
+ PortableServer::POA_var supplier_poa =
+ this->supplier_admin_->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ PortableServer::ObjectId_var supplier_id =
+ supplier_poa->servant_to_id (this->supplier_admin_ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ supplier_poa->deactivate_object (supplier_id.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ // The deactivation can throw...
+ }
+ ACE_ENDTRY;
+}
+
+void
+TAO_EC_Event_Channel_Base::deactivate_consumer_admin (void)
+{
+ ACE_TRY_NEW_ENV
+ {
+ PortableServer::POA_var consumer_poa =
+ this->consumer_admin_->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ PortableServer::ObjectId_var consumer_id =
+ consumer_poa->servant_to_id (this->consumer_admin_ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ consumer_poa->deactivate_object (consumer_id.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ // The deactivation can throw...
+ }
+ ACE_ENDTRY;
+}
+
+void
+TAO_EC_Event_Channel_Base::connected (TAO_EC_ProxyPushConsumer* consumer
+ ACE_ENV_ARG_DECL)
+{
+ this->consumer_admin_->peer_connected (consumer ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->supplier_admin_->connected (consumer ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->observer_strategy_->connected (consumer ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_EC_Event_Channel_Base::reconnected (TAO_EC_ProxyPushConsumer* consumer
+ ACE_ENV_ARG_DECL)
+{
+ this->consumer_admin_->peer_reconnected (consumer ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->supplier_admin_->reconnected (consumer ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->observer_strategy_->connected (consumer ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_EC_Event_Channel_Base::disconnected (TAO_EC_ProxyPushConsumer* consumer
+ ACE_ENV_ARG_DECL)
+{
+ this->consumer_admin_->peer_disconnected (consumer ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->supplier_admin_->disconnected (consumer ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->observer_strategy_->disconnected (consumer ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_EC_Event_Channel_Base::connected (TAO_EC_ProxyPushSupplier* supplier
+ ACE_ENV_ARG_DECL)
+{
+ this->supplier_admin_->peer_connected (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->consumer_admin_->connected (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->observer_strategy_->connected (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_EC_Event_Channel_Base::reconnected (TAO_EC_ProxyPushSupplier* supplier
+ ACE_ENV_ARG_DECL)
+{
+ this->supplier_admin_->peer_reconnected (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->consumer_admin_->reconnected (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->observer_strategy_->connected (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_EC_Event_Channel_Base::disconnected (TAO_EC_ProxyPushSupplier* supplier
+ ACE_ENV_ARG_DECL)
+{
+ this->supplier_admin_->peer_disconnected (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->consumer_admin_->disconnected (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->observer_strategy_->disconnected (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+RtecEventChannelAdmin::ConsumerAdmin_ptr
+TAO_EC_Event_Channel_Base::for_consumers (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->consumer_admin_->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+RtecEventChannelAdmin::SupplierAdmin_ptr
+TAO_EC_Event_Channel_Base::for_suppliers (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->supplier_admin_->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+void
+TAO_EC_Event_Channel_Base::destroy (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+RtecEventChannelAdmin::Observer_Handle
+TAO_EC_Event_Channel_Base::append_observer (
+ RtecEventChannelAdmin::Observer_ptr observer
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
+ RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER))
+{
+ return this->observer_strategy_->append_observer (observer
+ ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_EC_Event_Channel_Base::remove_observer (
+ RtecEventChannelAdmin::Observer_Handle handle
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
+ RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER))
+{
+ this->observer_strategy_->remove_observer (handle
+ ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_EC_Event_Channel_Base::for_each_consumer (
+ TAO_ESF_Worker<TAO_EC_ProxyPushSupplier> *worker
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->consumer_admin_->for_each (worker
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_EC_Event_Channel_Base::for_each_supplier (
+ TAO_ESF_Worker<TAO_EC_ProxyPushConsumer> *worker
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->supplier_admin_->for_each (worker
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.h b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.h
new file mode 100644
index 00000000000..42e6f17c251
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.h
@@ -0,0 +1,381 @@
+/* -*- C++ -*- */
+/**
+ * @file EC_Event_Channel_Base.h
+ *
+ * $Id$
+ *
+ * @author Carlos O'Ryan (coryan@cs.wustl.edu)
+ * @author Marina Spivak (marina@atdesk.com)
+ * @author Jason Smith (jason@atdesk.com)
+ *
+ * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and
+ * other members of the DOC group. More details can be found in:
+ *
+ * http://doc.ece.uci.edu/~coryan/EC/index.html
+ */
+
+#ifndef TAO_EC_EVENT_CHANNEL_BASE_H
+#define TAO_EC_EVENT_CHANNEL_BASE_H
+#include "ace/pre.h"
+
+#include "EC_Factory.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "EC_Defaults.h"
+#include "orbsvcs/RtecEventChannelAdminS.h"
+
+template<class> class TAO_ESF_Worker;
+
+/**
+ * @class TAO_EC_Event_Channel_Attributes
+ *
+ * @brief Defines the construction time attributes for the Event
+ * Channel.
+ *
+ * The event channel implementation is controlled by two
+ * mechanisms:
+ * The EC_Factory that provides the strategies for the EC
+ * implementation.
+ * The EC attributes that define constants and values required
+ * by the EC construction.
+ * This class encapsulates those constants and values, providing
+ * an easy mechanism to extend the attributes without requiring
+ * changes in the EC constructor.
+ */
+class TAO_RTEvent_Export TAO_EC_Event_Channel_Attributes
+{
+public:
+ /**
+ * The basic constructor.
+ * The attributes listed as arguments are *required* by the EC, and
+ * no appropiate defaults are available for them.
+ */
+ TAO_EC_Event_Channel_Attributes (PortableServer::POA_ptr supplier_poa,
+ PortableServer::POA_ptr consumer_poa);
+
+ // Most fields are public, there is no need to protect them, in fact
+ // the user should be able to set any values she wants.
+
+ /// Can consumers or suppliers invoke connect_push_* multiple times?
+ int consumer_reconnect;
+ int supplier_reconnect;
+
+ /**
+ * It not zero the event channel will send disconnect callbacks when
+ * a disconnect method is called on a Proxy. In other words, if a
+ * consumer calls disconnect_push_supplier() on its proxy the EC
+ * will invoke disconnect_push_consumer() on the consumer. A
+ * similar thing is done for suppliers.
+ * It is a matter of debate what the spec requires for the regular
+ * event service.
+ */
+ int disconnect_callbacks;
+
+ /// Flags for the Consumer Admin
+ int busy_hwm;
+ int max_write_delay;
+
+ /**
+ * The scheduling service that we will use with this event channel.
+ * Notice that this is optional and will only take effect if the EC
+ * is configured with the right filtering strategies.
+ */
+ CORBA::Object_ptr scheduler;
+
+private:
+ /// Only the EC can read the private fields.
+ friend class TAO_EC_Event_Channel_Base;
+
+ /// The POAs
+ PortableServer::POA_ptr supplier_poa;
+ PortableServer::POA_ptr consumer_poa;
+};
+
+/**
+ * @class TAO_EC_Event_Channel_Base
+ *
+ * @brief The RtecEventChannelAdmin::EventChannel implementation.
+ *
+ * This class is the Mediator between all the classes in the EC
+ * implementation, its main task is to redirect the messages to
+ * the right components, to hold and manage the lifetime of the
+ * long lived objects (Timer_Module, SupplierAdmin,
+ * ConsumerAdmin and Dispatching) and to provide a simpler
+ * interface to the EC_Factory.
+ */
+class TAO_RTEvent_Export TAO_EC_Event_Channel_Base
+ : public POA_RtecEventChannelAdmin::EventChannel
+ , public PortableServer::RefCountServantBase
+{
+public:
+ /// destructor
+ virtual ~TAO_EC_Event_Channel_Base (void);
+
+ /// Start the internal threads (if any), etc.
+ /// After this call the EC can be used.
+ virtual void activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+
+ /// Shutdown any internal threads, cleanup all the internal
+ /// structures, flush all the messages, etc.
+ virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+
+ virtual void for_each_consumer (
+ TAO_ESF_Worker<TAO_EC_ProxyPushSupplier> *worker
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void for_each_supplier (
+ TAO_ESF_Worker<TAO_EC_ProxyPushConsumer> *worker
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Access the dispatching module....
+ TAO_EC_Dispatching* dispatching (void) const;
+
+ /// Access the filter builder....
+ TAO_EC_Filter_Builder* filter_builder (void) const;
+
+ /// Access the filter builder....
+ TAO_EC_Supplier_Filter_Builder* supplier_filter_builder (void) const;
+
+ /// Access the consumer admin implementation, useful for controlling
+ /// the activation...
+ TAO_EC_ConsumerAdmin* consumer_admin (void) const;
+
+ /// Access the supplier admin implementation, useful for controlling
+ /// the activation...
+ TAO_EC_SupplierAdmin* supplier_admin (void) const;
+
+ /// Access the timer module...
+ TAO_EC_Timeout_Generator* timeout_generator (void) const;
+
+ /// Access the scheduling strategy
+ TAO_EC_Scheduling_Strategy* scheduling_strategy (void) const;
+
+ /// Access the client control strategies.
+ TAO_EC_ConsumerControl *consumer_control (void) const;
+ TAO_EC_SupplierControl *supplier_control (void) const;
+
+ // = The factory methods, they delegate on the EC_Factory.
+ /// Create and destroy a ProxyPushSupplier
+ void create_proxy (TAO_EC_ProxyPushSupplier*&);
+ void destroy_proxy (TAO_EC_ProxyPushSupplier*);
+
+ /// Create and destroy a ProxyPushConsumer
+ void create_proxy (TAO_EC_ProxyPushConsumer*&);
+ void destroy_proxy (TAO_EC_ProxyPushConsumer*);
+
+
+ /// Create and destroy a the collections used to store
+ /// ProxyPushSuppliers
+ void create_proxy_collection (TAO_EC_ProxyPushSupplier_Collection*&);
+ void destroy_proxy_collection (TAO_EC_ProxyPushSupplier_Collection*);
+
+
+ /// Create and destroy a the collections used to store
+ /// ProxyPushConsumers
+ void create_proxy_collection (TAO_EC_ProxyPushConsumer_Collection*&);
+ void destroy_proxy_collection (TAO_EC_ProxyPushConsumer_Collection*);
+
+ /// Access the supplier and consumer POAs from the factory.
+ PortableServer::POA_ptr supplier_poa (void);
+ PortableServer::POA_ptr consumer_poa (void);
+
+ /// Locking strategies for the ProxyPushConsumer and
+ /// ProxyPushSupplier objects
+ ACE_Lock* create_consumer_lock (void);
+ void destroy_consumer_lock (ACE_Lock*);
+ ACE_Lock* create_supplier_lock (void);
+ void destroy_supplier_lock (ACE_Lock*);
+
+ /// Used to inform the EC that a Consumer has connected or
+ /// disconnected from it.
+ virtual void connected (TAO_EC_ProxyPushConsumer*
+ ACE_ENV_ARG_DECL_NOT_USED);
+ virtual void reconnected (TAO_EC_ProxyPushConsumer*
+ ACE_ENV_ARG_DECL_NOT_USED);
+ virtual void disconnected (TAO_EC_ProxyPushConsumer*
+ ACE_ENV_ARG_DECL_NOT_USED);
+
+ /// Used to inform the EC that a Supplier has connected or
+ /// disconnected from it.
+ virtual void connected (TAO_EC_ProxyPushSupplier*
+ ACE_ENV_ARG_DECL_NOT_USED);
+ virtual void reconnected (TAO_EC_ProxyPushSupplier*
+ ACE_ENV_ARG_DECL_NOT_USED);
+ virtual void disconnected (TAO_EC_ProxyPushSupplier*
+ ACE_ENV_ARG_DECL_NOT_USED);
+
+ // Simple flags to control the EC behavior, set by the application
+ // at construction time.
+
+ /// Can the consumers reconnect to the EC?
+ int consumer_reconnect (void) const;
+
+ /// Can the suppliers reconnect to the EC?
+ int supplier_reconnect (void) const;
+
+ /// Should we send callback disconnect messages when a proxy is
+ /// disconnected by the client
+ int disconnect_callbacks (void) const;
+
+ /// Obtain the scheduler, the user must release
+ CORBA::Object_ptr scheduler (void);
+
+ /// Control the concurrency of the delayed connect/disconnect
+ /// operations.
+ int busy_hwm (void) const;
+ int max_write_delay (void) const;
+
+ // = The RtecEventChannelAdmin::EventChannel methods...
+ /// The default implementation is:
+ /// this->consumer_admin ()->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ virtual RtecEventChannelAdmin::ConsumerAdmin_ptr
+ for_consumers (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// The default implementation is:
+ /// this->supplier_admin ()->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ virtual RtecEventChannelAdmin::SupplierAdmin_ptr
+ for_suppliers (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Commit suicide.
+ virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual RtecEventChannelAdmin::Observer_Handle
+ append_observer (RtecEventChannelAdmin::Observer_ptr
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
+ RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER));
+ virtual void
+ remove_observer (RtecEventChannelAdmin::Observer_Handle
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
+ RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER));
+
+ /// Return 1 if the event channel is already destroyed.
+ int destroyed (void);
+
+protected:
+ /**
+ * constructor
+ * If <own_factory> is not 0 it assumes ownership of the factory.
+ * If the factory is <nil> it uses the Service_Configurator to load
+ * the Factory, if not found it uses TAO_EC_Default_Resource_Factory
+ */
+ TAO_EC_Event_Channel_Base (const TAO_EC_Event_Channel_Attributes& attributes,
+ TAO_EC_Factory* factory = 0,
+ int own_factory = 0);
+
+ /**
+ * Get the factory.
+ */
+ TAO_EC_Factory * factory (void) const;
+
+ /**
+ * Set the factory, if @a own_factory is not 0 it assumes ownership of the
+ * factory.
+ */
+ void factory (TAO_EC_Factory* factory,
+ int own_factory = 0);
+
+ /**
+ * Create all strategies
+ */
+ void create_strategies (void);
+
+ /// Helpers. Deactivate admins from their POAs, ignoring any CORBA
+ /// exceptions.
+ //@{
+ void deactivate_supplier_admin (void);
+ void deactivate_consumer_admin (void);
+ //@}
+
+ /// The POAs used to activate "supplier-side" and "consumer-side"
+ /// objects.
+ PortableServer::POA_var supplier_poa_;
+ PortableServer::POA_var consumer_poa_;
+
+ /**
+ * This is the abstract factory that creates all the objects that
+ * compose an event channel, the event channel simply acts as a
+ * Mediator among them.
+ */
+ TAO_EC_Factory *factory_;
+
+ /// Flag that indicates if we own the factory.
+ int own_factory_;
+
+ /// The dispatching "module"
+ TAO_EC_Dispatching *dispatching_;
+
+ /// The filter builder
+ TAO_EC_Filter_Builder *filter_builder_;
+
+ /// The filter builder for suppliers
+ TAO_EC_Supplier_Filter_Builder *supplier_filter_builder_;
+
+ /// The ConsumerAdmin implementation
+ TAO_EC_ConsumerAdmin *consumer_admin_;
+
+ /// The SupplierAdmin implementation
+ TAO_EC_SupplierAdmin *supplier_admin_;
+
+ /// The timeout generator
+ TAO_EC_Timeout_Generator *timeout_generator_;
+
+ /// The observer strategy
+ TAO_EC_ObserverStrategy *observer_strategy_;
+
+ /// The scheduler (may be nil)
+ CORBA::Object_var scheduler_;
+
+ /// The scheduling strategy
+ TAO_EC_Scheduling_Strategy *scheduling_strategy_;
+
+ /// Consumer/Supplier reconnection flags
+ int consumer_reconnect_;
+ int supplier_reconnect_;
+
+ /// If not zero we send callbacks when a proxy is disconnected
+ int disconnect_callbacks_;
+
+ /// Control the level of concurrency in the supplier sets with
+ /// delayed operations
+ int busy_hwm_;
+ int max_write_delay_;
+
+ /// Strategies to disconnect misbehaving or destroyed consumers and
+ /// suppliers
+ TAO_EC_ConsumerControl *consumer_control_;
+ TAO_EC_SupplierControl *supplier_control_;
+
+ /// Mutex to protect the internal state
+ TAO_SYNCH_MUTEX mutex_;
+
+ /// Flag to track the status of the event channel
+ enum {
+ EC_S_IDLE
+ , EC_S_ACTIVATING
+ , EC_S_ACTIVE
+ , EC_S_DESTROYING
+ , EC_S_DESTROYED
+ };
+ int status_;
+};
+
+#if defined (__ACE_INLINE__)
+#include "EC_Event_Channel_Base.i"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_EC_EVENT_CHANNEL_BASE_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.i b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.i
new file mode 100644
index 00000000000..3c6678e280d
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.i
@@ -0,0 +1,214 @@
+// $Id$
+
+ACE_INLINE
+TAO_EC_Event_Channel_Attributes::
+TAO_EC_Event_Channel_Attributes (PortableServer::POA_ptr s_poa,
+ PortableServer::POA_ptr c_poa)
+ : consumer_reconnect (TAO_EC_DEFAULT_CONSUMER_RECONNECT),
+ supplier_reconnect (TAO_EC_DEFAULT_SUPPLIER_RECONNECT),
+ disconnect_callbacks (TAO_EC_DEFAULT_DISCONNECT_CALLBACKS),
+ busy_hwm (TAO_EC_DEFAULT_BUSY_HWM),
+ max_write_delay (TAO_EC_DEFAULT_MAX_WRITE_DELAY),
+ scheduler (CORBA::Object::_nil ()),
+ supplier_poa (s_poa),
+ consumer_poa (c_poa)
+{
+}
+
+ACE_INLINE TAO_EC_Factory*
+TAO_EC_Event_Channel_Base::factory (void) const
+{
+ return this->factory_;
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::factory (TAO_EC_Factory* factory,
+ int own_factory)
+{
+ if (this->own_factory_)
+ delete this->factory_;
+
+ this->factory_ = factory;
+ this->own_factory_ = own_factory;
+}
+
+ACE_INLINE TAO_EC_Dispatching*
+TAO_EC_Event_Channel_Base::dispatching (void) const
+{
+ return this->dispatching_;
+}
+
+ACE_INLINE TAO_EC_Filter_Builder*
+TAO_EC_Event_Channel_Base::filter_builder (void) const
+{
+ return this->filter_builder_;
+}
+
+ACE_INLINE TAO_EC_Supplier_Filter_Builder*
+TAO_EC_Event_Channel_Base::supplier_filter_builder (void) const
+{
+ return this->supplier_filter_builder_;
+}
+
+ACE_INLINE TAO_EC_ConsumerAdmin*
+TAO_EC_Event_Channel_Base::consumer_admin (void) const
+{
+ return this->consumer_admin_;
+}
+
+ACE_INLINE TAO_EC_SupplierAdmin*
+TAO_EC_Event_Channel_Base::supplier_admin (void) const
+{
+ return this->supplier_admin_;
+}
+
+ACE_INLINE TAO_EC_Timeout_Generator*
+TAO_EC_Event_Channel_Base::timeout_generator (void) const
+{
+ return this->timeout_generator_;
+}
+
+ACE_INLINE TAO_EC_Scheduling_Strategy*
+TAO_EC_Event_Channel_Base::scheduling_strategy (void) const
+{
+ return this->scheduling_strategy_;
+}
+
+ACE_INLINE TAO_EC_ConsumerControl*
+TAO_EC_Event_Channel_Base::consumer_control (void) const
+{
+ return this->consumer_control_;
+}
+
+ACE_INLINE TAO_EC_SupplierControl*
+TAO_EC_Event_Channel_Base::supplier_control (void) const
+{
+ return this->supplier_control_;
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::create_proxy (TAO_EC_ProxyPushSupplier*& x)
+{
+ x = this->factory_->create_proxy_push_supplier (this);
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::destroy_proxy (TAO_EC_ProxyPushSupplier* supplier)
+{
+ this->factory_->destroy_proxy_push_supplier (supplier);
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::create_proxy (TAO_EC_ProxyPushConsumer*& x)
+{
+ x = this->factory_->create_proxy_push_consumer (this);
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::destroy_proxy (TAO_EC_ProxyPushConsumer* consumer)
+{
+ this->factory_->destroy_proxy_push_consumer (consumer);
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::create_proxy_collection (TAO_EC_ProxyPushConsumer_Collection*& x)
+{
+ x = this->factory_->create_proxy_push_consumer_collection (this);
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::destroy_proxy_collection (TAO_EC_ProxyPushConsumer_Collection* x)
+{
+ this->factory_->destroy_proxy_push_consumer_collection (x);
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::create_proxy_collection (TAO_EC_ProxyPushSupplier_Collection*& x)
+{
+ x = this->factory_->create_proxy_push_supplier_collection (this);
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::destroy_proxy_collection (TAO_EC_ProxyPushSupplier_Collection* x)
+{
+ this->factory_->destroy_proxy_push_supplier_collection (x);
+}
+
+ACE_INLINE PortableServer::POA_ptr
+TAO_EC_Event_Channel_Base::supplier_poa (void)
+{
+ return PortableServer::POA::_duplicate (this->supplier_poa_.in ());
+}
+
+ACE_INLINE PortableServer::POA_ptr
+TAO_EC_Event_Channel_Base::consumer_poa (void)
+{
+ return PortableServer::POA::_duplicate (this->consumer_poa_.in ());
+}
+
+ACE_INLINE ACE_Lock*
+TAO_EC_Event_Channel_Base::create_consumer_lock (void)
+{
+ return this->factory_->create_consumer_lock ();
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::destroy_consumer_lock (ACE_Lock* x)
+{
+ this->factory_->destroy_consumer_lock (x);
+}
+
+ACE_INLINE ACE_Lock*
+TAO_EC_Event_Channel_Base::create_supplier_lock (void)
+{
+ return this->factory_->create_supplier_lock ();
+}
+
+ACE_INLINE void
+TAO_EC_Event_Channel_Base::destroy_supplier_lock (ACE_Lock* x)
+{
+ this->factory_->destroy_supplier_lock (x);
+}
+
+ACE_INLINE int
+TAO_EC_Event_Channel_Base::consumer_reconnect (void) const
+{
+ return this->consumer_reconnect_;
+}
+
+ACE_INLINE int
+TAO_EC_Event_Channel_Base::supplier_reconnect (void) const
+{
+ return this->supplier_reconnect_;
+}
+
+ACE_INLINE int
+TAO_EC_Event_Channel_Base::disconnect_callbacks (void) const
+{
+ return this->disconnect_callbacks_;
+}
+
+ACE_INLINE CORBA::Object_ptr
+TAO_EC_Event_Channel_Base::scheduler (void)
+{
+ return CORBA::Object::_duplicate (this->scheduler_.in ());
+}
+
+ACE_INLINE int
+TAO_EC_Event_Channel_Base::busy_hwm (void) const
+{
+ return this->busy_hwm_;
+}
+
+ACE_INLINE int
+TAO_EC_Event_Channel_Base::max_write_delay (void) const
+{
+ return this->max_write_delay_;
+}
+
+ACE_INLINE int
+TAO_EC_Event_Channel_Base::destroyed (void)
+{
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, 0);
+ return (this->status_ == EC_S_DESTROYED);
+}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Factory.h b/TAO/orbsvcs/orbsvcs/Event/EC_Factory.h
index ed5a65f0f92..f82a64143b7 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Factory.h
@@ -27,7 +27,7 @@
class ACE_Lock;
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
class TAO_EC_Dispatching;
class TAO_EC_Filter_Builder;
@@ -67,73 +67,73 @@ public:
/// Create and destroy the dispatching module.
virtual TAO_EC_Dispatching*
- create_dispatching (TAO_EC_Event_Channel*) = 0;
+ create_dispatching (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_dispatching (TAO_EC_Dispatching*) = 0;
/// Create and destroy the filter builder.
virtual TAO_EC_Filter_Builder*
- create_filter_builder (TAO_EC_Event_Channel*) = 0;
+ create_filter_builder (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_filter_builder (TAO_EC_Filter_Builder*) = 0;
/// Create and destroy the filter builder.
virtual TAO_EC_Supplier_Filter_Builder*
- create_supplier_filter_builder (TAO_EC_Event_Channel*) = 0;
+ create_supplier_filter_builder (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_supplier_filter_builder (TAO_EC_Supplier_Filter_Builder*) = 0;
/// Create and destroy the consumer admin implementation.
virtual TAO_EC_ConsumerAdmin*
- create_consumer_admin (TAO_EC_Event_Channel*) = 0;
+ create_consumer_admin (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_consumer_admin (TAO_EC_ConsumerAdmin*) = 0;
/// Create and destroy the supplier admin implementation.
virtual TAO_EC_SupplierAdmin*
- create_supplier_admin (TAO_EC_Event_Channel*) = 0;
+ create_supplier_admin (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_supplier_admin (TAO_EC_SupplierAdmin*) = 0;
/// Create and destroy a ProxyPushSupplier
virtual TAO_EC_ProxyPushSupplier*
- create_proxy_push_supplier (TAO_EC_Event_Channel*) = 0;
+ create_proxy_push_supplier (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_proxy_push_supplier (TAO_EC_ProxyPushSupplier*) = 0;
/// Create and destroy a ProxyPushConsumer
virtual TAO_EC_ProxyPushConsumer*
- create_proxy_push_consumer (TAO_EC_Event_Channel*) = 0;
+ create_proxy_push_consumer (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer*) = 0;
/// Create and destroy the timer module.
virtual TAO_EC_Timeout_Generator*
- create_timeout_generator (TAO_EC_Event_Channel*) = 0;
+ create_timeout_generator (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_timeout_generator (TAO_EC_Timeout_Generator*) = 0;
/// Create and destroy the observer strategy.
virtual TAO_EC_ObserverStrategy*
- create_observer_strategy (TAO_EC_Event_Channel*) = 0;
+ create_observer_strategy (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_observer_strategy (TAO_EC_ObserverStrategy*) = 0;
/// Create and destroy the observer strategy.
virtual TAO_EC_Scheduling_Strategy*
- create_scheduling_strategy (TAO_EC_Event_Channel*) = 0;
+ create_scheduling_strategy (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy*) = 0;
/// Create and destroy a collection of TAO_EC_ProxyPushConsumers
virtual TAO_EC_ProxyPushConsumer_Collection*
- create_proxy_push_consumer_collection (TAO_EC_Event_Channel*) = 0;
+ create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_proxy_push_consumer_collection (TAO_EC_ProxyPushConsumer_Collection*) = 0;
/// Create and destroy a collection of TAO_EC_ProxyPushSuppliers
virtual TAO_EC_ProxyPushSupplier_Collection*
- create_proxy_push_supplier_collection (TAO_EC_Event_Channel*) = 0;
+ create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_proxy_push_supplier_collection (TAO_EC_ProxyPushSupplier_Collection*) = 0;
@@ -147,11 +147,11 @@ public:
/// The ConsumerControl and SupplierControl strategies are used to
/// discard non-existent consumers and suppliers
virtual TAO_EC_ConsumerControl*
- create_consumer_control (TAO_EC_Event_Channel*) = 0;
+ create_consumer_control (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_consumer_control (TAO_EC_ConsumerControl*) = 0;
virtual TAO_EC_SupplierControl*
- create_supplier_control (TAO_EC_Event_Channel*) = 0;
+ create_supplier_control (TAO_EC_Event_Channel_Base*) = 0;
virtual void
destroy_supplier_control (TAO_EC_SupplierControl*) = 0;
};
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Filter.h
index a3cb7a22850..ae182c5cd66 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Filter.h
@@ -59,7 +59,7 @@ public:
/// Become the parent of <child>
void adopt_child (TAO_EC_Filter* child);
- /// matches two event headers.
+ /// Matches two event headers.
/// @todo Should we strategize the algorithm used to match headers?
static int matches (const RtecEventComm::EventHeader& rhs,
const RtecEventComm::EventHeader& lhs);
@@ -83,6 +83,12 @@ public:
* otherwise.
* Notice that there are two versions of the method, if the event is
* not const then filter can take ownership of the event.
+ *
+ * @attention There seems to be a disparity in interfaces: Supplier
+ * always push event sets of size 1 to the EC_ProxyPushSupplier, and
+ * EC_Filters do not implement handling of sets of more than 1
+ * event. Then, why is this not enforced by the interface by having
+ * EC_ProxyPushSupplier take an event rather than a set?
*/
virtual int filter (const RtecEventComm::EventSet& event,
TAO_EC_QOS_Info& qos_info
@@ -168,7 +174,7 @@ private:
class TAO_RTEvent_Export TAO_EC_Null_Filter : public TAO_EC_Filter
{
public:
- /// constructor.
+ /// Constructor.
TAO_EC_Null_Filter (void);
// = The TAO_EC_Filter methods, please check the documentation in
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp
index 838f2b431ad..45bbac7908a 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "orbsvcs/Event/EC_Gateway_UDP.h"
+#include "orbsvcs/Event/ECG_UDP_Out_Endpoint.h"
#include "orbsvcs/Event/ECG_UDP_Protocol.h"
#include "orbsvcs/Event_Utilities.h"
#include "orbsvcs/Time_Utilities.h"
@@ -14,45 +15,6 @@ ACE_RCSID (Event, EC_Gateway_UDP, "$Id$")
// ****************************************************************
-TAO_ECG_UDP_Out_Endpoint::~TAO_ECG_UDP_Out_Endpoint (void)
-{
- delete[] this->ifs_;
- this->ifs_ = 0;
-}
-
-CORBA::Boolean
-TAO_ECG_UDP_Out_Endpoint::is_loopback (const ACE_INET_Addr& from)
-{
- if (this->port_number_ == 0)
- {
- // Cache the port number...
- ACE_INET_Addr local_addr;
- if (this->dgram ().get_local_addr (local_addr) == -1)
- return 0;
- this->port_number_ = local_addr.get_port_number ();
- }
-
- // Most of the time the port number is enough to determine if the
- // message is remote, only when the local port number and the remote
- // port number match we have to look at the local ip addresses.
- if (from.get_port_number () != this->port_number_)
- return 0;
-
- if (this->ifs_ == 0)
- {
- ACE::get_ip_interfaces (this->if_count_, this->ifs_);
- }
-
- for (ACE_INET_Addr* i = this->ifs_;
- i != this->ifs_ + this->if_count_;
- ++i)
- {
- if ((*i).get_ip_address () == from.get_ip_address ())
- return 1;
- }
- return 0;
-}
-
// ****************************************************************
@@ -636,8 +598,6 @@ TAO_ECG_UDP_EH::get_handle (void) const
// ****************************************************************
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong>;
-template class ACE_Atomic_Op_Ex<TAO_SYNCH_MUTEX, CORBA::ULong>;
template class ACE_Hash_Map_Manager<TAO_ECG_UDP_Request_Index,TAO_ECG_UDP_Request_Entry*,TAO_SYNCH_MUTEX>;
template class ACE_Hash_Map_Manager_Ex<TAO_ECG_UDP_Request_Index, TAO_ECG_UDP_Request_Entry*, ACE_Hash<TAO_ECG_UDP_Request_Index>, ACE_Equal_To<TAO_ECG_UDP_Request_Index>, TAO_SYNCH_MUTEX>;
template class ACE_Hash_Map_Entry<TAO_ECG_UDP_Request_Index,TAO_ECG_UDP_Request_Entry*>;
@@ -649,8 +609,6 @@ template class ACE_Hash_Map_Iterator_Ex<TAO_ECG_UDP_Request_Index, TAO_ECG_UDP_R
template class ACE_Hash_Map_Reverse_Iterator<TAO_ECG_UDP_Request_Index,TAO_ECG_UDP_Request_Entry*,TAO_SYNCH_MUTEX>;
template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ECG_UDP_Request_Index, TAO_ECG_UDP_Request_Entry*, ACE_Hash<TAO_ECG_UDP_Request_Index>, ACE_Equal_To<TAO_ECG_UDP_Request_Index>, TAO_SYNCH_MUTEX>;
#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong>
-#pragma instantiate ACE_Atomic_Op_Ex<TAO_SYNCH_MUTEX, CORBA::ULong>
#pragma instantiate ACE_Hash_Map_Manager<TAO_ECG_UDP_Request_Index,TAO_ECG_UDP_Request_Entry*,TAO_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ECG_UDP_Request_Index, TAO_ECG_UDP_Request_Entry*, ACE_Hash<TAO_ECG_UDP_Request_Index>, ACE_Equal_To<TAO_ECG_UDP_Request_Index>, TAO_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Entry<TAO_ECG_UDP_Request_Index,TAO_ECG_UDP_Request_Entry*>
@@ -661,5 +619,4 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ECG_UDP_Request_Index, TAO_E
#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ECG_UDP_Request_Index, TAO_ECG_UDP_Request_Entry*, ACE_Hash<TAO_ECG_UDP_Request_Index>, ACE_Equal_To<TAO_ECG_UDP_Request_Index>, TAO_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ECG_UDP_Request_Index,TAO_ECG_UDP_Request_Entry*,TAO_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ECG_UDP_Request_Index, TAO_ECG_UDP_Request_Entry*, ACE_Hash<TAO_ECG_UDP_Request_Index>, ACE_Equal_To<TAO_ECG_UDP_Request_Index>, TAO_SYNCH_MUTEX>
-
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h
index a197fa9ae3b..7090d1713f2 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h
@@ -73,55 +73,6 @@ class TAO_ECG_UDP_Out_Endpoint;
// ****************************************************************
/**
- * @class TAO_ECG_UDP_Out_Endpoint
- *
- * @brief Maintains information about an outgoing endpoint.
- *
- * UDP senders can share a single endpoint to send UDP packets,
- * but there is more state associated with this endpoint than its
- * datagram SAP; for instance we need to keep track of the request
- * id.
- */
-class TAO_RTEvent_Export TAO_ECG_UDP_Out_Endpoint
-{
-public:
- /// Constructor
- TAO_ECG_UDP_Out_Endpoint (void);
-
- /// Constructor
- ~TAO_ECG_UDP_Out_Endpoint (void);
-
- /// Obtain the datagram associated with this endpoint. Clients of
- /// this class must open, and register (if necessary) this datagram.
- ACE_SOCK_Dgram& dgram (void);
-
- /// Obtain the next request id.
- CORBA::ULong next_request_id (void);
-
- /// The endpoint can detect if a data-gram was sent by itself, this
- /// is useful to ignore or remove messages sent by the same process.
- CORBA::Boolean is_loopback (const ACE_INET_Addr& from);
-
-private:
- /// The request id....
- ACE_Atomic_Op<TAO_SYNCH_MUTEX,CORBA::ULong> request_id_generator_;
-
- /// The datagram....
- ACE_SOCK_Dgram dgram_;
-
- /// cache the port-number so we can quickly determine if an event is
- /// coming from another endpoint.
- u_short port_number_;
-
- /// Keep the list of local interfaces, needed for the is_loopback
- /// method.
- size_t if_count_;
- ACE_INET_Addr* ifs_;
-};
-
-// ****************************************************************
-
-/**
* @class TAO_ECG_UDP_Request_Index
*
* @brief Index to the request map.
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i
index ed0c0aee308..abb706b3bad 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i
@@ -3,28 +3,6 @@
//
ACE_INLINE
-TAO_ECG_UDP_Out_Endpoint::TAO_ECG_UDP_Out_Endpoint (void)
- : port_number_ (0),
- if_count_ (0),
- ifs_ (0)
-{
-}
-
-ACE_INLINE ACE_SOCK_Dgram&
-TAO_ECG_UDP_Out_Endpoint::dgram (void)
-{
- return this->dgram_;
-}
-
-ACE_INLINE CORBA::ULong
-TAO_ECG_UDP_Out_Endpoint::next_request_id (void)
-{
- return this->request_id_generator_++;
-}
-
-// ****************************************************************
-
-ACE_INLINE
TAO_ECG_UDP_Request_Index::TAO_ECG_UDP_Request_Index (void)
: request_id (0)
{
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp
index a1a4d63b5f7..03a62d1e00d 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp
@@ -1,7 +1,7 @@
// $Id$
#include "EC_Kokyu_Dispatching.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_ProxySupplier.h"
#include "EC_QOS_Info.h"
@@ -18,7 +18,7 @@
ACE_RCSID(Event, EC_Kokyu_Dispatching, "$Id$")
-TAO_EC_Kokyu_Dispatching::TAO_EC_Kokyu_Dispatching (TAO_EC_Event_Channel *ec)
+TAO_EC_Kokyu_Dispatching::TAO_EC_Kokyu_Dispatching (TAO_EC_Event_Channel_Base *ec)
:dispatcher_ (0)
{
CORBA::Object_var tmp = ec->scheduler ();
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h
index 67efb7ce4b0..c533fb24359 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h
@@ -31,7 +31,7 @@
#include "Kokyu/Kokyu.h"
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
/**
* @class TAO_EC_Kokyu_Dispatching
@@ -54,7 +54,7 @@ class TAO_RTKokyuEvent_Export TAO_EC_Kokyu_Dispatching : public TAO_EC_Dispatchi
public:
/// The scheduler is used to find the range of priorities and similar
/// info.
- TAO_EC_Kokyu_Dispatching (TAO_EC_Event_Channel* ec);
+ TAO_EC_Kokyu_Dispatching (TAO_EC_Event_Channel_Base* ec);
// = The EC_Dispatching methods.
virtual void activate (void);
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp
index b023967030e..015c5e97b85 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp
@@ -4,7 +4,7 @@
#include "EC_Kokyu_Dispatching.h"
#include "EC_Kokyu_Scheduling.h"
#include "EC_Kokyu_Filter_Builder.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "orbsvcs/RtecSchedulerC.h"
#include "ace/Arg_Shifter.h"
@@ -175,7 +175,7 @@ TAO_EC_Kokyu_Factory::fini (void)
// ****************************************************************
TAO_EC_Dispatching*
-TAO_EC_Kokyu_Factory::create_dispatching (TAO_EC_Event_Channel *ec)
+TAO_EC_Kokyu_Factory::create_dispatching (TAO_EC_Event_Channel_Base *ec)
{
if (this->dispatching_ == 2)
return new TAO_EC_Kokyu_Dispatching (ec);
@@ -183,7 +183,7 @@ TAO_EC_Kokyu_Factory::create_dispatching (TAO_EC_Event_Channel *ec)
}
TAO_EC_Filter_Builder*
-TAO_EC_Kokyu_Factory::create_filter_builder (TAO_EC_Event_Channel *ec)
+TAO_EC_Kokyu_Factory::create_filter_builder (TAO_EC_Event_Channel_Base *ec)
{
if (this->filtering_ == 3)
return new TAO_EC_Kokyu_Filter_Builder (ec);
@@ -193,7 +193,7 @@ TAO_EC_Kokyu_Factory::create_filter_builder (TAO_EC_Event_Channel *ec)
TAO_EC_Timeout_Generator*
-TAO_EC_Kokyu_Factory::create_timeout_generator (TAO_EC_Event_Channel *ec)
+TAO_EC_Kokyu_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *ec)
{
#if 0
if (this->timeout_ == 1)
@@ -205,7 +205,7 @@ TAO_EC_Kokyu_Factory::create_timeout_generator (TAO_EC_Event_Channel *ec)
}
TAO_EC_Scheduling_Strategy*
-TAO_EC_Kokyu_Factory::create_scheduling_strategy (TAO_EC_Event_Channel* ec)
+TAO_EC_Kokyu_Factory::create_scheduling_strategy (TAO_EC_Event_Channel_Base* ec)
{
if (this->scheduling_ == 2)
{
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h
index 9eb866f7898..04102d064b2 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h
@@ -50,13 +50,13 @@ public:
// = The EC_Factory methods
virtual TAO_EC_Dispatching*
- create_dispatching (TAO_EC_Event_Channel*);
+ create_dispatching (TAO_EC_Event_Channel_Base*);
virtual TAO_EC_Filter_Builder*
- create_filter_builder (TAO_EC_Event_Channel*);
+ create_filter_builder (TAO_EC_Event_Channel_Base*);
virtual TAO_EC_Timeout_Generator*
- create_timeout_generator (TAO_EC_Event_Channel*);
+ create_timeout_generator (TAO_EC_Event_Channel_Base*);
virtual TAO_EC_Scheduling_Strategy*
- create_scheduling_strategy (TAO_EC_Event_Channel*);
+ create_scheduling_strategy (TAO_EC_Event_Channel_Base*);
private:
};
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.cpp
index 397f39b57e0..283b7428fef 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.cpp
@@ -7,7 +7,7 @@
#include "EC_Conjunction_Filter.h"
#include "EC_Disjunction_Filter.h"
#include "EC_Timeout_Filter.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#if ! defined (__ACE_INLINE__)
#include "EC_Kokyu_Filter_Builder.i"
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.h b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.h
index 662a0f584d3..aa19801a096 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.h
@@ -26,7 +26,7 @@
#include "rtkokyu_event_export.h"
class TAO_EC_Filter;
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
/**
* @class TAO_EC_Kokyu_Filter_Builder
@@ -41,7 +41,7 @@ class TAO_RTKokyuEvent_Export TAO_EC_Kokyu_Filter_Builder : public TAO_EC_Filter
{
public:
/// constructor.
- TAO_EC_Kokyu_Filter_Builder (TAO_EC_Event_Channel* ec);
+ TAO_EC_Kokyu_Filter_Builder (TAO_EC_Event_Channel_Base* ec);
/// destructor...
virtual ~TAO_EC_Kokyu_Filter_Builder (void);
@@ -74,7 +74,7 @@ private:
private:
/// The event channel.
- TAO_EC_Event_Channel* event_channel_;
+ TAO_EC_Event_Channel_Base* event_channel_;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.i b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.i
index 3d0bc98e6d9..db27e8da5db 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Filter_Builder.i
@@ -2,7 +2,7 @@
ACE_INLINE
TAO_EC_Kokyu_Filter_Builder::
- TAO_EC_Kokyu_Filter_Builder (TAO_EC_Event_Channel *ec)
+ TAO_EC_Kokyu_Filter_Builder (TAO_EC_Event_Channel_Base *ec)
: event_channel_ (ec)
{
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_MT_Dispatching.h b/TAO/orbsvcs/orbsvcs/Event/EC_MT_Dispatching.h
index 43d1db1820d..060a65eb913 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_MT_Dispatching.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_MT_Dispatching.h
@@ -24,8 +24,6 @@
#include "EC_Dispatching_Task.h"
-class TAO_EC_Event_Channel;
-
/**
* @class TAO_EC_MT_Dispatching
*
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp
index 3142d20db5d..e9df4b4298e 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp
@@ -1,19 +1,19 @@
// $Id$
#include "EC_Null_Factory.h"
-#include "EC_Dispatching.h"
+#include "EC_Reactive_Dispatching.h"
#include "EC_Filter_Builder.h"
#include "EC_Trivial_Supplier_Filter.h"
#include "EC_ConsumerAdmin.h"
#include "EC_SupplierAdmin.h"
-#include "EC_ProxyConsumer.h"
-#include "EC_ProxySupplier.h"
+#include "EC_Default_ProxyConsumer.h"
+#include "EC_Default_ProxySupplier.h"
#include "EC_ObserverStrategy.h"
#include "EC_Null_Scheduling.h"
#include "EC_Reactive_Timeout_Generator.h"
#include "EC_ConsumerControl.h"
#include "EC_SupplierControl.h"
-#include "EC_Event_Channel.h" // @@ MSVC 6 bug
+#include "EC_Event_Channel_Base.h" // @@ MSVC 6 bug
#include "orbsvcs/ESF/ESF_Proxy_List.h"
#include "orbsvcs/ESF/ESF_Immediate_Changes.h"
@@ -25,12 +25,16 @@
ACE_RCSID(Event, EC_Null_Factory, "$Id$")
+TAO_EC_Null_Factory::TAO_EC_Null_Factory (void)
+{
+}
+
TAO_EC_Null_Factory::~TAO_EC_Null_Factory (void)
{
}
TAO_EC_Dispatching*
-TAO_EC_Null_Factory::create_dispatching (TAO_EC_Event_Channel *)
+TAO_EC_Null_Factory::create_dispatching (TAO_EC_Event_Channel_Base *)
{
return new TAO_EC_Reactive_Dispatching ();
}
@@ -42,7 +46,7 @@ TAO_EC_Null_Factory::destroy_dispatching (TAO_EC_Dispatching *x)
}
TAO_EC_Filter_Builder*
-TAO_EC_Null_Factory::create_filter_builder (TAO_EC_Event_Channel *)
+TAO_EC_Null_Factory::create_filter_builder (TAO_EC_Event_Channel_Base *)
{
return new TAO_EC_Null_Filter_Builder;
}
@@ -54,7 +58,7 @@ TAO_EC_Null_Factory::destroy_filter_builder (TAO_EC_Filter_Builder *x)
}
TAO_EC_Supplier_Filter_Builder*
-TAO_EC_Null_Factory::create_supplier_filter_builder (TAO_EC_Event_Channel *ec)
+TAO_EC_Null_Factory::create_supplier_filter_builder (TAO_EC_Event_Channel_Base *ec)
{
return new TAO_EC_Trivial_Supplier_Filter_Builder (ec);
}
@@ -66,7 +70,7 @@ TAO_EC_Null_Factory::destroy_supplier_filter_builder (TAO_EC_Supplier_Filter_Bui
}
TAO_EC_ConsumerAdmin*
-TAO_EC_Null_Factory::create_consumer_admin (TAO_EC_Event_Channel *ec)
+TAO_EC_Null_Factory::create_consumer_admin (TAO_EC_Event_Channel_Base *ec)
{
return new TAO_EC_ConsumerAdmin (ec);
}
@@ -78,7 +82,7 @@ TAO_EC_Null_Factory::destroy_consumer_admin (TAO_EC_ConsumerAdmin *x)
}
TAO_EC_SupplierAdmin*
-TAO_EC_Null_Factory::create_supplier_admin (TAO_EC_Event_Channel *ec)
+TAO_EC_Null_Factory::create_supplier_admin (TAO_EC_Event_Channel_Base *ec)
{
return new TAO_EC_SupplierAdmin (ec);
}
@@ -90,9 +94,9 @@ TAO_EC_Null_Factory::destroy_supplier_admin (TAO_EC_SupplierAdmin *x)
}
TAO_EC_ProxyPushSupplier*
-TAO_EC_Null_Factory::create_proxy_push_supplier (TAO_EC_Event_Channel *ec)
+TAO_EC_Null_Factory::create_proxy_push_supplier (TAO_EC_Event_Channel_Base *ec)
{
- return new TAO_EC_ProxyPushSupplier (ec, TAO_EC_DEFAULT_CONSUMER_VALIDATE_CONNECTION);
+ return new TAO_EC_Default_ProxyPushSupplier (ec, TAO_EC_DEFAULT_CONSUMER_VALIDATE_CONNECTION);
}
void
@@ -102,9 +106,9 @@ TAO_EC_Null_Factory::destroy_proxy_push_supplier (TAO_EC_ProxyPushSupplier *x)
}
TAO_EC_ProxyPushConsumer*
-TAO_EC_Null_Factory::create_proxy_push_consumer (TAO_EC_Event_Channel *ec)
+TAO_EC_Null_Factory::create_proxy_push_consumer (TAO_EC_Event_Channel_Base *ec)
{
- return new TAO_EC_ProxyPushConsumer (ec);
+ return new TAO_EC_Default_ProxyPushConsumer (ec);
}
void
@@ -114,7 +118,7 @@ TAO_EC_Null_Factory::destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer *x)
}
TAO_EC_Timeout_Generator*
-TAO_EC_Null_Factory::create_timeout_generator (TAO_EC_Event_Channel *)
+TAO_EC_Null_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *)
{
int argc = 0;
char **argv = 0;
@@ -131,7 +135,7 @@ TAO_EC_Null_Factory::destroy_timeout_generator (TAO_EC_Timeout_Generator *x)
}
TAO_EC_ObserverStrategy*
-TAO_EC_Null_Factory::create_observer_strategy (TAO_EC_Event_Channel *)
+TAO_EC_Null_Factory::create_observer_strategy (TAO_EC_Event_Channel_Base *)
{
return new TAO_EC_Null_ObserverStrategy;
}
@@ -143,7 +147,7 @@ TAO_EC_Null_Factory::destroy_observer_strategy (TAO_EC_ObserverStrategy *x)
}
TAO_EC_Scheduling_Strategy*
-TAO_EC_Null_Factory::create_scheduling_strategy (TAO_EC_Event_Channel*)
+TAO_EC_Null_Factory::create_scheduling_strategy (TAO_EC_Event_Channel_Base*)
{
return new TAO_EC_Null_Scheduling;
}
@@ -155,7 +159,7 @@ TAO_EC_Null_Factory::destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy* x)
}
TAO_EC_ProxyPushConsumer_Collection*
-TAO_EC_Null_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel *)
+TAO_EC_Null_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base *)
{
// This typedef is a workaround for a SunCC 4.2 bug
typedef TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>::Iterator TAO_EC_Consumer_List_Iterator;
@@ -172,7 +176,7 @@ TAO_EC_Null_Factory::destroy_proxy_push_consumer_collection (TAO_EC_ProxyPushCon
}
TAO_EC_ProxyPushSupplier_Collection*
-TAO_EC_Null_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Channel *)
+TAO_EC_Null_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base *)
{
// This typedef is a workaround for a SunCC 4.2 bug
typedef TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>::Iterator TAO_EC_Supplier_List_Iterator;
@@ -213,7 +217,7 @@ TAO_EC_Null_Factory::destroy_supplier_lock (ACE_Lock* x)
}
TAO_EC_ConsumerControl*
-TAO_EC_Null_Factory::create_consumer_control (TAO_EC_Event_Channel*)
+TAO_EC_Null_Factory::create_consumer_control (TAO_EC_Event_Channel_Base*)
{
return new TAO_EC_ConsumerControl ();
}
@@ -225,7 +229,7 @@ TAO_EC_Null_Factory::destroy_consumer_control (TAO_EC_ConsumerControl* x)
}
TAO_EC_SupplierControl*
-TAO_EC_Null_Factory::create_supplier_control (TAO_EC_Event_Channel*)
+TAO_EC_Null_Factory::create_supplier_control (TAO_EC_Event_Channel_Base*)
{
return new TAO_EC_SupplierControl ();
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.h b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.h
index 7484ebc8039..646f229a308 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.h
@@ -44,51 +44,51 @@ public:
// = The EC_Factory methods
virtual TAO_EC_Dispatching*
- create_dispatching (TAO_EC_Event_Channel*);
+ create_dispatching (TAO_EC_Event_Channel_Base*);
virtual void
destroy_dispatching (TAO_EC_Dispatching*);
virtual TAO_EC_Filter_Builder*
- create_filter_builder (TAO_EC_Event_Channel*);
+ create_filter_builder (TAO_EC_Event_Channel_Base*);
virtual void
destroy_filter_builder (TAO_EC_Filter_Builder*);
virtual TAO_EC_Supplier_Filter_Builder*
- create_supplier_filter_builder (TAO_EC_Event_Channel*);
+ create_supplier_filter_builder (TAO_EC_Event_Channel_Base*);
virtual void
destroy_supplier_filter_builder (TAO_EC_Supplier_Filter_Builder*);
virtual TAO_EC_ConsumerAdmin*
- create_consumer_admin (TAO_EC_Event_Channel*);
+ create_consumer_admin (TAO_EC_Event_Channel_Base*);
virtual void
destroy_consumer_admin (TAO_EC_ConsumerAdmin*);
virtual TAO_EC_SupplierAdmin*
- create_supplier_admin (TAO_EC_Event_Channel*);
+ create_supplier_admin (TAO_EC_Event_Channel_Base*);
virtual void
destroy_supplier_admin (TAO_EC_SupplierAdmin*);
virtual TAO_EC_ProxyPushSupplier*
- create_proxy_push_supplier (TAO_EC_Event_Channel*);
+ create_proxy_push_supplier (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_supplier (TAO_EC_ProxyPushSupplier*);
virtual TAO_EC_ProxyPushConsumer*
- create_proxy_push_consumer (TAO_EC_Event_Channel*);
+ create_proxy_push_consumer (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer*);
virtual TAO_EC_Timeout_Generator*
- create_timeout_generator (TAO_EC_Event_Channel*);
+ create_timeout_generator (TAO_EC_Event_Channel_Base*);
virtual void
destroy_timeout_generator (TAO_EC_Timeout_Generator*);
virtual TAO_EC_ObserverStrategy*
- create_observer_strategy (TAO_EC_Event_Channel*);
+ create_observer_strategy (TAO_EC_Event_Channel_Base*);
virtual void
destroy_observer_strategy (TAO_EC_ObserverStrategy*);
virtual TAO_EC_Scheduling_Strategy*
- create_scheduling_strategy (TAO_EC_Event_Channel*);
+ create_scheduling_strategy (TAO_EC_Event_Channel_Base*);
virtual void
destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy*);
virtual TAO_EC_ProxyPushConsumer_Collection*
- create_proxy_push_consumer_collection (TAO_EC_Event_Channel*);
+ create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_consumer_collection (TAO_EC_ProxyPushConsumer_Collection*);
virtual TAO_EC_ProxyPushSupplier_Collection*
- create_proxy_push_supplier_collection (TAO_EC_Event_Channel*);
+ create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_supplier_collection (TAO_EC_ProxyPushSupplier_Collection*);
@@ -98,11 +98,11 @@ public:
virtual void destroy_supplier_lock (ACE_Lock*);
virtual TAO_EC_ConsumerControl*
- create_consumer_control (TAO_EC_Event_Channel*);
+ create_consumer_control (TAO_EC_Event_Channel_Base*);
virtual void
destroy_consumer_control (TAO_EC_ConsumerControl*);
virtual TAO_EC_SupplierControl*
- create_supplier_control (TAO_EC_Event_Channel*);
+ create_supplier_control (TAO_EC_Event_Channel_Base*);
virtual void
destroy_supplier_control (TAO_EC_SupplierControl*);
};
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.i b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.i
index d8ec0a6e4f9..74e88caa0c5 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.i
@@ -1,6 +1,2 @@
// $Id$
-ACE_INLINE
-TAO_EC_Null_Factory::TAO_EC_Null_Factory (void)
-{
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp
index 64b40f4e1da..a32233d1460 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp
@@ -1,7 +1,7 @@
// $Id$
#include "EC_ObserverStrategy.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_ProxySupplier.h"
#include "EC_ProxyConsumer.h"
#include "EC_ConsumerAdmin.h"
@@ -139,46 +139,44 @@ TAO_EC_Basic_ObserverStrategy::remove_observer (
RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER());
}
+int
+TAO_EC_Basic_ObserverStrategy::create_observer_list (
+ RtecEventChannelAdmin::Observer_var *&lst
+ ACE_ENV_ARG_DECL)
+{
+ ACE_GUARD_THROW_EX (ACE_Lock, ace_mon, *this->lock_,
+ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR());
+ ACE_CHECK_RETURN (0);
+
+ int size = ACE_static_cast (int, this->observers_.current_size ());
+ RtecEventChannelAdmin::Observer_var *tmp;
+ ACE_NEW_RETURN (tmp,
+ RtecEventChannelAdmin::Observer_var[size],
+ 0);
+ ACE_Auto_Basic_Array_Ptr<RtecEventChannelAdmin::Observer_var> copy (tmp);
+
+ Observer_Map_Iterator end = this->observers_.end ();
+ int j = 0;
+ for (Observer_Map_Iterator i = this->observers_.begin ();
+ i != end;
+ ++i)
+ {
+ Observer_Entry& entry = (*i).int_id_;
+ copy[j++] =
+ RtecEventChannelAdmin::Observer::_duplicate (entry.observer.in ());
+ }
+
+ lst = copy.release ();
+ return size;
+}
+
void
TAO_EC_Basic_ObserverStrategy::connected (
TAO_EC_ProxyPushConsumer *consumer
ACE_ENV_ARG_DECL)
{
- if (consumer->publications ().is_gateway)
- return;
-
- RtecEventChannelAdmin::SupplierQOS s_qos;
- this->fill_qos (s_qos ACE_ENV_ARG_PARAMETER);
+ this->supplier_qos_update (consumer ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
-
- int size = 0;
- ACE_Auto_Basic_Array_Ptr<RtecEventChannelAdmin::Observer_var> copy;
- {
- ACE_GUARD_THROW_EX (ACE_Lock, ace_mon, *this->lock_,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR());
- ACE_CHECK;
- size = ACE_static_cast (int, this->observers_.current_size ());
- RtecEventChannelAdmin::Observer_var *tmp;
- ACE_NEW (tmp, RtecEventChannelAdmin::Observer_var[size]);
- copy.reset (tmp);
-
- Observer_Map_Iterator end = this->observers_.end ();
- int j = 0;
- for (Observer_Map_Iterator i = this->observers_.begin ();
- i != end;
- ++i)
- {
- Observer_Entry& entry = (*i).int_id_;
- copy[j++] =
- RtecEventChannelAdmin::Observer::_duplicate (entry.observer.in ());
- }
- }
-
- for (int i = 0; i != size; ++i)
- {
- copy[i]->update_supplier (s_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
}
void
@@ -186,6 +184,15 @@ TAO_EC_Basic_ObserverStrategy::disconnected (
TAO_EC_ProxyPushConsumer* consumer
ACE_ENV_ARG_DECL)
{
+ this->supplier_qos_update (consumer ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_EC_Basic_ObserverStrategy::supplier_qos_update (
+ TAO_EC_ProxyPushConsumer *consumer
+ ACE_ENV_ARG_DECL)
+{
if (consumer->publications ().is_gateway)
return;
@@ -193,28 +200,10 @@ TAO_EC_Basic_ObserverStrategy::disconnected (
this->fill_qos (s_qos ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- int size = 0;
- ACE_Auto_Basic_Array_Ptr<RtecEventChannelAdmin::Observer_var> copy;
- {
- ACE_GUARD_THROW_EX (ACE_Lock, ace_mon, *this->lock_,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR());
- ACE_CHECK;
- size = ACE_static_cast (int, this->observers_.current_size ());
- RtecEventChannelAdmin::Observer_var *tmp;
- ACE_NEW (tmp, RtecEventChannelAdmin::Observer_var[size]);
- copy.reset (tmp);
-
- Observer_Map_Iterator end = this->observers_.end ();
- int j = 0;
- for (Observer_Map_Iterator i = this->observers_.begin ();
- i != end;
- ++i)
- {
- Observer_Entry& entry = (*i).int_id_;
- copy[j++] =
- RtecEventChannelAdmin::Observer::_duplicate (entry.observer.in ());
- }
- }
+ RtecEventChannelAdmin::Observer_var *tmp = 0;
+ int size = this->create_observer_list (tmp ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ ACE_Auto_Basic_Array_Ptr<RtecEventChannelAdmin::Observer_var> copy (tmp);
for (int i = 0; i != size; ++i)
{
@@ -228,41 +217,8 @@ TAO_EC_Basic_ObserverStrategy::connected (
TAO_EC_ProxyPushSupplier* supplier
ACE_ENV_ARG_DECL)
{
- if (supplier->subscriptions ().is_gateway)
- return;
-
- RtecEventChannelAdmin::ConsumerQOS c_qos;
- this->fill_qos (c_qos ACE_ENV_ARG_PARAMETER);
+ this->consumer_qos_update (supplier ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
-
- int size = 0;
- ACE_Auto_Basic_Array_Ptr<RtecEventChannelAdmin::Observer_var> copy;
- {
- ACE_GUARD_THROW_EX (ACE_Lock, ace_mon, *this->lock_,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR());
- ACE_CHECK;
- size = ACE_static_cast (int, this->observers_.current_size ());
- RtecEventChannelAdmin::Observer_var *tmp;
- ACE_NEW (tmp, RtecEventChannelAdmin::Observer_var[size]);
- copy.reset (tmp);
-
- Observer_Map_Iterator end = this->observers_.end ();
- int j = 0;
- for (Observer_Map_Iterator i = this->observers_.begin ();
- i != end;
- ++i)
- {
- Observer_Entry& entry = (*i).int_id_;
- copy[j++] =
- RtecEventChannelAdmin::Observer::_duplicate (entry.observer.in ());
- }
- }
-
- for (int i = 0; i != size; ++i)
- {
- copy[i]->update_consumer (c_qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
}
void
@@ -270,6 +226,15 @@ TAO_EC_Basic_ObserverStrategy::disconnected (
TAO_EC_ProxyPushSupplier* supplier
ACE_ENV_ARG_DECL)
{
+ this->consumer_qos_update (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_EC_Basic_ObserverStrategy::consumer_qos_update (
+ TAO_EC_ProxyPushSupplier *supplier
+ ACE_ENV_ARG_DECL)
+{
if (supplier->subscriptions ().is_gateway)
return;
@@ -277,28 +242,10 @@ TAO_EC_Basic_ObserverStrategy::disconnected (
this->fill_qos (c_qos ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- int size = 0;
- ACE_Auto_Basic_Array_Ptr<RtecEventChannelAdmin::Observer_var> copy;
- {
- ACE_GUARD_THROW_EX (ACE_Lock, ace_mon, *this->lock_,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR());
- ACE_CHECK;
- size = ACE_static_cast (int, this->observers_.current_size ());
- RtecEventChannelAdmin::Observer_var *tmp;
- ACE_NEW (tmp, RtecEventChannelAdmin::Observer_var[size]);
- copy.reset (tmp);
-
- Observer_Map_Iterator end = this->observers_.end ();
- int j = 0;
- for (Observer_Map_Iterator i = this->observers_.begin ();
- i != end;
- ++i)
- {
- Observer_Entry& entry = (*i).int_id_;
- copy[j++] =
- RtecEventChannelAdmin::Observer::_duplicate (entry.observer.in ());
- }
- }
+ RtecEventChannelAdmin::Observer_var *tmp = 0;
+ int size = this->create_observer_list (tmp ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ ACE_Auto_Basic_Array_Ptr<RtecEventChannelAdmin::Observer_var> copy (tmp);
for (int i = 0; i != size; ++i)
{
@@ -315,7 +262,8 @@ TAO_EC_Basic_ObserverStrategy::fill_qos (
Headers headers;
TAO_EC_Accumulate_Supplier_Headers worker (headers);
- this->event_channel_->consumer_admin ()->for_each (&worker ACE_ENV_ARG_PARAMETER);
+ this->event_channel_->for_each_consumer (&worker
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
RtecEventChannelAdmin::DependencySet& dep = qos.dependencies;
@@ -343,8 +291,8 @@ TAO_EC_Basic_ObserverStrategy::fill_qos (
Headers headers;
TAO_EC_Accumulate_Consumer_Headers worker (headers);
- this->event_channel_->supplier_admin ()->for_each (&worker
- ACE_ENV_ARG_PARAMETER);
+ this->event_channel_->for_each_supplier (&worker
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
qos.publications.length (ACE_static_cast (CORBA::ULong,
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.h b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.h
index c36f80e24a0..1ca3f89b15d 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.h
@@ -28,7 +28,7 @@
#include "event_export.h"
class ACE_Lock;
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
class TAO_EC_ProxyPushConsumer;
class TAO_EC_ProxyPushSupplier;
@@ -143,11 +143,12 @@ public:
* It assumes ownership of the <lock>, but not of the
* Event_Channel.
*/
-class TAO_RTEvent_Export TAO_EC_Basic_ObserverStrategy : public TAO_EC_ObserverStrategy
+class TAO_RTEvent_Export TAO_EC_Basic_ObserverStrategy :
+ public TAO_EC_ObserverStrategy
{
public:
/// Constructor
- TAO_EC_Basic_ObserverStrategy (TAO_EC_Event_Channel* ec,
+ TAO_EC_Basic_ObserverStrategy (TAO_EC_Event_Channel_Base* ec,
ACE_Lock* lock);
/// Destructor
@@ -177,21 +178,20 @@ public:
virtual void disconnected (TAO_EC_ProxyPushSupplier*
ACE_ENV_ARG_DECL_NOT_USED);
-
+ /**
+ * @struct Observer_Entry
+ *
+ * @brief The data kept for each observer.
+ *
+ * The observer and its handle are kept in a simple structure.
+ * In the future this structure could contain QoS information,
+ * such as:
+ * + how often do we update the observer?
+ * + When was the last update.
+ * + Does it want to receive all changes?
+ */
struct Observer_Entry
{
- // = TITLE
- // The data kept for each observer.
- //
- // = DESCRIPTION
- // The observer and its handle are kept in a simple structure.
- // In the future this structure could contain QoS information,
- // such as:
- // + how often do we update the observer?
- // + When was the last update.
- // + Does it want to receive all changes?
- //
-
// The ACE_INLINE macros here are to keep g++ 2.7.X happy,
// otherwise it thinks they are used as inline functions before
// beign used as such.... Apparently in the template code for the
@@ -200,11 +200,11 @@ public:
ACE_INLINE Observer_Entry (RtecEventChannelAdmin::Observer_Handle h,
RtecEventChannelAdmin::Observer_ptr o);
+ /// The handle
RtecEventChannelAdmin::Observer_Handle handle;
- // The handle
+ /// The observer
RtecEventChannelAdmin::Observer_var observer;
- // The observer
};
struct Header_Compare
@@ -221,15 +221,32 @@ public:
typedef ACE_RB_Tree_Iterator<RtecEventComm::EventHeader,int,Header_Compare,ACE_Null_Mutex> HeadersIterator;
protected:
- /// Helper functions to compute the consumer and supplier QOS.
+ /// Helpers.
+ //@{
+ /// Recompute EC consumer subscriptions and send them out to all observers.
+ void consumer_qos_update (TAO_EC_ProxyPushSupplier *supplier
+ ACE_ENV_ARG_DECL);
+
+ /// Recompute EC supplier publications and send them out to all observers.
+ void supplier_qos_update (TAO_EC_ProxyPushConsumer *consumer
+ ACE_ENV_ARG_DECL);
+
+ /// Compute consumer QOS.
void fill_qos (RtecEventChannelAdmin::ConsumerQOS &qos
ACE_ENV_ARG_DECL);
+ /// Compute supplier QOS.
void fill_qos (RtecEventChannelAdmin::SupplierQOS &qos
ACE_ENV_ARG_DECL);
+ /// Copies all current observers into an array and passes it
+ /// back to the caller through <lst>. Returns the size of the array.
+ int create_observer_list (RtecEventChannelAdmin::Observer_var *&lst
+ ACE_ENV_ARG_DECL);
+ //@}
+
protected:
/// The event channel.
- TAO_EC_Event_Channel* event_channel_;
+ TAO_EC_Event_Channel_Base* event_channel_;
/// The lock
ACE_Lock* lock_;
@@ -244,7 +261,8 @@ protected:
// ****************************************************************
-class TAO_EC_Accumulate_Supplier_Headers : public TAO_ESF_Worker<TAO_EC_ProxyPushSupplier>
+class TAO_EC_Accumulate_Supplier_Headers :
+ public TAO_ESF_Worker<TAO_EC_ProxyPushSupplier>
{
public:
/// Constructor
@@ -259,7 +277,8 @@ private:
// ****************************************************************
-class TAO_EC_Accumulate_Consumer_Headers : public TAO_ESF_Worker<TAO_EC_ProxyPushConsumer>
+class TAO_EC_Accumulate_Consumer_Headers :
+ public TAO_ESF_Worker<TAO_EC_ProxyPushConsumer>
{
public:
/// Constructor
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.i b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.i
index b426368911e..d2f8c4e9008 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.i
@@ -38,7 +38,7 @@ TAO_EC_Basic_ObserverStrategy::Header_Compare::
ACE_INLINE
TAO_EC_Basic_ObserverStrategy::
- TAO_EC_Basic_ObserverStrategy (TAO_EC_Event_Channel* ec,
+ TAO_EC_Basic_ObserverStrategy (TAO_EC_Event_Channel_Base* ec,
ACE_Lock* lock)
: event_channel_ (ec),
lock_ (lock),
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp
index 2b7fa9d3bba..c5636dcc759 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp
@@ -1,7 +1,7 @@
// $Id$
#include "EC_Per_Supplier_Filter.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_ProxySupplier.h"
#include "EC_ProxyConsumer.h"
#include "EC_Scheduling_Strategy.h"
@@ -18,7 +18,7 @@
ACE_RCSID(Event, EC_Per_Supplier_Filter, "$Id$")
TAO_EC_Per_Supplier_Filter::
- TAO_EC_Per_Supplier_Filter (TAO_EC_Event_Channel* ec)
+ TAO_EC_Per_Supplier_Filter (TAO_EC_Event_Channel_Base* ec)
: event_channel_ (ec),
consumer_ (0),
refcnt_ (1)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h
index cc6d6f8f785..cfe65b9c425 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h
@@ -25,6 +25,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
template<class PROXY> class TAO_ESF_Proxy_Collection;
+class TAO_EC_Event_Channel_Base;
/**
* @class TAO_EC_Per_Supplier_Filter
@@ -42,7 +43,7 @@ class TAO_RTEvent_Export TAO_EC_Per_Supplier_Filter : public TAO_EC_Supplier_Fil
{
public:
/// Constructor
- TAO_EC_Per_Supplier_Filter (TAO_EC_Event_Channel* ec);
+ TAO_EC_Per_Supplier_Filter (TAO_EC_Event_Channel_Base* ec);
/// Destructor
virtual ~TAO_EC_Per_Supplier_Filter (void);
@@ -68,7 +69,7 @@ public:
private:
/// The event channel, used to locate the set of consumers.
- TAO_EC_Event_Channel *event_channel_;
+ TAO_EC_Event_Channel_Base *event_channel_;
/// The proxy for the supplier we are bound to.
TAO_EC_ProxyPushConsumer* consumer_;
@@ -96,7 +97,7 @@ class TAO_RTEvent_Export TAO_EC_Per_Supplier_Filter_Builder : public TAO_EC_Supp
{
public:
/// constructor....
- TAO_EC_Per_Supplier_Filter_Builder (TAO_EC_Event_Channel* ec);
+ TAO_EC_Per_Supplier_Filter_Builder (TAO_EC_Event_Channel_Base* ec);
// = The TAO_EC_Supplier_Filter_Builder methods...
virtual TAO_EC_Supplier_Filter*
@@ -106,7 +107,7 @@ public:
private:
/// The event channel
- TAO_EC_Event_Channel* event_channel_;
+ TAO_EC_Event_Channel_Base* event_channel_;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.i b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.i
index 5a13d548d35..416f6b68726 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.i
@@ -2,7 +2,7 @@
ACE_INLINE
TAO_EC_Per_Supplier_Filter_Builder::
-TAO_EC_Per_Supplier_Filter_Builder (TAO_EC_Event_Channel* ec)
+TAO_EC_Per_Supplier_Filter_Builder (TAO_EC_Event_Channel_Base* ec)
: event_channel_ (ec)
{
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.h b/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.h
index 8532908b13b..1b3cfceb25c 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.h
@@ -23,7 +23,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
class TAO_EC_Filter;
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
/**
* @class TAO_EC_Prefix_Filter_Builder
@@ -38,7 +38,7 @@ class TAO_RTEvent_Export TAO_EC_Prefix_Filter_Builder : public TAO_EC_Filter_Bui
{
public:
/// constructor.
- TAO_EC_Prefix_Filter_Builder (TAO_EC_Event_Channel* ec);
+ TAO_EC_Prefix_Filter_Builder (TAO_EC_Event_Channel_Base* ec);
/// destructor...
virtual ~TAO_EC_Prefix_Filter_Builder (void);
@@ -56,7 +56,7 @@ private:
private:
/// The event channel.
- TAO_EC_Event_Channel* event_channel_;
+ TAO_EC_Event_Channel_Base* event_channel_;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.i b/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.i
index d3e71528302..c078591f226 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.i
@@ -2,7 +2,7 @@
ACE_INLINE
TAO_EC_Prefix_Filter_Builder::
- TAO_EC_Prefix_Filter_Builder (TAO_EC_Event_Channel *ec)
+ TAO_EC_Prefix_Filter_Builder (TAO_EC_Event_Channel_Base *ec)
: event_channel_ (ec)
{
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.cpp
index 2d7a359b555..53f7634ce00 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.cpp
@@ -2,7 +2,7 @@
#include "EC_Priority_Dispatching.h"
#include "EC_Dispatching_Task.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_QOS_Info.h"
#include "orbsvcs/Event_Service_Constants.h"
@@ -16,7 +16,7 @@
ACE_RCSID(Event, EC_Priority_Dispatching, "$Id$")
-TAO_EC_Priority_Dispatching::TAO_EC_Priority_Dispatching (TAO_EC_Event_Channel *ec)
+TAO_EC_Priority_Dispatching::TAO_EC_Priority_Dispatching (TAO_EC_Event_Channel_Base *ec)
: ntasks_ (0),
tasks_ (0)
{
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.h b/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.h
index ab0b8acf7e0..14b4457e946 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Dispatching.h
@@ -28,7 +28,7 @@
#include "ace/Thread_Manager.h"
class TAO_EC_Dispatching_Task;
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
/**
* @class TAO_EC_Priority_Dispatching
@@ -51,7 +51,7 @@ class TAO_RTSchedEvent_Export TAO_EC_Priority_Dispatching : public TAO_EC_Dispat
public:
/// The scheduler is used to find the range of priorities and similar
/// info.
- TAO_EC_Priority_Dispatching (TAO_EC_Event_Channel* ec);
+ TAO_EC_Priority_Dispatching (TAO_EC_Event_Channel_Base* ec);
// = The EC_Dispatching methods.
virtual void activate (void);
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp
index 15c63c16b4c..5bb54b3e45d 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp
@@ -1,7 +1,7 @@
// $Id$
#include "EC_ProxyConsumer.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_Supplier_Filter.h"
#include "EC_Supplier_Filter_Builder.h"
@@ -14,7 +14,7 @@ ACE_RCSID(Event, EC_ProxyConsumer, "$Id$")
typedef ACE_Reverse_Lock<ACE_Lock> TAO_EC_Unlock;
TAO_EC_ProxyPushConsumer::
- TAO_EC_ProxyPushConsumer (TAO_EC_Event_Channel* ec)
+ TAO_EC_ProxyPushConsumer (TAO_EC_Event_Channel_Base* ec)
: event_channel_ (ec),
refcount_ (1),
connected_ (0),
@@ -129,6 +129,11 @@ TAO_EC_ProxyPushConsumer::disconnected (TAO_EC_ProxyPushConsumer*
}
void
+TAO_EC_ProxyPushConsumer::shutdown_hook (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+}
+
+void
TAO_EC_ProxyPushConsumer::shutdown (ACE_ENV_SINGLE_ARG_DECL)
{
RtecEventComm::PushSupplier_var supplier;
@@ -142,6 +147,9 @@ TAO_EC_ProxyPushConsumer::shutdown (ACE_ENV_SINGLE_ARG_DECL)
supplier = this->supplier_._retn ();
this->connected_ = 0;
+ this->shutdown_hook (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
if (this->filter_ != 0)
{
this->filter_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -185,23 +193,14 @@ TAO_EC_ProxyPushConsumer::cleanup_i (void)
}
}
-RtecEventChannelAdmin::ProxyPushConsumer_ptr
-TAO_EC_ProxyPushConsumer::activate (ACE_ENV_SINGLE_ARG_DECL)
+void
+TAO_EC_ProxyPushConsumer::activate (
+ RtecEventChannelAdmin::ProxyPushConsumer_ptr &proxy
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- RtecEventChannelAdmin::ProxyPushConsumer_var result;
- ACE_TRY
- {
- result =
- this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- // Ignore exceptions...
- }
- ACE_ENDTRY;
- return result._retn ();
+ proxy = RtecEventChannelAdmin::ProxyPushConsumer::_nil ();
+ ACE_THROW (CORBA::NO_IMPLEMENT ());
}
void
@@ -209,13 +208,10 @@ TAO_EC_ProxyPushConsumer::deactivate (ACE_ENV_SINGLE_ARG_DECL)
{
ACE_TRY
{
- PortableServer::POA_var poa =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
+ PortableServer::ObjectId id =
+ this->object_id (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- PortableServer::ObjectId_var id =
- poa->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER);
+ this->default_POA_->deactivate_object (id ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -235,6 +231,13 @@ TAO_EC_ProxyPushConsumer::_incr_refcnt (void)
return this->refcount_++;
}
+void
+TAO_EC_ProxyPushConsumer::refcount_zero_hook (void)
+{
+ // Use the event channel
+ this->event_channel_->destroy_proxy (this);
+}
+
CORBA::ULong
TAO_EC_ProxyPushConsumer::_decr_refcnt (void)
{
@@ -245,165 +248,17 @@ TAO_EC_ProxyPushConsumer::_decr_refcnt (void)
return this->refcount_;
}
- // Use the event channel
- this->event_channel_->destroy_proxy (this);
+ this->refcount_zero_hook ();
return 0;
}
-void
-TAO_EC_ProxyPushConsumer::connect_push_supplier (
- RtecEventComm::PushSupplier_ptr push_supplier,
- const RtecEventChannelAdmin::SupplierQOS& qos
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- RtecEventChannelAdmin::AlreadyConnected))
-{
- {
- ACE_GUARD_THROW_EX (
- ACE_Lock, ace_mon, *this->lock_,
- CORBA::INTERNAL ());
- // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
- ACE_CHECK;
-
- if (this->is_connected_i ())
- {
- if (this->event_channel_->supplier_reconnect () == 0)
- ACE_THROW (RtecEventChannelAdmin::AlreadyConnected ());
-
- // Re-connections are allowed, go ahead and disconnect the
- // consumer...
- this->cleanup_i ();
-
- // @@ Please read the comments in EC_ProxySuppliers about
- // possible race conditions in this area...
- TAO_EC_Unlock reverse_lock (*this->lock_);
-
- {
- ACE_GUARD_THROW_EX (
- TAO_EC_Unlock, ace_mon, reverse_lock,
- CORBA::INTERNAL ());
- // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
- ACE_CHECK;
-
- this->event_channel_->reconnected (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // A separate thread could have connected siomultaneously,
- // this is probably an application error, handle it as
- // gracefully as possible
- if (this->is_connected_i ())
- return; // @@ Should we throw
- }
-
- this->supplier_ =
- RtecEventComm::PushSupplier::_duplicate (push_supplier);
- this->connected_ = 1;
- this->qos_ = qos;
-
-#if TAO_EC_ENABLE_DEBUG_MESSAGES
- ACE_DEBUG ((LM_DEBUG, "Building filter for supplier <%x>\n",
- this));
-#endif /* TAO_EC_ENABLED_DEBUG_MESSAGES */
- this->filter_ =
- this->event_channel_->supplier_filter_builder ()->create (this->qos_);
- this->filter_->bind (this);
- }
-
- // Notify the event channel...
- this->event_channel_->connected (this ACE_ENV_ARG_PARAMETER);
-}
-
-void
-TAO_EC_ProxyPushConsumer::push (const RtecEventComm::EventSet& event
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- TAO_EC_ProxyPushConsumer_Guard ace_mon (this->lock_,
- this->refcount_,
- this->event_channel_,
- this);
- if (!ace_mon.locked ())
- return;
-
- // No need to keep the lock, the filter_ class is supposed to be
- // thread safe....
- ace_mon.filter->push (event, this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_EC_ProxyPushConsumer::disconnect_push_consumer (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- RtecEventComm::PushSupplier_var supplier;
- int connected = 0;
-
- {
- ACE_GUARD_THROW_EX (
- ACE_Lock, ace_mon, *this->lock_,
- CORBA::INTERNAL ());
- // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
- ACE_CHECK;
-
- connected = this->is_connected_i ();
- supplier = this->supplier_._retn ();
- this->connected_ = 0;
-
- if (connected)
- this->cleanup_i ();
- }
-
- // Notify the event channel...
- this->event_channel_->disconnected (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (supplier.in ()))
- {
- return;
- }
-
- if (this->event_channel_->disconnect_callbacks ())
- {
- ACE_TRY
- {
- supplier->disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- // Ignore exceptions, we must isolate other clients from
- // failures on this one.
- }
- ACE_ENDTRY;
- }
-}
-
-PortableServer::POA_ptr
-TAO_EC_ProxyPushConsumer::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->default_POA_.in ());
-}
-
-void
-TAO_EC_ProxyPushConsumer::_add_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- this->_incr_refcnt ();
-}
-
-void
-TAO_EC_ProxyPushConsumer::_remove_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- this->_decr_refcnt ();
-}
// ****************************************************************
TAO_EC_ProxyPushConsumer_Guard::
TAO_EC_ProxyPushConsumer_Guard (ACE_Lock *lock,
CORBA::ULong &refcount,
- TAO_EC_Event_Channel *ec,
+ TAO_EC_Event_Channel_Base *ec,
TAO_EC_ProxyPushConsumer *proxy)
: lock_ (lock),
refcount_ (refcount),
@@ -452,7 +307,8 @@ TAO_EC_ProxyPushConsumer_Guard::
if (this->refcount_ != 0)
return;
}
- this->event_channel_->destroy_proxy (this->proxy_);
+
+ this->proxy_->refcount_zero_hook ();
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h
index 10159ac8bd6..404bbf42e8b 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h
@@ -17,13 +17,12 @@
#include "ace/pre.h"
#include "orbsvcs/RtecEventChannelAdminS.h"
-#include "orbsvcs/Event/EC_Filter.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
class TAO_EC_ProxyPushSupplier;
class TAO_EC_Supplier_Filter;
@@ -49,23 +48,31 @@ class TAO_EC_Supplier_Filter;
* No provisions for locking, access must be serialized
* externally.
*/
-class TAO_RTEvent_Export TAO_EC_ProxyPushConsumer : public POA_RtecEventChannelAdmin::ProxyPushConsumer
+class TAO_RTEvent_Export TAO_EC_ProxyPushConsumer
{
public:
typedef RtecEventChannelAdmin::ProxyPushConsumer Interface;
typedef RtecEventChannelAdmin::ProxyPushConsumer_var _var_type;
+ typedef RtecEventChannelAdmin::ProxyPushConsumer_ptr _ptr_type;
/// constructor...
- TAO_EC_ProxyPushConsumer (TAO_EC_Event_Channel* event_channel);
+ TAO_EC_ProxyPushConsumer (TAO_EC_Event_Channel_Base* event_channel);
/// destructor...
virtual ~TAO_EC_ProxyPushConsumer (void);
/// Activate in the POA
- virtual RtecEventChannelAdmin::ProxyPushConsumer_ptr activate (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void activate (
+ RtecEventChannelAdmin::ProxyPushConsumer_ptr &proxy
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
/// Deactivate from the POA
- void deactivate (ACE_ENV_SINGLE_ARG_DECL);
+ virtual void deactivate (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Disconnect this from
+ virtual void disconnect_push_consumer (
+ ACE_ENV_SINGLE_ARG_DECL) = 0;
/// Return 0 if no supplier is connected...
CORBA::Boolean is_connected (void) const;
@@ -114,23 +121,6 @@ public:
CORBA::ULong _incr_refcnt (void);
CORBA::ULong _decr_refcnt (void);
- // = The RtecEventChannelAdmin::ProxyPushConsumer methods...
- virtual void connect_push_supplier (
- RtecEventComm::PushSupplier_ptr push_supplier,
- const RtecEventChannelAdmin::SupplierQOS& qos
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- RtecEventChannelAdmin::AlreadyConnected));
- virtual void push (const RtecEventComm::EventSet& event
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // = The Servant methods
- virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
- virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
protected:
/// Set the supplier, used by some implementations to change the
@@ -150,9 +140,8 @@ protected:
/// Release the filter and the supplier
void cleanup_i (void);
-private:
/// The supplier admin, used for activation and memory managment.
- TAO_EC_Event_Channel* event_channel_;
+ TAO_EC_Event_Channel_Base* event_channel_;
/// The locking strategy.
ACE_Lock* lock_;
@@ -175,6 +164,15 @@ private:
/// The strategy to do filtering close to the supplier
TAO_EC_Supplier_Filter* filter_;
+
+private:
+ /// Template method hooks.
+ virtual void shutdown_hook (ACE_ENV_SINGLE_ARG_DECL);
+ virtual void refcount_zero_hook (void);
+
+ virtual PortableServer::ObjectId
+ object_id (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
};
// ****************************************************************
@@ -195,7 +193,7 @@ public:
/// Constructor
TAO_EC_ProxyPushConsumer_Guard (ACE_Lock *lock,
CORBA::ULong &refcount,
- TAO_EC_Event_Channel *ec,
+ TAO_EC_Event_Channel_Base *ec,
TAO_EC_ProxyPushConsumer *proxy);
/// Destructor
@@ -214,7 +212,7 @@ private:
CORBA::ULong &refcount_;
/// The event channel used to destroy the proxy
- TAO_EC_Event_Channel *event_channel_;
+ TAO_EC_Event_Channel_Base *event_channel_;
/// The proxy whose lifetime is controlled by the reference count
TAO_EC_ProxyPushConsumer *proxy_;
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp
index bd9b2a5bbb0..f086377cb1c 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp
@@ -4,9 +4,10 @@
#include "EC_Dispatching.h"
#include "EC_Filter_Builder.h"
#include "EC_QOS_Info.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_Scheduling_Strategy.h"
#include "EC_ConsumerControl.h"
+#include "EC_SupplierAdmin.h"
#include "orbsvcs/ESF/ESF_RefCount_Guard.h"
#include "orbsvcs/ESF/ESF_Proxy_RefCount_Guard.h"
@@ -18,7 +19,7 @@ ACE_RCSID(Event, EC_ProxySupplier, "$Id$")
typedef ACE_Reverse_Lock<ACE_Lock> TAO_EC_Unlock;
-TAO_EC_ProxyPushSupplier::TAO_EC_ProxyPushSupplier (TAO_EC_Event_Channel* ec, int validate_connection)
+TAO_EC_ProxyPushSupplier::TAO_EC_ProxyPushSupplier (TAO_EC_Event_Channel_Base* ec, int validate_connection)
: event_channel_ (ec),
refcount_ (1),
suspended_ (0),
@@ -138,23 +139,14 @@ TAO_EC_ProxyPushSupplier::cleanup_i (void)
this->child_ = 0;
}
-RtecEventChannelAdmin::ProxyPushSupplier_ptr
-TAO_EC_ProxyPushSupplier::activate (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
+void
+TAO_EC_ProxyPushSupplier::activate (
+ RtecEventChannelAdmin::ProxyPushSupplier_ptr &proxy
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
{
- RtecEventChannelAdmin::ProxyPushSupplier_var result;
- ACE_TRY
- {
- result =
- this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- // Ignore exceptions...
- }
- ACE_ENDTRY;
- return result._retn ();
+ proxy = RtecEventChannelAdmin::ProxyPushSupplier::_nil ();
+ ACE_THROW (CORBA::NO_IMPLEMENT ());
}
void
@@ -162,13 +154,10 @@ TAO_EC_ProxyPushSupplier::deactivate (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((
{
ACE_TRY
{
- PortableServer::POA_var poa =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
+ PortableServer::ObjectId id =
+ this->object_id (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- PortableServer::ObjectId_var id =
- poa->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER);
+ this->default_POA_->deactivate_object (id ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -188,6 +177,13 @@ TAO_EC_ProxyPushSupplier::_incr_refcnt (void)
return this->refcount_++;
}
+void
+TAO_EC_ProxyPushSupplier::refcount_zero_hook (void)
+{
+ // Use the event channel
+ this->event_channel_->destroy_proxy (this);
+}
+
CORBA::ULong
TAO_EC_ProxyPushSupplier::_decr_refcnt (void)
{
@@ -198,181 +194,11 @@ TAO_EC_ProxyPushSupplier::_decr_refcnt (void)
return this->refcount_;
}
- // Notify the event channel
- this->event_channel_->destroy_proxy (this);
+ this->refcount_zero_hook ();
return 0;
}
-void
-TAO_EC_ProxyPushSupplier::connect_push_consumer (
- RtecEventComm::PushConsumer_ptr push_consumer,
- const RtecEventChannelAdmin::ConsumerQOS& qos
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- RtecEventChannelAdmin::AlreadyConnected,
- RtecEventChannelAdmin::TypeError))
-{
- // Nil PushConsumers are illegal
- if (CORBA::is_nil (push_consumer))
- ACE_THROW (CORBA::BAD_PARAM ());
-
- {
- ACE_GUARD_THROW_EX (
- ACE_Lock, ace_mon, *this->lock_,
- CORBA::INTERNAL ());
- // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
- ACE_CHECK;
-
- if (this->is_connected_i ())
- {
- if (this->event_channel_->consumer_reconnect () == 0)
- ACE_THROW (RtecEventChannelAdmin::AlreadyConnected ());
-
- // Re-connections are allowed....
- this->cleanup_i ();
-
- this->consumer_ =
- RtecEventComm::PushConsumer::_duplicate (push_consumer);
- this->qos_ = qos;
- this->child_ =
- this->event_channel_->filter_builder ()->build (this,
- this->qos_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->adopt_child (this->child_);
-
- TAO_EC_Unlock reverse_lock (*this->lock_);
-
- {
- ACE_GUARD_THROW_EX (
- TAO_EC_Unlock, ace_mon, reverse_lock,
- CORBA::INTERNAL ());
- // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
- ACE_CHECK;
-
- this->event_channel_->reconnected (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // A separate thread could have connected simultaneously,
- // this is probably an application error, handle it as
- // gracefully as possible
- if (this->is_connected_i ())
- return; // @@ Should we throw
- }
-
- if ( consumer_validate_connection_ == 1 )
- {
- // Validate connection during connect.
- CORBA::PolicyList_var unused;
- int status = push_consumer->_validate_connection (unused
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-#if TAO_EC_ENABLE_DEBUG_MESSAGES
- ACE_DEBUG ((LM_DEBUG, "Validated connection to PushConsumer on connect. Status[%d]\n", status));
-#else
- ACE_UNUSED_ARG(status);
-#endif /* TAO_EC_ENABLED_DEBUG_MESSAGES */
- }
-
- this->consumer_ =
- RtecEventComm::PushConsumer::_duplicate (push_consumer);
- this->qos_ = qos;
-
-#if TAO_EC_ENABLE_DEBUG_MESSAGES
- ACE_DEBUG ((LM_DEBUG, "Building filters for consumer <%x>\n",
- this));
-#endif /* TAO_EC_ENABLED_DEBUG_MESSAGES */
- this->child_ =
- this->event_channel_->filter_builder ()->build (this,
- this->qos_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->adopt_child (this->child_);
- }
-
- // Notify the event channel...
- this->event_channel_->connected (this ACE_ENV_ARG_PARAMETER);
-}
-
-void
-TAO_EC_ProxyPushSupplier::disconnect_push_supplier (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- RtecEventComm::PushConsumer_var consumer;
- int connected = 0;
-
- {
- ACE_GUARD_THROW_EX (
- ACE_Lock, ace_mon, *this->lock_,
- CORBA::INTERNAL ());
- // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
- ACE_CHECK;
-
- connected = this->is_connected_i ();
- consumer = this->consumer_._retn ();
-
- if (connected)
- this->cleanup_i ();
- }
-
- // Notify the event channel....
- this->event_channel_->disconnected (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!connected)
- {
- return;
- }
-
- if (this->event_channel_->disconnect_callbacks ())
- {
- ACE_TRY
- {
- consumer->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- // Ignore exceptions, we must isolate other clients from
- // problems on this one.
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "ProxySupplier::disconnect_push_supplier");
- }
- ACE_ENDTRY;
- }
-}
-
-void
-TAO_EC_ProxyPushSupplier::suspend_connection (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD_THROW_EX (
- ACE_Lock, ace_mon, *this->lock_,
- CORBA::INTERNAL ());
- // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
- ACE_CHECK;
-
- this->suspended_ = 1;
-}
-
-void
-TAO_EC_ProxyPushSupplier::resume_connection (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD_THROW_EX (
- ACE_Lock, ace_mon, *this->lock_,
- CORBA::INTERNAL ());
- // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
- ACE_CHECK;
-
- this->suspended_ = 0;
-}
-
-typedef TAO_ESF_Proxy_RefCount_Guard<TAO_EC_Event_Channel,TAO_EC_ProxyPushSupplier> Destroy_Guard;
+typedef TAO_ESF_Proxy_RefCount_Guard<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushSupplier> Destroy_Guard;
int
TAO_EC_ProxyPushSupplier::filter (const RtecEventComm::EventSet& event,
@@ -453,6 +279,10 @@ TAO_EC_ProxyPushSupplier::push (const RtecEventComm::EventSet& event,
RtecEventComm::PushConsumer_var consumer =
RtecEventComm::PushConsumer::_duplicate (this->consumer_.in ());
+ this->pre_dispatch_hook (ACE_const_cast (RtecEventComm::EventSet&, event)
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
{
// We have to release the lock to avoid dead-locks.
TAO_EC_Unlock reverse_lock (*this->lock_);
@@ -474,6 +304,12 @@ TAO_EC_ProxyPushSupplier::push (const RtecEventComm::EventSet& event,
}
void
+TAO_EC_ProxyPushSupplier::pre_dispatch_hook (RtecEventComm::EventSet&
+ ACE_ENV_ARG_DECL_NOT_USED)
+{
+}
+
+void
TAO_EC_ProxyPushSupplier::push_nocopy (RtecEventComm::EventSet& event,
TAO_EC_QOS_Info& qos_info
ACE_ENV_ARG_DECL)
@@ -500,6 +336,9 @@ TAO_EC_ProxyPushSupplier::push_nocopy (RtecEventComm::EventSet& event,
RtecEventComm::PushConsumer_var consumer =
RtecEventComm::PushConsumer::_duplicate (this->consumer_.in ());
+ this->pre_dispatch_hook (event ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
{
TAO_EC_Unlock reverse_lock (*this->lock_);
@@ -694,35 +533,18 @@ TAO_EC_ProxyPushSupplier::add_dependencies (
return this->child_->add_dependencies (header,
qos_info
- ACE_ENV_ARG_PARAMETER);
-}
-
-PortableServer::POA_ptr
-TAO_EC_ProxyPushSupplier::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->default_POA_.in ());
+ ACE_ENV_ARG_PARAMETER);
}
-void
-TAO_EC_ProxyPushSupplier::_add_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- this->_incr_refcnt ();
-}
-
-void
-TAO_EC_ProxyPushSupplier::_remove_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- this->_decr_refcnt ();
-}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class TAO_ESF_RefCount_Guard<CORBA::ULong>;
-template class TAO_ESF_Proxy_RefCount_Guard<TAO_EC_Event_Channel,TAO_EC_ProxyPushSupplier>;
+template class TAO_ESF_Proxy_RefCount_Guard<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushSupplier>;
#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate TAO_ESF_RefCount_Guard<CORBA::ULong>
-#pragma instantiate TAO_ESF_Proxy_RefCount_Guard<TAO_EC_Event_Channel,TAO_EC_ProxyPushSupplier>
+#pragma instantiate TAO_ESF_Proxy_RefCount_Guard<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushSupplier>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.h b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.h
index eb7771c4811..c3f6b5c82ad 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.h
@@ -23,7 +23,7 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
class TAO_EC_ProxyPushConsumer;
/**
@@ -49,23 +49,32 @@ class TAO_EC_ProxyPushConsumer;
* could short-circuit the filter() ---> push() cycle when the EC
* is properly configured, we need to explore this...
*/
-class TAO_RTEvent_Export TAO_EC_ProxyPushSupplier : public POA_RtecEventChannelAdmin::ProxyPushSupplier, public TAO_EC_Filter
+class TAO_RTEvent_Export TAO_EC_ProxyPushSupplier : public TAO_EC_Filter
{
public:
typedef RtecEventChannelAdmin::ProxyPushSupplier Interface;
typedef RtecEventChannelAdmin::ProxyPushSupplier_var _var_type;
+ typedef RtecEventChannelAdmin::ProxyPushSupplier_ptr _ptr_type;
- /// constructor...
- TAO_EC_ProxyPushSupplier (TAO_EC_Event_Channel* event_channel, int validate_connection);
+ /// Constructor...
+ TAO_EC_ProxyPushSupplier (TAO_EC_Event_Channel_Base* event_channel, int validate_connection);
- /// destructor...
+ /// Destructor...
virtual ~TAO_EC_ProxyPushSupplier (void);
/// Activate in the POA
- virtual RtecEventChannelAdmin::ProxyPushSupplier_ptr activate (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void activate (
+ RtecEventChannelAdmin::ProxyPushSupplier_ptr &proxy
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
/// Deactivate from the POA
- virtual void deactivate (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (());
+ virtual void deactivate (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC (());
+
+ /// Disconnect this from
+ virtual void disconnect_push_supplier (
+ ACE_ENV_SINGLE_ARG_DECL) = 0;
/// Return 0 if no consumer is connected...
CORBA::Boolean is_connected (void) const;
@@ -105,6 +114,11 @@ public:
/// Pushes to the consumer, verifies that it is connected and that it
/// is not suspended.
+ /**
+ * These methods take <consumer> argument because during the time
+ * the filters have been processing the event, this proxy's consumer
+ * may have changed.
+ */
void push_to_consumer (RtecEventComm::PushConsumer_ptr consumer,
const RtecEventComm::EventSet &event
ACE_ENV_ARG_DECL);
@@ -120,21 +134,6 @@ public:
CORBA::Boolean consumer_non_existent (CORBA::Boolean_out disconnected
ACE_ENV_ARG_DECL);
- // = The RtecEventChannelAdmin::ProxyPushSupplier methods...
- virtual void connect_push_consumer (
- RtecEventComm::PushConsumer_ptr push_consumer,
- const RtecEventChannelAdmin::ConsumerQOS &qos
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- RtecEventChannelAdmin::AlreadyConnected,
- RtecEventChannelAdmin::TypeError));
- virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void suspend_connection (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void resume_connection (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
/// Increment and decrement the reference count.
CORBA::ULong _incr_refcnt (void);
CORBA::ULong _decr_refcnt (void);
@@ -159,26 +158,29 @@ public:
const TAO_EC_QOS_Info &qos_info
ACE_ENV_ARG_DECL);
- // = The Servant methods
- virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
- virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL);
- virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL);
-
protected:
/// Set the consumer, used by some implementations to change the
/// policies used when invoking operations on the consumer.
void consumer (RtecEventComm::PushConsumer_ptr consumer);
void consumer_i (RtecEventComm::PushConsumer_ptr consumer);
+ void suspend_connection_i (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ void resume_connection_i (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ void suspend_connection_locked (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ void resume_connection_locked (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
/// The private version (without locking) of is_connected().
CORBA::Boolean is_connected_i (void) const;
/// Release the child and the consumer
void cleanup_i (void);
-private:
/// The Event Channel that owns this object.
- TAO_EC_Event_Channel* event_channel_;
+ TAO_EC_Event_Channel_Base* event_channel_;
/// The locking strategy.
ACE_Lock* lock_;
@@ -203,6 +205,15 @@ private:
/// Validate the connection to consumer on connect
int consumer_validate_connection_;
+private:
+
+ /// Template method hooks.
+ virtual void refcount_zero_hook (void);
+ virtual void pre_dispatch_hook (RtecEventComm::EventSet&
+ ACE_ENV_ARG_DECL);
+ virtual PortableServer::ObjectId
+ object_id (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.i b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.i
index 91f1fe7d52f..d0e06a7b0a6 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.i
@@ -1,5 +1,45 @@
// $Id$
+ACE_INLINE void
+TAO_EC_ProxyPushSupplier::suspend_connection_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->suspended_ = 1;
+}
+
+ACE_INLINE void
+TAO_EC_ProxyPushSupplier::suspend_connection_locked (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_GUARD_THROW_EX (
+ ACE_Lock, ace_mon, *this->lock_,
+ CORBA::INTERNAL ());
+ // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
+ ACE_CHECK;
+
+ this->suspend_connection_i (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+ACE_INLINE void
+TAO_EC_ProxyPushSupplier::resume_connection_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->suspended_ = 0;
+}
+
+ACE_INLINE void
+TAO_EC_ProxyPushSupplier::resume_connection_locked (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_GUARD_THROW_EX (
+ ACE_Lock, ace_mon, *this->lock_,
+ CORBA::INTERNAL ());
+ // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
+ ACE_CHECK;
+
+ this->resume_connection_i (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
ACE_INLINE CORBA::Boolean
TAO_EC_ProxyPushSupplier::is_connected_i (void) const
{
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Dispatching.h b/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Dispatching.h
index 891b19d7b58..9df240f7bfa 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Dispatching.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Dispatching.h
@@ -26,7 +26,6 @@
#include "EC_Dispatching_Task.h"
#include "tao/RTCORBA/RTCORBA.h"
-class TAO_EC_Event_Channel;
/**
* @class TAO_EC_RTCORBA_Dispatching
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.cpp
index 68b5bc79d99..0278f49bfed 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.cpp
@@ -39,7 +39,7 @@ TAO_EC_RTCORBA_Factory::fini (void)
// ****************************************************************
TAO_EC_Dispatching*
-TAO_EC_RTCORBA_Factory::create_dispatching (TAO_EC_Event_Channel *)
+TAO_EC_RTCORBA_Factory::create_dispatching (TAO_EC_Event_Channel_Base *)
{
TAO_EC_Dispatching *dispatching = 0;
ACE_DECLARE_NEW_CORBA_ENV;
@@ -94,7 +94,7 @@ TAO_EC_RTCORBA_Factory::destroy_dispatching (TAO_EC_Dispatching *x)
}
TAO_EC_Filter_Builder*
-TAO_EC_RTCORBA_Factory::create_filter_builder (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_filter_builder (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_filter_builder (ec);
}
@@ -106,7 +106,7 @@ TAO_EC_RTCORBA_Factory::destroy_filter_builder (TAO_EC_Filter_Builder *x)
}
TAO_EC_Supplier_Filter_Builder*
-TAO_EC_RTCORBA_Factory::create_supplier_filter_builder (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_supplier_filter_builder (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_supplier_filter_builder (ec);
}
@@ -118,7 +118,7 @@ TAO_EC_RTCORBA_Factory::destroy_supplier_filter_builder (TAO_EC_Supplier_Filter_
}
TAO_EC_ConsumerAdmin*
-TAO_EC_RTCORBA_Factory::create_consumer_admin (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_consumer_admin (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_consumer_admin (ec);
}
@@ -130,7 +130,7 @@ TAO_EC_RTCORBA_Factory::destroy_consumer_admin (TAO_EC_ConsumerAdmin *x)
}
TAO_EC_SupplierAdmin*
-TAO_EC_RTCORBA_Factory::create_supplier_admin (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_supplier_admin (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_supplier_admin (ec);
}
@@ -142,7 +142,7 @@ TAO_EC_RTCORBA_Factory::destroy_supplier_admin (TAO_EC_SupplierAdmin *x)
}
TAO_EC_ProxyPushSupplier*
-TAO_EC_RTCORBA_Factory::create_proxy_push_supplier (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_proxy_push_supplier (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_proxy_push_supplier (ec);
}
@@ -154,7 +154,7 @@ TAO_EC_RTCORBA_Factory::destroy_proxy_push_supplier (TAO_EC_ProxyPushSupplier *x
}
TAO_EC_ProxyPushConsumer*
-TAO_EC_RTCORBA_Factory::create_proxy_push_consumer (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_proxy_push_consumer (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_proxy_push_consumer (ec);
}
@@ -166,7 +166,7 @@ TAO_EC_RTCORBA_Factory::destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer *x
}
TAO_EC_Timeout_Generator*
-TAO_EC_RTCORBA_Factory::create_timeout_generator (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_timeout_generator (ec);
}
@@ -178,7 +178,7 @@ TAO_EC_RTCORBA_Factory::destroy_timeout_generator (TAO_EC_Timeout_Generator *x)
}
TAO_EC_ObserverStrategy*
-TAO_EC_RTCORBA_Factory::create_observer_strategy (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_observer_strategy (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_observer_strategy (ec);
}
@@ -190,7 +190,7 @@ TAO_EC_RTCORBA_Factory::destroy_observer_strategy (TAO_EC_ObserverStrategy *x)
}
TAO_EC_Scheduling_Strategy*
-TAO_EC_RTCORBA_Factory::create_scheduling_strategy (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_scheduling_strategy (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_scheduling_strategy (ec);
}
@@ -202,7 +202,7 @@ TAO_EC_RTCORBA_Factory::destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy*
}
TAO_EC_ProxyPushConsumer_Collection*
-TAO_EC_RTCORBA_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_proxy_push_consumer_collection (ec);
}
@@ -214,7 +214,7 @@ TAO_EC_RTCORBA_Factory::destroy_proxy_push_consumer_collection (TAO_EC_ProxyPush
}
TAO_EC_ProxyPushSupplier_Collection*
-TAO_EC_RTCORBA_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Channel *ec)
+TAO_EC_RTCORBA_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base *ec)
{
return this->body_->create_proxy_push_supplier_collection (ec);
}
@@ -250,7 +250,7 @@ TAO_EC_RTCORBA_Factory::destroy_supplier_lock (ACE_Lock* x)
}
TAO_EC_ConsumerControl*
-TAO_EC_RTCORBA_Factory::create_consumer_control (TAO_EC_Event_Channel* ec)
+TAO_EC_RTCORBA_Factory::create_consumer_control (TAO_EC_Event_Channel_Base* ec)
{
return this->body_->create_consumer_control (ec);
}
@@ -262,7 +262,7 @@ TAO_EC_RTCORBA_Factory::destroy_consumer_control (TAO_EC_ConsumerControl* x)
}
TAO_EC_SupplierControl*
-TAO_EC_RTCORBA_Factory::create_supplier_control (TAO_EC_Event_Channel* ec)
+TAO_EC_RTCORBA_Factory::create_supplier_control (TAO_EC_Event_Channel_Base* ec)
{
return this->body_->create_supplier_control (ec);
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.h b/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.h
index f45deda2129..07b0e22cc41 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_RTCORBA_Factory.h
@@ -47,51 +47,51 @@ public:
virtual int init (int argc, char* argv[]);
virtual int fini (void);
virtual TAO_EC_Dispatching*
- create_dispatching (TAO_EC_Event_Channel*);
+ create_dispatching (TAO_EC_Event_Channel_Base*);
virtual void
destroy_dispatching (TAO_EC_Dispatching*) ;
virtual TAO_EC_Filter_Builder*
- create_filter_builder (TAO_EC_Event_Channel*) ;
+ create_filter_builder (TAO_EC_Event_Channel_Base*) ;
virtual void
destroy_filter_builder (TAO_EC_Filter_Builder*);
virtual TAO_EC_Supplier_Filter_Builder*
- create_supplier_filter_builder (TAO_EC_Event_Channel*) ;
+ create_supplier_filter_builder (TAO_EC_Event_Channel_Base*) ;
virtual void
destroy_supplier_filter_builder (TAO_EC_Supplier_Filter_Builder*);
virtual TAO_EC_ConsumerAdmin*
- create_consumer_admin (TAO_EC_Event_Channel*) ;
+ create_consumer_admin (TAO_EC_Event_Channel_Base*) ;
virtual void
destroy_consumer_admin (TAO_EC_ConsumerAdmin*);
virtual TAO_EC_SupplierAdmin*
- create_supplier_admin (TAO_EC_Event_Channel*) ;
+ create_supplier_admin (TAO_EC_Event_Channel_Base*) ;
virtual void
destroy_supplier_admin (TAO_EC_SupplierAdmin*);
virtual TAO_EC_ProxyPushSupplier*
- create_proxy_push_supplier (TAO_EC_Event_Channel*);
+ create_proxy_push_supplier (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_supplier (TAO_EC_ProxyPushSupplier*);
virtual TAO_EC_ProxyPushConsumer*
- create_proxy_push_consumer (TAO_EC_Event_Channel*);
+ create_proxy_push_consumer (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer*);
virtual TAO_EC_Timeout_Generator*
- create_timeout_generator (TAO_EC_Event_Channel*) ;
+ create_timeout_generator (TAO_EC_Event_Channel_Base*) ;
virtual void
destroy_timeout_generator (TAO_EC_Timeout_Generator*);
virtual TAO_EC_ObserverStrategy*
- create_observer_strategy (TAO_EC_Event_Channel*);
+ create_observer_strategy (TAO_EC_Event_Channel_Base*);
virtual void
destroy_observer_strategy (TAO_EC_ObserverStrategy*);
virtual TAO_EC_Scheduling_Strategy*
- create_scheduling_strategy (TAO_EC_Event_Channel*);
+ create_scheduling_strategy (TAO_EC_Event_Channel_Base*);
virtual void
destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy*);
virtual TAO_EC_ProxyPushConsumer_Collection*
- create_proxy_push_consumer_collection (TAO_EC_Event_Channel*);
+ create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_consumer_collection (TAO_EC_ProxyPushConsumer_Collection*);
virtual TAO_EC_ProxyPushSupplier_Collection*
- create_proxy_push_supplier_collection (TAO_EC_Event_Channel*);
+ create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base*);
virtual void
destroy_proxy_push_supplier_collection (TAO_EC_ProxyPushSupplier_Collection*);
virtual ACE_Lock* create_consumer_lock (void);
@@ -99,11 +99,11 @@ public:
virtual ACE_Lock* create_supplier_lock (void);
virtual void destroy_supplier_lock (ACE_Lock*);
virtual TAO_EC_ConsumerControl*
- create_consumer_control (TAO_EC_Event_Channel*);
+ create_consumer_control (TAO_EC_Event_Channel_Base*);
virtual void
destroy_consumer_control (TAO_EC_ConsumerControl*);
virtual TAO_EC_SupplierControl*
- create_supplier_control (TAO_EC_Event_Channel*);
+ create_supplier_control (TAO_EC_Event_Channel_Base*);
virtual void
destroy_supplier_control (TAO_EC_SupplierControl*);
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp
index bbc653396e9..7a4cec34fc2 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp
@@ -1,7 +1,7 @@
// $Id$
#include "EC_Reactive_ConsumerControl.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_ConsumerAdmin.h"
#include "EC_ProxySupplier.h"
#include "EC_ProxyConsumer.h" // @@ MSVC 6 bug
@@ -20,7 +20,7 @@ ACE_RCSID(Event, EC_Reactive_ConsumerControl, "$Id$")
TAO_EC_Reactive_ConsumerControl::
TAO_EC_Reactive_ConsumerControl (const ACE_Time_Value &rate,
const ACE_Time_Value &timeout,
- TAO_EC_Event_Channel *ec,
+ TAO_EC_Event_Channel_Base *ec,
CORBA::ORB_ptr orb)
: rate_ (rate),
timeout_ (timeout),
@@ -41,8 +41,8 @@ TAO_EC_Reactive_ConsumerControl::query_consumers (
ACE_ENV_SINGLE_ARG_DECL)
{
TAO_EC_Ping_Consumer worker (this);
- this->event_channel_->consumer_admin ()->for_each (&worker
- ACE_ENV_ARG_PARAMETER);
+ this->event_channel_->for_each_consumer (&worker
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h
index 8ab5f0767df..84008e5454b 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h
@@ -26,7 +26,7 @@
#include "tao/corba.h"
#include "ace/Event_Handler.h"
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
class TAO_EC_Reactive_ConsumerControl;
@@ -69,7 +69,7 @@ public:
/// parameter.
TAO_EC_Reactive_ConsumerControl (const ACE_Time_Value &rate,
const ACE_Time_Value &timeout,
- TAO_EC_Event_Channel *event_channel,
+ TAO_EC_Event_Channel_Base *event_channel,
CORBA::ORB_ptr orb);
/// destructor...
@@ -104,7 +104,7 @@ private:
TAO_EC_ConsumerControl_Adapter adapter_;
/// The event channel
- TAO_EC_Event_Channel *event_channel_;
+ TAO_EC_Event_Channel_Base *event_channel_;
/// The ORB
CORBA::ORB_var orb_;
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.cpp
new file mode 100644
index 00000000000..f9b53960da2
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.cpp
@@ -0,0 +1,44 @@
+// $Id$
+
+#include "EC_Reactive_Dispatching.h"
+#include "EC_ProxySupplier.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "EC_Reactive_Dispatching.i"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(Event, EC_Reactive_Dispatching, "$Id$")
+
+TAO_EC_Reactive_Dispatching::TAO_EC_Reactive_Dispatching (void)
+{
+}
+
+void
+TAO_EC_Reactive_Dispatching::activate (void)
+{
+}
+
+void
+TAO_EC_Reactive_Dispatching::shutdown (void)
+{
+}
+
+void
+TAO_EC_Reactive_Dispatching::push (TAO_EC_ProxyPushSupplier* proxy,
+ RtecEventComm::PushConsumer_ptr consumer,
+ const RtecEventComm::EventSet& event,
+ TAO_EC_QOS_Info&
+ ACE_ENV_ARG_DECL)
+{
+ proxy->reactive_push_to_consumer (consumer, event ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_EC_Reactive_Dispatching::push_nocopy (TAO_EC_ProxyPushSupplier* proxy,
+ RtecEventComm::PushConsumer_ptr consumer,
+ RtecEventComm::EventSet& event,
+ TAO_EC_QOS_Info&
+ ACE_ENV_ARG_DECL)
+{
+ proxy->reactive_push_to_consumer (consumer, event ACE_ENV_ARG_PARAMETER);
+}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.h b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.h
new file mode 100644
index 00000000000..ae71fb499ec
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.h
@@ -0,0 +1,61 @@
+/* -*- C++ -*- */
+/**
+ * @file EC_Reactive_Dispatching.h
+ *
+ * $Id$
+ *
+ * @author Carlos O'Ryan (coryan@cs.wustl.edu)
+ *
+ * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and
+ * other members of the DOC group. More details can be found in:
+ *
+ * http://doc.ece.uci.edu/~coryan/EC/index.html
+ */
+
+#ifndef TAO_EC_REACTIVE_DISPATCHING_H
+#define TAO_EC_REACTIVE_DISPATCHING_H
+#include "ace/pre.h"
+
+#include "EC_Dispatching.h"
+#include "event_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+/**
+ * @class TAO_EC_Reactive_Dispatching
+ *
+ * @brief Dispatch using the caller thread.
+ *
+ * The events are dispatched in FIFO ordering, using the invoking
+ * thread to push the event to the consumer.
+ */
+class TAO_RTEvent_Export TAO_EC_Reactive_Dispatching : public TAO_EC_Dispatching
+{
+public:
+ /// The scheduler is used to find the range of priorities and similar
+ /// info.
+ TAO_EC_Reactive_Dispatching (void);
+
+ // = The EC_Dispatching methods.
+ virtual void activate (void);
+ virtual void shutdown (void);
+ virtual void push (TAO_EC_ProxyPushSupplier *proxy,
+ RtecEventComm::PushConsumer_ptr consumer,
+ const RtecEventComm::EventSet &event,
+ TAO_EC_QOS_Info &qos_info
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+ virtual void push_nocopy (TAO_EC_ProxyPushSupplier *proxy,
+ RtecEventComm::PushConsumer_ptr consumer,
+ RtecEventComm::EventSet &event,
+ TAO_EC_QOS_Info &qos_info
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+};
+
+#if defined (__ACE_INLINE__)
+#include "EC_Reactive_Dispatching.i"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_EC_REACTIVE_DISPATCHING_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.i b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.i
new file mode 100644
index 00000000000..cfa1da318d3
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Dispatching.i
@@ -0,0 +1 @@
+// $Id$
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp
index 0756fba3b3e..d7ff47bb870 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp
@@ -1,7 +1,7 @@
// $Id$
#include "EC_Reactive_SupplierControl.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_SupplierAdmin.h"
#include "EC_ProxyConsumer.h"
#include "EC_ProxySupplier.h" // @@ MSVC 6 bug
@@ -20,7 +20,7 @@ ACE_RCSID(Event, EC_Reactive_SupplierControl, "$Id$")
TAO_EC_Reactive_SupplierControl::
TAO_EC_Reactive_SupplierControl (const ACE_Time_Value &rate,
const ACE_Time_Value &timeout,
- TAO_EC_Event_Channel *ec,
+ TAO_EC_Event_Channel_Base *ec,
CORBA::ORB_ptr orb)
: rate_ (rate),
timeout_ (timeout),
@@ -41,8 +41,8 @@ TAO_EC_Reactive_SupplierControl::query_suppliers (
ACE_ENV_SINGLE_ARG_DECL)
{
TAO_EC_Ping_Supplier worker (this);
- this->event_channel_->supplier_admin ()->for_each (&worker
- ACE_ENV_ARG_PARAMETER);
+ this->event_channel_->for_each_supplier (&worker
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h
index a38b9adc291..109a5f916dc 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h
@@ -26,7 +26,7 @@
#include "tao/corba.h"
#include "ace/Event_Handler.h"
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
class TAO_EC_Reactive_SupplierControl;
@@ -69,7 +69,7 @@ public:
/// parameter.
TAO_EC_Reactive_SupplierControl (const ACE_Time_Value &rate,
const ACE_Time_Value &timeout,
- TAO_EC_Event_Channel *event_channel,
+ TAO_EC_Event_Channel_Base *event_channel,
CORBA::ORB_ptr orb);
/// destructor...
@@ -104,7 +104,7 @@ private:
TAO_EC_SupplierControl_Adapter adapter_;
/// The event channel
- TAO_EC_Event_Channel *event_channel_;
+ TAO_EC_Event_Channel_Base *event_channel_;
/// The ORB
CORBA::ORB_var orb_;
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp
index 4a98e9bf5d4..512c3f16646 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp
@@ -4,7 +4,7 @@
#include "EC_Priority_Dispatching.h"
#include "EC_Priority_Scheduling.h"
#include "EC_Sched_Filter_Builder.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "orbsvcs/RtecSchedulerC.h"
#include "ace/Arg_Shifter.h"
@@ -168,7 +168,7 @@ TAO_EC_Sched_Factory::fini (void)
// ****************************************************************
TAO_EC_Dispatching*
-TAO_EC_Sched_Factory::create_dispatching (TAO_EC_Event_Channel *ec)
+TAO_EC_Sched_Factory::create_dispatching (TAO_EC_Event_Channel_Base *ec)
{
if (this->dispatching_ == 2)
return new TAO_EC_Priority_Dispatching (ec);
@@ -176,7 +176,7 @@ TAO_EC_Sched_Factory::create_dispatching (TAO_EC_Event_Channel *ec)
}
TAO_EC_Filter_Builder*
-TAO_EC_Sched_Factory::create_filter_builder (TAO_EC_Event_Channel *ec)
+TAO_EC_Sched_Factory::create_filter_builder (TAO_EC_Event_Channel_Base *ec)
{
if (this->filtering_ == 3)
return new TAO_EC_Sched_Filter_Builder (ec);
@@ -186,7 +186,7 @@ TAO_EC_Sched_Factory::create_filter_builder (TAO_EC_Event_Channel *ec)
TAO_EC_Timeout_Generator*
-TAO_EC_Sched_Factory::create_timeout_generator (TAO_EC_Event_Channel *ec)
+TAO_EC_Sched_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *ec)
{
#if 0
if (this->timeout_ == 1)
@@ -197,7 +197,7 @@ TAO_EC_Sched_Factory::create_timeout_generator (TAO_EC_Event_Channel *ec)
}
TAO_EC_Scheduling_Strategy*
-TAO_EC_Sched_Factory::create_scheduling_strategy (TAO_EC_Event_Channel* ec)
+TAO_EC_Sched_Factory::create_scheduling_strategy (TAO_EC_Event_Channel_Base* ec)
{
if (this->scheduling_ == 2)
{
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.h b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.h
index 311b08694ad..354b57110aa 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.h
@@ -45,13 +45,13 @@ public:
// = The EC_Factory methods
virtual TAO_EC_Dispatching*
- create_dispatching (TAO_EC_Event_Channel*);
+ create_dispatching (TAO_EC_Event_Channel_Base*);
virtual TAO_EC_Filter_Builder*
- create_filter_builder (TAO_EC_Event_Channel*);
+ create_filter_builder (TAO_EC_Event_Channel_Base*);
virtual TAO_EC_Timeout_Generator*
- create_timeout_generator (TAO_EC_Event_Channel*);
+ create_timeout_generator (TAO_EC_Event_Channel_Base*);
virtual TAO_EC_Scheduling_Strategy*
- create_scheduling_strategy (TAO_EC_Event_Channel*);
+ create_scheduling_strategy (TAO_EC_Event_Channel_Base*);
private:
};
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp
index 593fdc01afd..9011189c522 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp
@@ -7,7 +7,7 @@
#include "EC_Conjunction_Filter.h"
#include "EC_Disjunction_Filter.h"
#include "EC_Timeout_Filter.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#if ! defined (__ACE_INLINE__)
#include "EC_Sched_Filter_Builder.i"
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.h b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.h
index 6a3f89b5922..ac3dffc9d08 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.h
@@ -25,7 +25,7 @@
#include "sched_event_export.h"
class TAO_EC_Filter;
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
/**
* @class TAO_EC_Sched_Filter_Builder
@@ -40,7 +40,7 @@ class TAO_RTSchedEvent_Export TAO_EC_Sched_Filter_Builder : public TAO_EC_Filter
{
public:
/// constructor.
- TAO_EC_Sched_Filter_Builder (TAO_EC_Event_Channel* ec);
+ TAO_EC_Sched_Filter_Builder (TAO_EC_Event_Channel_Base* ec);
/// destructor...
virtual ~TAO_EC_Sched_Filter_Builder (void);
@@ -73,7 +73,7 @@ private:
private:
/// The event channel.
- TAO_EC_Event_Channel* event_channel_;
+ TAO_EC_Event_Channel_Base* event_channel_;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.i b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.i
index a6c08b50552..06ca9c32485 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.i
@@ -2,7 +2,7 @@
ACE_INLINE
TAO_EC_Sched_Filter_Builder::
- TAO_EC_Sched_Filter_Builder (TAO_EC_Event_Channel *ec)
+ TAO_EC_Sched_Filter_Builder (TAO_EC_Event_Channel_Base *ec)
: event_channel_ (ec)
{
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp
index f01244e6b09..39d04fec297 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp
@@ -3,7 +3,7 @@
#include "EC_SupplierAdmin.h"
#include "EC_ProxyConsumer.h"
#include "EC_ProxySupplier.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "orbsvcs/ESF/ESF_Peer_Workers.h"
#include "orbsvcs/ESF/ESF_Peer_Admin.h"
#include "orbsvcs/ESF/ESF_Shutdown_Proxy.h"
@@ -14,8 +14,8 @@
ACE_RCSID(Event, EC_SupplierAdmin, "$Id$")
-TAO_EC_SupplierAdmin::TAO_EC_SupplierAdmin (TAO_EC_Event_Channel *ec)
- : TAO_ESF_Peer_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer,TAO_EC_ProxyPushSupplier> (ec)
+TAO_EC_SupplierAdmin::TAO_EC_SupplierAdmin (TAO_EC_Event_Channel_Base *ec)
+ : TAO_ESF_Peer_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer,TAO_EC_ProxyPushSupplier> (ec)
{
this->default_POA_ =
this->event_channel_->supplier_poa ();
@@ -40,22 +40,24 @@ TAO_EC_SupplierAdmin::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class TAO_ESF_Peer_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer,TAO_EC_ProxyPushSupplier>;
-template class TAO_ESF_Proxy_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer>;
+template class TAO_ESF_Peer_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer,TAO_EC_ProxyPushSupplier>;
+template class TAO_ESF_Proxy_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer>;
template class TAO_ESF_Worker<TAO_EC_ProxyPushConsumer>;
template class TAO_ESF_Shutdown_Proxy<TAO_EC_ProxyPushConsumer>;
template class TAO_ESF_Peer_Connected<TAO_EC_ProxyPushConsumer,TAO_EC_ProxyPushSupplier>;
template class TAO_ESF_Peer_Reconnected<TAO_EC_ProxyPushConsumer,TAO_EC_ProxyPushSupplier>;
template class TAO_ESF_Peer_Disconnected<TAO_EC_ProxyPushConsumer,TAO_EC_ProxyPushSupplier>;
+template class TAO_ESF_RefCountedRef<TAO_EC_ProxyPushConsumer>;
#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate TAO_ESF_Peer_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer,TAO_EC_ProxyPushSupplier>
-#pragma instantiate TAO_ESF_Proxy_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer>
+#pragma instantiate TAO_ESF_Peer_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer,TAO_EC_ProxyPushSupplier>
+#pragma instantiate TAO_ESF_Proxy_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer>
#pragma instantiate TAO_ESF_Worker<TAO_EC_ProxyPushConsumer>
#pragma instantiate TAO_ESF_Shutdown_Proxy<TAO_EC_ProxyPushConsumer>
#pragma instantiate TAO_ESF_Peer_Connected<TAO_EC_ProxyPushConsumer,TAO_EC_ProxyPushSupplier>
#pragma instantiate TAO_ESF_Peer_Reconnected<TAO_EC_ProxyPushConsumer,TAO_EC_ProxyPushSupplier>
#pragma instantiate TAO_ESF_Peer_Disconnected<TAO_EC_ProxyPushConsumer,TAO_EC_ProxyPushSupplier>
+#pragma instantiate TAO_ESF_RefCountedRef<TAO_EC_ProxyPushConsumer>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.h b/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.h
index a2258add619..527e3b0b2f8 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.h
@@ -25,7 +25,7 @@
#include "orbsvcs/ESF/ESF_Peer_Admin.h"
#include "event_export.h"
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
class TAO_EC_ProxyPushSupplier;
/**
@@ -35,15 +35,15 @@ class TAO_EC_ProxyPushSupplier;
*
*
* <H2>Memory Management</H2>
- * It does not assume ownership of the TAO_EC_Event_Channel object
+ * It does not assume ownership of the TAO_EC_Event_Channel_Base object
*/
class TAO_RTEvent_Export TAO_EC_SupplierAdmin
: public POA_RtecEventChannelAdmin::SupplierAdmin
- , public TAO_ESF_Peer_Admin<TAO_EC_Event_Channel,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer,TAO_EC_ProxyPushSupplier>
+ , public TAO_ESF_Peer_Admin<TAO_EC_Event_Channel_Base,TAO_EC_ProxyPushConsumer,RtecEventChannelAdmin::ProxyPushConsumer,TAO_EC_ProxyPushSupplier>
{
public:
/// constructor...
- TAO_EC_SupplierAdmin (TAO_EC_Event_Channel* event_channel);
+ TAO_EC_SupplierAdmin (TAO_EC_Event_Channel_Base* event_channel);
/// destructor...
virtual ~TAO_EC_SupplierAdmin (void);
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_SupplierControl.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_SupplierControl.cpp
index 5e93d9f680b..4bbbf0f2d82 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_SupplierControl.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_SupplierControl.cpp
@@ -34,6 +34,13 @@ TAO_EC_SupplierControl::supplier_not_exist (TAO_EC_ProxyPushConsumer *
{
}
+void
+TAO_EC_SupplierControl::system_exception (TAO_EC_ProxyPushConsumer *,
+ CORBA::SystemException &
+ ACE_ENV_ARG_DECL_NOT_USED)
+{
+}
+
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_SupplierControl.h b/TAO/orbsvcs/orbsvcs/Event/EC_SupplierControl.h
index 67ee778ea2f..b88d43c23f6 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_SupplierControl.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_SupplierControl.h
@@ -24,7 +24,6 @@
#include "tao/corba.h"
-class TAO_EC_Event_Channel;
class TAO_EC_ProxyPushConsumer;
/**
@@ -57,6 +56,12 @@ public:
*/
virtual void supplier_not_exist (TAO_EC_ProxyPushConsumer *proxy
ACE_ENV_ARG_DECL_NOT_USED);
+
+ /// Some system exception was raised while trying to contact the
+ /// supplier
+ virtual void system_exception (TAO_EC_ProxyPushConsumer * proxy,
+ CORBA::SystemException &
+ ACE_ENV_ARG_DECL_NOT_USED);
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h
index 0454161f24d..7acb600d206 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h
@@ -26,7 +26,6 @@
class TAO_EC_ProxyPushSupplier;
class TAO_EC_ProxyPushConsumer;
-class TAO_EC_Event_Channel;
class TAO_EC_QOS_Info;
/**
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.cpp
index 1a356171387..faf3f9e13c5 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.cpp
@@ -2,7 +2,7 @@
#include "EC_Timeout_Filter.h"
#include "EC_Timeout_Generator.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_ProxySupplier.h"
#include "orbsvcs/Time_Utilities.h"
#include "orbsvcs/Event_Service_Constants.h"
@@ -14,7 +14,7 @@
ACE_RCSID(Event, EC_Timeout_Filter, "$Id$")
TAO_EC_Timeout_Filter::TAO_EC_Timeout_Filter (
- TAO_EC_Event_Channel *event_channel,
+ TAO_EC_Event_Channel_Base *event_channel,
TAO_EC_ProxyPushSupplier *supplier,
const TAO_EC_QOS_Info& qos_info,
RtecEventComm::EventType type,
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.h
index 9240db0d29b..9f1da49019c 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.h
@@ -24,7 +24,7 @@
#include "EC_QOS_Info.h"
-class TAO_EC_Event_Channel;
+class TAO_EC_Event_Channel_Base;
class TAO_EC_ProxyPushSupplier;
/**
@@ -39,7 +39,7 @@ class TAO_RTEvent_Export TAO_EC_Timeout_Filter : public TAO_EC_Filter
{
public:
/// Constructor.
- TAO_EC_Timeout_Filter (TAO_EC_Event_Channel *event_channel,
+ TAO_EC_Timeout_Filter (TAO_EC_Event_Channel_Base *event_channel,
TAO_EC_ProxyPushSupplier *supplier,
const TAO_EC_QOS_Info& qos_info,
RtecEventComm::EventType type,
@@ -88,7 +88,7 @@ private:
private:
/// The event channel.
- TAO_EC_Event_Channel* event_channel_;
+ TAO_EC_Event_Channel_Base* event_channel_;
/// The supplier that finally receives the timeout event.
TAO_EC_ProxyPushSupplier *supplier_;
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp
index 5e8f5a789bb..321f87bb6ef 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp
@@ -1,7 +1,7 @@
// $Id$
#include "EC_Trivial_Supplier_Filter.h"
-#include "EC_Event_Channel.h"
+#include "EC_Event_Channel_Base.h"
#include "EC_ConsumerAdmin.h"
#include "EC_ProxySupplier.h"
#include "EC_QOS_Info.h"
@@ -17,7 +17,7 @@ ACE_RCSID(Event, EC_Trivial_Supplier_Filter, "$Id$")
// ****************************************************************
TAO_EC_Trivial_Supplier_Filter::
- TAO_EC_Trivial_Supplier_Filter (TAO_EC_Event_Channel* ec)
+ TAO_EC_Trivial_Supplier_Filter (TAO_EC_Event_Channel_Base* ec)
: event_channel_ (ec)
{
}
@@ -74,8 +74,8 @@ TAO_EC_Trivial_Supplier_Filter::push_scheduled_event (RtecEventComm::EventSet &e
ACE_ENV_ARG_DECL)
{
TAO_EC_Filter_Worker worker (event, event_info);
- this->event_channel_->consumer_admin ()->for_each (&worker
- ACE_ENV_ARG_PARAMETER);
+ this->event_channel_->for_each_consumer (&worker
+ ACE_ENV_ARG_PARAMETER);
}
CORBA::ULong
@@ -93,7 +93,7 @@ TAO_EC_Trivial_Supplier_Filter::_decr_refcnt (void)
// ****************************************************************
TAO_EC_Trivial_Supplier_Filter_Builder::
- TAO_EC_Trivial_Supplier_Filter_Builder (TAO_EC_Event_Channel *ec)
+ TAO_EC_Trivial_Supplier_Filter_Builder (TAO_EC_Event_Channel_Base *ec)
: filter_ (ec)
{
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h
index e0534b2f37a..4fe214bcf65 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h
@@ -24,6 +24,7 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+class TAO_EC_Event_Channel_Base;
class TAO_EC_ProxyPushSupplier_Set;
// ****************************************************************
@@ -42,7 +43,7 @@ class TAO_RTEvent_Export TAO_EC_Trivial_Supplier_Filter : public TAO_EC_Supplier
{
public:
/// Constructor
- TAO_EC_Trivial_Supplier_Filter (TAO_EC_Event_Channel* ec);
+ TAO_EC_Trivial_Supplier_Filter (TAO_EC_Event_Channel_Base* ec);
// = The TAO_EC_Supplier_Filter methods.
virtual void bind (TAO_EC_ProxyPushConsumer* consumer);
@@ -65,7 +66,7 @@ public:
private:
/// The event channel, used to locate the set of consumers.
- TAO_EC_Event_Channel *event_channel_;
+ TAO_EC_Event_Channel_Base *event_channel_;
};
// ****************************************************************
@@ -83,7 +84,7 @@ class TAO_RTEvent_Export TAO_EC_Trivial_Supplier_Filter_Builder : public TAO_EC_
{
public:
/// constructor....
- TAO_EC_Trivial_Supplier_Filter_Builder (TAO_EC_Event_Channel* ec);
+ TAO_EC_Trivial_Supplier_Filter_Builder (TAO_EC_Event_Channel_Base* ec);
// = The TAO_EC_Supplier_Filter_Builder methods...
virtual TAO_EC_Supplier_Filter*
diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h
index f1b791d78a5..b754319c2c2 100644
--- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h
+++ b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h
@@ -28,7 +28,6 @@
#define ACE_EVENT_CHANNEL_H
#include "ace/pre.h"
-#include "ace/Containers.h"
#include "ace/Unbounded_Set_Ex.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
diff --git a/TAO/orbsvcs/orbsvcs/Event/Makefile.am b/TAO/orbsvcs/orbsvcs/Event/Makefile.am
index 457d9ae3524..1b362fdb7e9 100644
--- a/TAO/orbsvcs/orbsvcs/Event/Makefile.am
+++ b/TAO/orbsvcs/orbsvcs/Event/Makefile.am
@@ -31,20 +31,25 @@ libTAO_Event_la_SOURCES = \
EC_ConsumerAdmin.cpp \
EC_Disjunction_Filter.cpp \
EC_Dispatching.cpp \
+ EC_Reactive_Dispatching.cpp \
EC_Event_Channel.cpp \
+ EC_Event_Channel_Base.cpp \
EC_Factory.cpp \
EC_Filter.cpp \
EC_Filter_Builder.cpp \
EC_Gateway.cpp \
EC_Gateway_UDP.cpp \
+ EC_UDP_Out_Endpoint.cpp \
ECG_Mcast_EH.cpp \
EC_Null_Factory.cpp \
EC_ObserverStrategy.cpp \
EC_Per_Supplier_Filter.cpp \
EC_ProxyConsumer.cpp \
+ EC_Default_ProxyConsumer.cpp \
EC_ProxyPushSupplier_Set.cpp \
EC_ProxyPushSupplier_Set_T.cpp \
EC_ProxySupplier.cpp \
+ EC_Default_ProxySupplier.cpp \
EC_QOS_Info.cpp \
EC_Reactive_Timeout_Generator.cpp \
EC_SupplierAdmin.cpp \
@@ -85,7 +90,9 @@ noinst_HEADERS = \
EC_Dispatching.h \
EC_Dispatching.i \
EC_Event_Channel.h \
+ EC_Event_Channel_Base.h \
EC_Event_Channel.i \
+ EC_Event_Channel_Base.i \
EC_Factory.h \
EC_Factory.i \
EC_Filter.h \
@@ -95,6 +102,8 @@ noinst_HEADERS = \
EC_Gateway.h \
EC_Gateway_UDP.h \
EC_Gateway_UDP.i \
+ EC_UDP_Out_Endpoint.h \
+ EC_UDP_Out_Endpoint.i \
EC_Null_Factory.h \
EC_Null_Factory.i \
EC_ObserverStrategy.h \
@@ -103,12 +112,16 @@ noinst_HEADERS = \
EC_Per_Supplier_Filter.i \
EC_ProxyConsumer.h \
EC_ProxyConsumer.i \
+ EC_Default_ProxyConsumer.h \
+ EC_Default_ProxyConsumer.i \
EC_ProxyPushSupplier_Set.h \
EC_ProxyPushSupplier_Set.i \
EC_ProxyPushSupplier_Set_T.h \
EC_ProxyPushSupplier_Set_T.i \
EC_ProxySupplier.h \
EC_ProxySupplier.i \
+ EC_Default_ProxySupplier.h \
+ EC_Default_ProxySupplier.i \
EC_QOS_Info.h \
EC_QOS_Info.i \
EC_Reactive_Timeout_Generator.h \
diff --git a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h
index 0a7fe54e1bb..79685d1f40e 100644
--- a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h
+++ b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h
@@ -22,7 +22,6 @@
#include "Event_Channel.h"
#include "Dispatching_Modules.h"
-#include "ace/Malloc.h"
// ************************************************************
diff --git a/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h b/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h
index 7de5e637afa..ae4cc0046bd 100644
--- a/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h
+++ b/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h
@@ -18,20 +18,19 @@
class ACE_Command_Base;
+/**
+ * @class TAO_EC_Timer_Module
+ *
+ * @brief The timer managment module.
+ *
+ * The Event Channel can use several strategies to dispatch timers,
+ * for instance, it can use the ORB reactor or a pool of reactors running at
+ * different priorities or a pool of Thread_Timer_Queue_Adapters running at
+ * different priorities also. This class is the abstract base class to
+ * abstract this strategies.
+ */
class TAO_RTOLDEvent_Export TAO_EC_Timer_Module
{
- // = TITLE
- // The timer managment module.
- //
- // = DESCRIPTION
- // The Event Channel can use several strategies to dispatch
- // timers, for instance, it can use the ORB reactor or a pool of
- // reactors running at different priorities or a pool of
- // Thread_Timer_Queue_Adapters running at different priorities
- // also.
- // This class is the abstract base class to abstract this
- // strategies.
- //
public:
virtual ~TAO_EC_Timer_Module (void);
// The dtor
diff --git a/TAO/orbsvcs/orbsvcs/Event_Utilities.h b/TAO/orbsvcs/orbsvcs/Event_Utilities.h
index 94d6dcd1a4f..3379ec51beb 100644
--- a/TAO/orbsvcs/orbsvcs/Event_Utilities.h
+++ b/TAO/orbsvcs/orbsvcs/Event_Utilities.h
@@ -1,18 +1,15 @@
/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace ORB
-//
-// = FILENAME
-// Event_Utilities
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Event_Utilities
+ *
+ * $Id$
+ *
+ * @author Tim Harrison (harrison@cs.wustl.edu)
+ */
+//=============================================================================
+
#ifndef ACE_EVENT_UTILITIES_H
#define ACE_EVENT_UTILITIES_H
@@ -24,137 +21,118 @@
typedef void (*TAO_EC_Event_Initializer) (RtecEventComm::Event&);
+/**
+ * @class ACE_ConsumerQOS_Factory
+ *
+ * @brief Consumer QOS Factory.
+ *
+ * This class allows easy (free from CORBA IDL constraints)
+ * construction of RtecEventChannelAdmin::ConsumerQOS structures.
+ * = CORRELATIONS
+ * ACE_ConsumerQOS_Factory separates subscriptions into conjunction
+ * and disjunction groups. A group can be thought of as a set of
+ * events inside parenthesis: (A+B+C), where A,B, and C are
+ * events.
+ * The following code would be used to represent (A+B) | (B+C):
+ * ACE_ConsumerQOS_Factor factory;
+ * factory.start_conjunction_group ();
+ * factory.insert (A);
+ * factory.insert (B);
+ * factory.start_conjunction_group ();
+ * factory.insert (B);
+ * factory.insert (C);
+ * The following code would be used to represent (A|B) | (B|C):
+ * ACE_ConsumerQOS_Factor factory;
+ * factory.start_disjunction_group ();
+ * factory.insert (A);
+ * factory.insert (B);
+ * factory.start_disjunction_group ();
+ * factory.insert (B);
+ * factory.insert (C);
+ * First, this may not seem to be initially useful, as (A|B) |
+ * (B|C) seems the same as A|B|C. However, this form does have a
+ * significant use when deadline timers are specified (described
+ * below). Note that groups end with the next call to
+ * start_XX_group. Groups are always OR'd together. That is,
+ * there is no way to directly build (A|B|C) + (D|E|F). You can
+ * always expand the previous statement to the OR of multiple ANDs.
+ * = TIMEOUTS
+ * There are two types of timeout types defined in
+ * Event_Service_Constants.h.
+ * ACE_ES_EVENT_INTERVAL_TIMEOUT - the consumer wants to receive a
+ * timeout every N seconds.
+ * ACE_ES_EVENT_DEADLINE_TIMEOUT - the consumer wants the timeout
+ * if and only if some dependencies are not resolved first.
+ * Using these timeouts with the correlations discussed above, we
+ * can construct four different timer semantics: Interval Timer,
+ * Deadline Timer, Interval Correlation, Deadline Correlation:
+ * Interval Timer:
+ * (A+B+C) | (D+E+F) | (G+H+I) | IntervalTimeout
+ * This registers to receive an interval timeout regardless of
+ * other dependencies. Event if events occur, the interval
+ * timeout will still be sent.
+ * Deadline Timer:
+ * (A+B+C) | (D+E+F) | (G+H+I) | DeadlineTimeout
+ * This registers to receive the deadline timeout ONLY if no
+ * other events occur. If a single event is sent to the
+ * consumer, the timer is cancelled and rescheduled.
+ * Deadline Correlation:
+ * (A+B+C) | (D+E+F) | (G+H+DeadlineTimeout)
+ * If G and H do not occur within DeadlineTimeout time, a
+ * deadline timeout is sent. It is cancelled and rescheduled if G
+ * and H occur.
+ * Interval Correlation:
+ * (A+B+C) | (D+E+F) | (G+H+IntervalTimeout)
+ * G+H+IntervalTimeout are sent ONLY after all have occurred. If
+ * G+H occur, they are queued until IntervalTimeout occurs. If
+ * IntervalTimeout occurs, it is queued until G+H occur.
+ */
class TAO_RTEvent_Export ACE_ConsumerQOS_Factory
{
- // = TITLE
- // Consumer QOS Factory.
- //
- // = DESCRIPTION
- //
- // This class allows easy (free from CORBA IDL constraints)
- // construction of RtecEventChannelAdmin::ConsumerQOS structures.
- //
- // = CORRELATIONS
- //
- // ACE_ConsumerQOS_Factory separates subscriptions into conjunction
- // and disjunction groups. A group can be thought of as a set of
- // events inside parenthesis: (A+B+C), where A,B, and C are
- // events.
- //
- // The following code would be used to represent (A+B) | (B+C):
- //
- // ACE_ConsumerQOS_Factor factory;
- // factory.start_conjunction_group ();
- // factory.insert (A);
- // factory.insert (B);
- // factory.start_conjunction_group ();
- // factory.insert (B);
- // factory.insert (C);
- //
- // The following code would be used to represent (A|B) | (B|C):
- //
- // ACE_ConsumerQOS_Factor factory;
- // factory.start_disjunction_group ();
- // factory.insert (A);
- // factory.insert (B);
- // factory.start_disjunction_group ();
- // factory.insert (B);
- // factory.insert (C);
- //
- // First, this may not seem to be initially useful, as (A|B) |
- // (B|C) seems the same as A|B|C. However, this form does have a
- // significant use when deadline timers are specified (described
- // below). Note that groups end with the next call to
- // start_XX_group. Groups are always OR'd together. That is,
- // there is no way to directly build (A|B|C) + (D|E|F). You can
- // always expand the previous statement to the OR of multiple ANDs.
- //
- // = TIMEOUTS
- //
- // There are two types of timeout types defined in
- // Event_Service_Constants.h.
- //
- // ACE_ES_EVENT_INTERVAL_TIMEOUT - the consumer wants to receive a
- // timeout every N seconds.
- //
- // ACE_ES_EVENT_DEADLINE_TIMEOUT - the consumer wants the timeout
- // if and only if some dependencies are not resolved first.
- //
- // Using these timeouts with the correlations discussed above, we
- // can construct four different timer semantics: Interval Timer,
- // Deadline Timer, Interval Correlation, Deadline Correlation:
- //
- // Interval Timer:
- //
- // (A+B+C) | (D+E+F) | (G+H+I) | IntervalTimeout
- //
- // This registers to receive an interval timeout regardless of
- // other dependencies. Event if events occur, the interval
- // timeout will still be sent.
- //
- // Deadline Timer:
- //
- // (A+B+C) | (D+E+F) | (G+H+I) | DeadlineTimeout
- //
- // This registers to receive the deadline timeout ONLY if no
- // other events occur. If a single event is sent to the
- // consumer, the timer is cancelled and rescheduled.
- //
- // Deadline Correlation:
- //
- // (A+B+C) | (D+E+F) | (G+H+DeadlineTimeout)
- //
- // If G and H do not occur within DeadlineTimeout time, a
- // deadline timeout is sent. It is cancelled and rescheduled if G
- // and H occur.
- //
- // Interval Correlation:
- //
- // (A+B+C) | (D+E+F) | (G+H+IntervalTimeout)
- //
- // G+H+IntervalTimeout are sent ONLY after all have occurred. If
- // G+H occur, they are queued until IntervalTimeout occurs. If
- // IntervalTimeout occurs, it is queued until G+H occur.
public:
+ /// Default construction.
ACE_ConsumerQOS_Factory (TAO_EC_Event_Initializer initializer = 0);
- // Default construction.
+ /// Death and destruction.
~ACE_ConsumerQOS_Factory (void);
- // Death and destruction.
+ /**
+ * The Event Channel waits until all the children have accepted at
+ * least one event, and then send them all as a single event to the
+ * consumer.
+ */
int start_conjunction_group (int nchildren = 0);
- // The Event Channel waits until all the children have accepted at
- // least one event, and then send them all as a single event to the
- // consumer.
+ /// The consumer accepts any event that is accepted by at least one
+ /// child.
int start_disjunction_group (int nchildren = 0);
- // The consumer accepts any event that is accepted by at least one
- // child.
+ /// The consumer only accepts events that pass all the filter
+ /// expressions defined by the children.
int start_logical_and_group (int nchildren = 0);
- // The consumer only accepts events that pass all the filter
- // expressions defined by the children.
+ /// The consumer wants all the events *except* the group that
+ /// follows.
int start_negation (void);
- // The consumer wants all the events *except* the group that
- // follows.
+ /// Insert a bitmask filter, this acts as a quick rejection mechanism
+ /// for the subsequent filters.
int start_bitmask (CORBA::ULong source_mask,
CORBA::ULong type_mask);
- // Insert a bitmask filter, this acts as a quick rejection mechanism
- // for the subsequent filters.
+ /**
+ * Inser a new filter that only accepts events with the following
+ * properties:
+ * (event.header.type & type_mask) == type_value
+ * (event.header.source & source_mask) == source_value
+ */
int insert_bitmasked_value (CORBA::ULong source_mask,
CORBA::ULong type_mask,
CORBA::ULong source_value,
CORBA::ULong type_value);
- // Inser a new filter that only accepts events with the following
- // properties:
- // (event.header.type & type_mask) == type_value
- // (event.header.source & source_mask) == source_value
+ /// Insert a node that accepts any event, useful for bitmask filters.
int insert_null_terminator (void);
- // Insert a node that accepts any event, useful for bitmask filters.
// = Insert operations add to the current conjunction or disjunction
// group. These return 0 on success, -1 on failure. Before insert
@@ -162,59 +140,63 @@ public:
// start_XX_group method is not called, start_conjunction_group is
// assumed.
+ /// Insert the <subscribe> structure describing the event and
+ /// receiving method into the current group.
int insert (const RtecEventChannelAdmin::Dependency &subscribe);
- // Insert the <subscribe> structure describing the event and
- // receiving method into the current group.
+ /**
+ * Insert source/type dependency. <source> of the event (may be
+ * zero), <type> of the event. <rt_info> describes the method that
+ * will handle the <source>/<type> events.
+ */
int insert (RtecEventComm::EventSourceID source,
RtecEventComm::EventType type,
RtecBase::handle_t rt_info);
- // Insert source/type dependency. <source> of the event (may be
- // zero), <type> of the event. <rt_info> describes the method that
- // will handle the <source>/<type> events.
+ /// Insert type-only dependency.
int insert_type (RtecEventComm::EventType type,
RtecBase::handle_t rt_info);
- // Insert type-only dependency.
+ /// Insert source-only dependency.
int insert_source (RtecEventComm::EventSourceID source,
RtecBase::handle_t rt_info);
- // Insert source-only dependency.
+ /// Register temporal dependency. <type> designates interval or
+ /// deadline timeout that will occur every <interval>.
int insert_time (RtecEventComm::EventType type,
RtecEventComm::Time interval,
RtecBase::handle_t rt_info);
- // Register temporal dependency. <type> designates interval or
- // deadline timeout that will occur every <interval>.
+ /// This will be inserted as type ACE_ES_EVENT_ACT.
int insert_act (RtecEventComm::EventData act);
- // This will be inserted as type ACE_ES_EVENT_ACT.
// = Conversion operators. The Event Channel takes ConsumerQOS
// objects.
+ /// Allows conversions to ConsumerQOS, which is expected by the
+ /// PushSupplierProxy::connect_push_consumer interface.
const RtecEventChannelAdmin::ConsumerQOS &get_ConsumerQOS (void);
- // Allows conversions to ConsumerQOS, which is expected by the
- // PushSupplierProxy::connect_push_consumer interface.
+ /// Calls this->get_ConsumerQOS.
operator const RtecEventChannelAdmin::ConsumerQOS &(void);
- // Calls this->get_ConsumerQOS.
static void debug (const RtecEventChannelAdmin::ConsumerQOS& qos);
private:
+ /// The representation to be sent to the channel.
RtecEventChannelAdmin::ConsumerQOS qos_;
- // The representation to be sent to the channel.
+ /// Whether a start_XX_group has been called yet. This is to make
+ /// sure that a designator is placed in the subscription list first.
int designator_set_;
- // Whether a start_XX_group has been called yet. This is to make
- // sure that a designator is placed in the subscription list first.
+ /**
+ * If not zero this is a user-provided function used to initialize
+ * the events. When the event contains unions this is required to
+ * avoid marshaling and demarshaling of default initialized unions
+ * that (AFAIK) is not CORBA compliant.
+ */
TAO_EC_Event_Initializer event_initializer_;
- // If not zero this is a user-provided function used to initialize
- // the events. When the event contains unions this is required to
- // avoid marshaling and demarshaling of default initialized unions
- // that (AFAIK) is not CORBA compliant.
};
// ************************************************************
@@ -222,37 +204,40 @@ private:
class TAO_RTEvent_Export ACE_SupplierQOS_Factory
{
public:
- // ACE_SupplierQOS_Factory (TAO_EC_Event_Initializer initializer = 0);
+ /// Default construction.
ACE_SupplierQOS_Factory (TAO_EC_Event_Initializer initializer = 0,
int qos_max_len = 0);
- // Default construction.
+ /**
+ * Publish <sid> and <type> that is generate by a method described by
+ * <rtinfo>. The method generates <type> <ncalls> number of times
+ * per "iteration."
+ */
int insert (RtecEventComm::EventSourceID sid,
RtecEventComm::EventType type,
RtecBase::handle_t rtinfo,
u_int ncalls);
- // Publish <sid> and <type> that is generate by a method described by
- // <rtinfo>. The method generates <type> <ncalls> number of times
- // per "iteration."
+ /// Allows conversions to SupplierQOS, which is expected by the
+ /// PushSupplierProxy::connect_push_supplier interface.
const RtecEventChannelAdmin::SupplierQOS &get_SupplierQOS (void);
- // Allows conversions to SupplierQOS, which is expected by the
- // PushSupplierProxy::connect_push_supplier interface.
+ /// Calls this->get_SupplierQOS.
operator const RtecEventChannelAdmin::SupplierQOS &(void);
- // Calls this->get_SupplierQOS.
static void debug (const RtecEventChannelAdmin::SupplierQOS& qos);
private:
+ /// Representation needed by channel.
RtecEventChannelAdmin::SupplierQOS qos_;
- // Representation needed by channel.
+ /**
+ * If not zero this is a user-provided function used to initialize
+ * the events. When the event contains unions this is required to
+ * avoid marshaling and demarshaling of default initialized unions
+ * that (AFAIK) is not CORBA compliant.
+ */
TAO_EC_Event_Initializer event_initializer_;
- // If not zero this is a user-provided function used to initialize
- // the events. When the event contains unions this is required to
- // avoid marshaling and demarshaling of default initialized unions
- // that (AFAIK) is not CORBA compliant.
};
diff --git a/TAO/orbsvcs/orbsvcs/Makefile.RTEvent b/TAO/orbsvcs/orbsvcs/Makefile.RTEvent
index 8470271974b..eaf401a971d 100644
--- a/TAO/orbsvcs/orbsvcs/Makefile.RTEvent
+++ b/TAO/orbsvcs/orbsvcs/Makefile.RTEvent
@@ -40,17 +40,21 @@ IDL_FILES += \
RtecUDPAdmin
CPP_SRCS += \
+ Event/EC_Event_Channel_Base \
Event/EC_Event_Channel \
Event/EC_ConsumerAdmin \
Event/EC_SupplierAdmin \
Event/EC_ProxyConsumer \
Event/EC_ProxySupplier \
+ Event/EC_Default_ProxyConsumer \
+ Event/EC_Default_ProxySupplier \
Event/EC_Supplier_Filter \
Event/EC_Supplier_Filter_Builder \
Event/EC_Trivial_Supplier_Filter \
Event/EC_Filter \
Event/EC_Filter_Builder \
Event/EC_Dispatching \
+ Event/EC_Reactive_Dispatching \
Event/EC_Factory \
Event/EC_QOS_Info \
Event/EC_Null_Factory \
@@ -83,6 +87,7 @@ CPP_SRCS += \
CPP_SRCS += \
Event_Utilities \
Event/EC_Gateway \
+ Event/ECG_UDP_Out_Endpoint \
Event/EC_Gateway_UDP \
Event/ECG_Mcast_EH \
Event/ECG_UDP_Sender \
diff --git a/TAO/orbsvcs/orbsvcs/RTEvent.bor b/TAO/orbsvcs/orbsvcs/RTEvent.bor
index 0ffa1d25de4..e34365c2533 100644
--- a/TAO/orbsvcs/orbsvcs/RTEvent.bor
+++ b/TAO/orbsvcs/orbsvcs/RTEvent.bor
@@ -27,7 +27,9 @@ OBJFILES = \
$(OBJDIR)\EC_Default_Factory.obj \
$(OBJDIR)\EC_Disjunction_Filter.obj \
$(OBJDIR)\EC_Dispatching.obj \
+ $(OBJDIR)\EC_Reactive_Dispatching.obj \
$(OBJDIR)\EC_Dispatching_Task.obj \
+ $(OBJDIR)\EC_Event_Channel_Base.obj \
$(OBJDIR)\EC_Event_Channel.obj \
$(OBJDIR)\EC_Factory.obj \
$(OBJDIR)\EC_Filter.obj \
@@ -35,6 +37,7 @@ OBJFILES = \
$(OBJDIR)\EC_Group_Scheduling.obj \
$(OBJDIR)\EC_Gateway.obj \
$(OBJDIR)\EC_Gateway_UDP.obj \
+ $(OBJDIR)\ECG_UDP_Out_Endpoint.obj \
$(OBJDIR)\ECG_Mcast_EH.obj \
$(OBJDIR)\ECG_UDP_Sender.obj \
$(OBJDIR)\EC_Masked_Type_Filter.obj \
@@ -45,6 +48,8 @@ OBJFILES = \
$(OBJDIR)\EC_ObserverStrategy.obj \
$(OBJDIR)\EC_Per_Supplier_Filter.obj \
$(OBJDIR)\EC_Prefix_Filter_Builder.obj \
+ $(OBJDIR)\EC_Default_ProxyConsumer.obj \
+ $(OBJDIR)\EC_Default_ProxySupplier.obj \
$(OBJDIR)\EC_ProxyConsumer.obj \
$(OBJDIR)\EC_ProxySupplier.obj \
$(OBJDIR)\EC_QOS_Info.obj \
diff --git a/TAO/orbsvcs/orbsvcs/RTEvent.dsp b/TAO/orbsvcs/orbsvcs/RTEvent.dsp
index 37af62ca41d..4d4a9d498d0 100644
--- a/TAO/orbsvcs/orbsvcs/RTEvent.dsp
+++ b/TAO/orbsvcs/orbsvcs/RTEvent.dsp
@@ -7,21 +7,21 @@
CFG=RTEvent - Win32 MFC Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "RTEvent.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 "RTEvent.mak" CFG="RTEvent - Win32 MFC Debug"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "RTEvent - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "RTEvent - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "RTEvent - Win32 MFC Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "RTEvent - Win32 MFC Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -143,7 +143,7 @@ LINK32=link.exe
# ADD BASE LINK32 ace.lib TAO.lib TAO_Svc_Utils.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\TAO_RTEvent.dll" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
# ADD LINK32 acemfc.lib TAOmfc.lib TAO_Svc_Utilsmfc.lib TAO_PortableServermfc.lib TAO_Messagingmfc.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\TAO_RTEventmfc.dll" /libpath:"..\..\tao\Messaging" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-!ENDIF
+!ENDIF
# Begin Target
@@ -200,6 +200,10 @@ SOURCE=.\Event\EC_Dispatching.cpp
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Reactive_Dispatching.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Dispatching_Task.cpp
# End Source File
# Begin Source File
@@ -208,6 +212,10 @@ SOURCE=.\Event\EC_Event_Channel.cpp
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Event_Channel_Base.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Factory.cpp
# End Source File
# Begin Source File
@@ -228,6 +236,10 @@ SOURCE=.\Event\EC_Gateway_UDP.cpp
# End Source File
# Begin Source File
+SOURCE=.\Event\ECG_UDP_Out_Endpoint.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Group_Scheduling.cpp
# End Source File
# Begin Source File
@@ -272,6 +284,14 @@ SOURCE=.\Event\EC_ProxySupplier.cpp
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Default_ProxyConsumer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Event\EC_Default_ProxySupplier.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_QOS_Info.cpp
# End Source File
# Begin Source File
@@ -429,6 +449,10 @@ SOURCE=.\Event\EC_Dispatching.h
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Reactive_Dispatching.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Dispatching_Task.h
# End Source File
# Begin Source File
@@ -437,6 +461,10 @@ SOURCE=.\Event\EC_Event_Channel.h
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Event_Channel_Base.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Factory.h
# End Source File
# Begin Source File
@@ -453,6 +481,10 @@ SOURCE=.\Event\EC_Gateway.h
# End Source File
# Begin Source File
+SOURCE=.\Event\ECG_UDP_Out_Endpoint.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Gateway_UDP.h
# End Source File
# Begin Source File
@@ -505,6 +537,14 @@ SOURCE=.\Event\EC_ProxySupplier.h
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Default_ProxyConsumer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Event\EC_Default_ProxySupplier.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_QOS_Info.h
# End Source File
# Begin Source File
@@ -646,7 +686,7 @@ SOURCE=.\RtecDefaultEventData.idl
!IF "$(CFG)" == "RTEvent - Win32 Release"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECD="..\..\..\bin\Release\tao_idl.exe"
+USERDEP__RTECD="..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputName)
InputPath=.\RtecDefaultEventData.idl
InputName=RtecDefaultEventData
@@ -685,7 +725,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "RTEvent - Win32 Debug"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECD="..\..\..\bin\tao_idl.exe"
+USERDEP__RTECD="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputName)
InputPath=.\RtecDefaultEventData.idl
InputName=RtecDefaultEventData
@@ -799,7 +839,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -809,7 +849,7 @@ SOURCE=.\RtecEventChannelAdmin.idl
!IF "$(CFG)" == "RTEvent - Win32 Release"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECE="..\..\..\bin\Release\tao_idl.exe"
+USERDEP__RTECE="..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputName)
InputPath=.\RtecEventChannelAdmin.idl
InputName=RtecEventChannelAdmin
@@ -848,7 +888,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "RTEvent - Win32 Debug"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECE="..\..\..\bin\tao_idl.exe"
+USERDEP__RTECE="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputName)
InputPath=.\RtecEventChannelAdmin.idl
InputName=RtecEventChannelAdmin
@@ -962,7 +1002,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -972,7 +1012,7 @@ SOURCE=.\RtecEventComm.idl
!IF "$(CFG)" == "RTEvent - Win32 Release"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECEV="..\..\..\bin\Release\tao_idl.exe"
+USERDEP__RTECEV="..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputName)
InputPath=.\RtecEventComm.idl
InputName=RtecEventComm
@@ -1011,7 +1051,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "RTEvent - Win32 Debug"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECEV="..\..\..\bin\tao_idl.exe"
+USERDEP__RTECEV="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputName)
InputPath=.\RtecEventComm.idl
InputName=RtecEventComm
@@ -1125,7 +1165,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1135,7 +1175,7 @@ SOURCE=.\RtecUDPAdmin.idl
!IF "$(CFG)" == "RTEvent - Win32 Release"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECU="..\..\..\bin\Release\tao_idl.exe"
+USERDEP__RTECU="..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputName)
InputPath=.\RtecUDPAdmin.idl
InputName=RtecUDPAdmin
@@ -1174,7 +1214,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "RTEvent - Win32 Debug"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECU="..\..\..\bin\tao_idl.exe"
+USERDEP__RTECU="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputName)
InputPath=.\RtecUDPAdmin.idl
InputName=RtecUDPAdmin
@@ -1288,7 +1328,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ENDIF
+!ENDIF
# End Source File
# End Group
@@ -1341,6 +1381,10 @@ SOURCE=.\Event\EC_Dispatching.i
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Reactive_Dispatching.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Dispatching_Task.i
# End Source File
# Begin Source File
@@ -1349,6 +1393,10 @@ SOURCE=.\Event\EC_Event_Channel.i
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Event_Channel_Base.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Factory.i
# End Source File
# Begin Source File
@@ -1365,6 +1413,10 @@ SOURCE=.\Event\EC_Gateway_UDP.i
# End Source File
# Begin Source File
+SOURCE=.\Event\ECG_UDP_Out_Endpoint.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Masked_Type_Filter.i
# End Source File
# Begin Source File
@@ -1405,6 +1457,14 @@ SOURCE=.\Event\EC_ProxySupplier.i
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Default_ProxyConsumer.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Event\EC_Default_ProxySupplier.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_QOS_Info.i
# End Source File
# Begin Source File
@@ -1537,7 +1597,7 @@ SOURCE=.\RtecDefaultEventDataS_T.cpp
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1562,7 +1622,7 @@ SOURCE=.\RtecEventChannelAdminS_T.cpp
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1587,7 +1647,7 @@ SOURCE=.\RtecEventCommS_T.cpp
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -1612,7 +1672,7 @@ SOURCE=.\RtecUDPAdminS_T.cpp
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
-!ENDIF
+!ENDIF
# End Source File
# End Group
diff --git a/TAO/orbsvcs/orbsvcs/RTEvent.mpc b/TAO/orbsvcs/orbsvcs/RTEvent.mpc
index 8e34f71bbef..6325077ceb8 100644
--- a/TAO/orbsvcs/orbsvcs/RTEvent.mpc
+++ b/TAO/orbsvcs/orbsvcs/RTEvent.mpc
@@ -25,16 +25,20 @@ project(RTEvent) : orbsvcslib, core {
RtecUDPAdminC.cpp
RtecUDPAdminS.cpp
Event/EC_Event_Channel.cpp
+ Event/EC_Event_Channel_Base.cpp
Event/EC_ConsumerAdmin.cpp
Event/EC_SupplierAdmin.cpp
Event/EC_ProxyConsumer.cpp
Event/EC_ProxySupplier.cpp
+ Event/EC_Default_ProxyConsumer.cpp
+ Event/EC_Default_ProxySupplier.cpp
Event/EC_Supplier_Filter.cpp
Event/EC_Supplier_Filter_Builder.cpp
Event/EC_Trivial_Supplier_Filter.cpp
Event/EC_Filter.cpp
Event/EC_Filter_Builder.cpp
Event/EC_Dispatching.cpp
+ Event/EC_Reactive_Dispatching.cpp
Event/EC_Factory.cpp
Event/EC_QOS_Info.cpp
Event/EC_Null_Factory.cpp
@@ -65,6 +69,7 @@ project(RTEvent) : orbsvcslib, core {
Event/EC_And_Filter.cpp
Event_Utilities.cpp
Event/EC_Gateway.cpp
+ Event/EC_UDP_Out_Endpoint.cpp
Event/EC_Gateway_UDP.cpp
Event/ECG_Mcast_EH.cpp
Event/ECG_UDP_Sender.cpp
diff --git a/TAO/orbsvcs/orbsvcs/RTEvent_Static.dsp b/TAO/orbsvcs/orbsvcs/RTEvent_Static.dsp
index 6e8834ea8f4..27f3b42867f 100644
--- a/TAO/orbsvcs/orbsvcs/RTEvent_Static.dsp
+++ b/TAO/orbsvcs/orbsvcs/RTEvent_Static.dsp
@@ -7,19 +7,19 @@
CFG=RTEvent_Static - Win32 Static Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "RTEvent_Static.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 "RTEvent_Static.mak" CFG="RTEvent_Static - Win32 Static Debug"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "RTEvent_Static - Win32 Static Release" (based on "Win32 (x86) Static Library")
!MESSAGE "RTEvent_Static - Win32 Static Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -80,7 +80,7 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"TAO_RTEventsd.lib"
-!ENDIF
+!ENDIF
# Begin Target
@@ -158,7 +158,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "RTEvent_Static - Win32 Static Debug"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECD="..\..\..\bin\tao_idl_static.exe"
+USERDEP__RTECD="..\..\..\bin\tao_idl_static.exe"
# Begin Custom Build - Invoking TAO_IDL on $(InputPath)
InputPath=.\RtecDefaultEventData.idl
InputName=RtecDefaultEventData
@@ -194,7 +194,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -242,7 +242,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "RTEvent_Static - Win32 Static Debug"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECE="..\..\..\bin\tao_idl_static.exe"
+USERDEP__RTECE="..\..\..\bin\tao_idl_static.exe"
# Begin Custom Build - Invoking TAO_IDL on $(InputPath)
InputPath=.\RtecEventChannelAdmin.idl
InputName=RtecEventChannelAdmin
@@ -278,7 +278,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -326,7 +326,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "RTEvent_Static - Win32 Static Debug"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECEV="..\..\..\bin\tao_idl_static.exe"
+USERDEP__RTECEV="..\..\..\bin\tao_idl_static.exe"
# Begin Custom Build - Invoking TAO_IDL on $(InputPath)
InputPath=.\RtecEventComm.idl
InputName=RtecEventComm
@@ -362,7 +362,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -410,7 +410,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "RTEvent_Static - Win32 Static Debug"
# PROP Ignore_Default_Tool 1
-USERDEP__RTECU="..\..\..\bin\tao_idl_static.exe"
+USERDEP__RTECU="..\..\..\bin\tao_idl_static.exe"
# Begin Custom Build - Invoking TAO_IDL on $(InputPath)
InputPath=.\RtecUDPAdmin.idl
InputName=RtecUDPAdmin
@@ -446,7 +446,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ENDIF
+!ENDIF
# End Source File
# End Group
@@ -499,6 +499,10 @@ SOURCE=.\Event\EC_Dispatching.i
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Reactive_Dispatching.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Dispatching_Task.i
# End Source File
# Begin Source File
@@ -507,6 +511,10 @@ SOURCE=.\Event\EC_Event_Channel.i
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Event_Channel_Base.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Factory.i
# End Source File
# Begin Source File
@@ -523,6 +531,10 @@ SOURCE=.\Event\EC_Gateway_UDP.i
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_UDP_Out_Endpoint.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Masked_Type_Filter.i
# End Source File
# Begin Source File
@@ -563,6 +575,14 @@ SOURCE=.\Event\EC_ProxySupplier.i
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Default_ProxyConsumer.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Event\EC_Default_ProxySupplier.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_QOS_Info.i
# End Source File
# Begin Source File
@@ -719,6 +739,10 @@ SOURCE=.\Event\EC_Dispatching.cpp
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Reactive_Dispatching.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Dispatching_Task.cpp
# End Source File
# Begin Source File
@@ -727,6 +751,10 @@ SOURCE=.\Event\EC_Event_Channel.cpp
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Event_Channel_Base.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Factory.cpp
# End Source File
# Begin Source File
@@ -743,6 +771,10 @@ SOURCE=.\Event\EC_Gateway.cpp
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_UDP_Out_Endpoint.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Gateway_UDP.cpp
# End Source File
# Begin Source File
@@ -791,6 +823,14 @@ SOURCE=.\Event\EC_ProxySupplier.cpp
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Default_ProxyConsumer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Event\EC_Default_ProxySupplier.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_QOS_Info.cpp
# End Source File
# Begin Source File
@@ -947,6 +987,10 @@ SOURCE=.\Event\EC_Dispatching.h
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Reactive_Dispatching.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Dispatching_Task.h
# End Source File
# Begin Source File
@@ -955,6 +999,10 @@ SOURCE=.\Event\EC_Event_Channel.h
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Event_Channel_Base.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Factory.h
# End Source File
# Begin Source File
@@ -971,6 +1019,10 @@ SOURCE=.\Event\EC_Gateway.h
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_UDP_Out_Endpoint.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_Gateway_UDP.h
# End Source File
# Begin Source File
@@ -1015,6 +1067,14 @@ SOURCE=.\Event\EC_ProxySupplier.h
# End Source File
# Begin Source File
+SOURCE=.\Event\EC_Default_ProxyConsumer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Event\EC_Default_ProxySupplier.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Event\EC_QOS_Info.h
# End Source File
# Begin Source File
diff --git a/TAO/orbsvcs/tests/EC_MT_Mcast/MCast.cpp b/TAO/orbsvcs/tests/EC_MT_Mcast/MCast.cpp
index 9dce1f6e31b..89466e45e1b 100644
--- a/TAO/orbsvcs/tests/EC_MT_Mcast/MCast.cpp
+++ b/TAO/orbsvcs/tests/EC_MT_Mcast/MCast.cpp
@@ -10,6 +10,7 @@
#include "orbsvcs/Event/EC_Gateway_UDP.h"
#include "orbsvcs/Event/ECG_Mcast_EH.h"
#include "orbsvcs/Event/ECG_UDP_Sender.h"
+#include "orbsvcs/Event/ECG_UDP_Out_Endpoint.h"
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h
index 547afb93036..cb9e2bbe489 100644
--- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h
+++ b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h
@@ -60,6 +60,7 @@
#include "orbsvcs/Event/EC_UDP_Admin.h"
#include "orbsvcs/Event/ECG_Mcast_EH.h"
#include "orbsvcs/Event/ECG_UDP_Sender.h"
+#include "orbsvcs/Event/ECG_UDP_Out_Endpoint.h"
class ECM_Driver;
diff --git a/TAO/orbsvcs/tests/Event/Basic/BCast.cpp b/TAO/orbsvcs/tests/Event/Basic/BCast.cpp
index ca521ef8056..ac45b6d52cf 100644
--- a/TAO/orbsvcs/tests/Event/Basic/BCast.cpp
+++ b/TAO/orbsvcs/tests/Event/Basic/BCast.cpp
@@ -6,6 +6,7 @@
#include "orbsvcs/Event/EC_Event_Channel.h"
#include "orbsvcs/Event/EC_Gateway_UDP.h"
#include "orbsvcs/Event/ECG_UDP_Sender.h"
+#include "orbsvcs/Event/ECG_UDP_Out_Endpoint.h"
#include "tao/ORB_Core.h"
#include "ace/Arg_Shifter.h"
diff --git a/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl b/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl
index 417288cbe25..74b7987f7d8 100755
--- a/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl
+++ b/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl
@@ -13,7 +13,7 @@ use PerlACE::Run_Test;
$status = 0;
-$conf_file = PerlACE::LocalFile ('exhaustive$PerlACE::svcconf_ext');
+$conf_file = PerlACE::LocalFile ("exhaustive$PerlACE::svcconf_ext");
@dispatching_configs = ("-ECDispatching reactive",
"-ECDispatching mt -ECDispatchingThreads 4");