diff options
author | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-03-24 04:07:29 +0000 |
---|---|---|
committer | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-03-24 04:07:29 +0000 |
commit | 09f8082940cdea9f78a39789fb55f0621d8e8a60 (patch) | |
tree | 2a1fc5bf3df5449e506a1148657152f50ded871c | |
parent | f33e00948776e1f2f8405597e982aa4c8165f0b4 (diff) | |
download | ATCD-09f8082940cdea9f78a39789fb55f0621d8e8a60.tar.gz |
Thu Mar 23 22:06:57 2000 Pradeep Gore <pradeep@flamenco.cs.wustl.edu>
14 files changed, 62 insertions, 31 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.cpp index 1dfab8a73eb..ccdef092e53 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.cpp @@ -23,6 +23,14 @@ TAO_Notify_ConsumerAdmin_i::~TAO_Notify_ConsumerAdmin_i (void) { if (this->is_destroyed_ == 0) this->cleanup_i (); + + this->my_channel_->consumer_admin_destroyed (this->myID_); +} + +void +TAO_Notify_ConsumerAdmin_i::proxy_pushsupplier_destroyed (CosNotifyChannelAdmin::ProxyID proxyID) +{ + this->proxy_pushsupplier_ids_.put (proxyID); } void @@ -291,7 +299,7 @@ TAO_Notify_ConsumerAdmin_i::obtain_struct_proxy_pushsupplier_i (CosNotifyChannel PortableServer::ServantBase_var proxy_pushsupplier_var (struct_proxy_pushsupplier); - struct_proxy_pushsupplier->init (ACE_TRY_ENV); + struct_proxy_pushsupplier->init (proxy_id, ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::Object::_nil ()); return this->resource_manager_-> @@ -311,7 +319,7 @@ TAO_Notify_ConsumerAdmin_i::obtain_sequence_proxy_pushsupplier_i (CosNotifyChann PortableServer::ServantBase_var proxy_pushsupplier_var (seq_proxy_pushsupplier); - seq_proxy_pushsupplier->init (ACE_TRY_ENV); + seq_proxy_pushsupplier->init (proxy_id, ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::Object::_nil ()); return this->resource_manager_-> @@ -330,7 +338,7 @@ TAO_Notify_ConsumerAdmin_i::obtain_proxy_pushsupplier_i (CosNotifyChannelAdmin:: PortableServer::ServantBase_var proxy_pushsupplier_var (proxy_pushsupplier); - proxy_pushsupplier->init (ACE_TRY_ENV); + proxy_pushsupplier->init (proxy_id, ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::Object::_nil ()); return this->resource_manager_-> diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h index 4f007482770..e17b3a060b8 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h @@ -78,6 +78,9 @@ class TAO_Notify_Export TAO_Notify_ConsumerAdmin_i : public POA_CosNotifyChannel void unregister_listener (TAO_Notify_Event_Listener *listener, CORBA::Environment &ACE_TRY_ENV); // Unregister with parent for subscription updates. + void proxy_pushsupplier_destroyed (CosNotifyChannelAdmin::ProxyID proxyID); + // This id is no longer in use.It can be reused by <proxy_pushsupplier_ids_> + // = Interface methods virtual CosNotifyChannelAdmin::AdminID MyID ( CORBA::Environment &ACE_TRY_ENV diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.cpp index 566e0765454..706a3ca2f73 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.cpp @@ -22,7 +22,7 @@ TAO_Notify_EventChannel_i::TAO_Notify_EventChannel_i (CosNotifyChannelAdmin::Eve // Implementation skeleton destructor TAO_Notify_EventChannel_i::~TAO_Notify_EventChannel_i (void) { - if (is_destroyed_ == 0) + if (this->is_destroyed_ == 0) this->cleanup_i (); } @@ -92,6 +92,18 @@ TAO_Notify_EventChannel_i::get_event_manager (void) return this->event_manager_; } +void +TAO_Notify_EventChannel_i::consumer_admin_destroyed (CosNotifyChannelAdmin::AdminID CA_ID) +{ + consumer_admin_ids_.put (CA_ID); +} + +void +TAO_Notify_EventChannel_i::supplier_admin_destroyed (CosNotifyChannelAdmin::AdminID SA_ID) +{ + supplier_admin_ids_.put (SA_ID); +} + CosNotifyChannelAdmin::EventChannel_ptr TAO_Notify_EventChannel_i::get_ref (CORBA::Environment &ACE_TRY_ENV) { @@ -132,10 +144,9 @@ TAO_Notify_EventChannel_i::destroy (CORBA::Environment &ACE_TRY_ENV) this->is_destroyed_ = 1; // Deactivate ourselves. - this->resource_manager_-> - deactivate_object (this, - this->my_POA_.in (), - ACE_TRY_ENV); + this->resource_manager_->deactivate_object (this, + this->my_POA_.in (), + ACE_TRY_ENV); this->cleanup_i (ACE_TRY_ENV); } diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h index 0c6063299b9..a5adeae7164 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h @@ -73,6 +73,12 @@ class TAO_Notify_Export TAO_Notify_EventChannel_i : public virtual POA_CosNotify TAO_Notify_Event_Manager* get_event_manager (void); // Get the event manager. + void consumer_admin_destroyed (CosNotifyChannelAdmin::AdminID CA_ID); + // This id is no longer in use.It can be reused by <consumer_admin_ids_>. + + void supplier_admin_destroyed (CosNotifyChannelAdmin::AdminID SA_ID); + // This id is no longer in use.It can be reused by <supplier_admin_ids_>. + // = Interface methods virtual CosNotifyChannelAdmin::EventChannelFactory_ptr MyFactory ( CORBA::Environment &ACE_TRY_ENV diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_T.cpp index 1cce389ebdb..12dfd2dd357 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_T.cpp @@ -22,12 +22,8 @@ TAO_Notify_ProxyConsumer<SERVANT_TYPE>::~TAO_Notify_ProxyConsumer (void) { if (!is_destroyed_) this->cleanup_i (); -} -template <class SERVANT_TYPE> void -TAO_Notify_ProxyConsumer<SERVANT_TYPE>::init (CORBA::Environment& /*ACE_TRY_ENV*/) -{ - // No-Op. + this->myadmin_->proxy_pushconsumer_destroyed (this->myID_); } template <class SERVANT_TYPE> CORBA::Boolean diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_T.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_T.h index 7322e5539a8..c0eb08d0e84 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_T.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_T.h @@ -47,9 +47,6 @@ public: virtual ~TAO_Notify_ProxyConsumer (void); // Destructor - void init (CORBA::Environment &ACE_TRY_ENV); - // Init - virtual CosNotifyChannelAdmin::SupplierAdmin_ptr MyAdmin ( CORBA::Environment &ACE_TRY_ENV ) diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.cpp index e3d9af404a0..86eaca86141 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.cpp @@ -124,7 +124,8 @@ TAO_Notify_CosEC_ProxyPushConsumer_i::~TAO_Notify_CosEC_ProxyPushConsumer_i (voi void TAO_Notify_CosEC_ProxyPushConsumer_i::init (CORBA::Environment &ACE_TRY_ENV) { - this->notify_proxy_.init (ACE_TRY_ENV); + // Pass the default id. + this->notify_proxy_.init (0, ACE_TRY_ENV); } void diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.cpp index a6b625003f1..683a06b9e5e 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.cpp @@ -131,7 +131,7 @@ TAO_Notify_CosEC_ProxyPushSupplier_i::~TAO_Notify_CosEC_ProxyPushSupplier_i (voi void TAO_Notify_CosEC_ProxyPushSupplier_i::init (CORBA::Environment &ACE_TRY_ENV) { - this->notify_proxy_.init (ACE_TRY_ENV); + this->notify_proxy_.init (0, ACE_TRY_ENV); } void diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.cpp index 21fec4eeb8c..0c7411f72d6 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.cpp @@ -22,11 +22,8 @@ TAO_Notify_ProxySupplier<SERVANT_TYPE>::~TAO_Notify_ProxySupplier (void) { if (!is_destroyed_) this->cleanup_i (); -} -template <class SERVANT_TYPE> void -TAO_Notify_ProxySupplier<SERVANT_TYPE>::init (CORBA::Environment& /*ACE_TRY_ENV*/) -{ + this->myadmin_->proxy_pushsupplier_destroyed (this->myID_); } template <class SERVANT_TYPE> void diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.h index 4304c88e31f..be08735c39c 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.h @@ -46,9 +46,6 @@ public: virtual ~TAO_Notify_ProxySupplier (void); // Destructor - void init (CORBA::Environment &ACE_TRY_ENV); - // Init - // = Notify_Event_Listener methods virtual void dispatch_event (TAO_Notify_Event &event, CORBA::Environment &ACE_TRY_ENV); diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Proxy_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_Proxy_T.cpp index 2d5035dccef..ac31b0dfe7a 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_Proxy_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Proxy_T.cpp @@ -25,8 +25,9 @@ TAO_Notify_Proxy<SERVANT_TYPE>::~TAO_Notify_Proxy (void) } template <class SERVANT_TYPE> void -TAO_Notify_Proxy<SERVANT_TYPE>::init (CORBA::Environment& /*ACE_TRY_ENV*/) +TAO_Notify_Proxy<SERVANT_TYPE>::init (CosNotifyChannelAdmin::ProxyID myID, CORBA::Environment& /*ACE_TRY_ENV*/) { + this->myID_ = myID; } template <class SERVANT_TYPE> void diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Proxy_T.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_Proxy_T.h index 02415a3ddd5..beb2508f6e3 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_Proxy_T.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Proxy_T.h @@ -55,8 +55,8 @@ public: virtual ~TAO_Notify_Proxy (void); // Destructor - void init (CORBA::Environment &ACE_TRY_ENV); - // Init + void init (CosNotifyChannelAdmin::ProxyID myID, CORBA::Environment &ACE_TRY_ENV); + // Init the Proxy. // = Notify_Update_Listener methods virtual void dispatch_update (EVENTTYPE_LIST& added_list, EVENTTYPE_LIST& removed_list, CORBA::Environment &ACE_TRY_ENV); @@ -176,6 +176,9 @@ virtual void remove_all_filters ( TAO_Notify_FilterAdmin_i filter_admin_; // Handles the Filter admin methods. + + CosNotifyChannelAdmin::ProxyID myID_; + // The ID assigned to the Proxy. }; #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp index 79c43763ac2..7be518f899b 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp @@ -23,6 +23,14 @@ TAO_Notify_SupplierAdmin_i::~TAO_Notify_SupplierAdmin_i (void) { if (this->is_destroyed_ == 0) this->cleanup_i (); + + this->my_channel_->supplier_admin_destroyed (this->myID_); +} + +void +TAO_Notify_SupplierAdmin_i::proxy_pushconsumer_destroyed (CosNotifyChannelAdmin::ProxyID proxyID) +{ + this->proxy_pushconsumer_ids_.put (proxyID); } void @@ -164,7 +172,7 @@ TAO_Notify_SupplierAdmin_i::obtain_sequence_proxy_pushconsumer_i (CosNotifyChann PortableServer::ServantBase_var proxy_pushconsumer_var (seq_proxy_pushconsumer); - seq_proxy_pushconsumer->init (ACE_TRY_ENV); + seq_proxy_pushconsumer->init (proxy_id, ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::Object::_nil ()); return this->resource_manager_-> @@ -184,7 +192,7 @@ TAO_Notify_SupplierAdmin_i::obtain_struct_proxy_pushconsumer_i (CosNotifyChannel PortableServer::ServantBase_var proxy_pushconsumer_var (struct_proxy_pushconsumer); - struct_proxy_pushconsumer->init (ACE_TRY_ENV); + struct_proxy_pushconsumer->init (proxy_id, ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::Object::_nil ()); return this->resource_manager_-> @@ -203,7 +211,7 @@ TAO_Notify_SupplierAdmin_i::obtain_proxy_pushconsumer_i (CosNotifyChannelAdmin:: PortableServer::ServantBase_var proxy_pushconsumer_var (proxy_pushconsumer); - proxy_pushconsumer->init (ACE_TRY_ENV); + proxy_pushconsumer->init (proxy_id, ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::Object::_nil ()); return this->resource_manager_-> diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h index 12f45594113..72a00753339 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h @@ -65,6 +65,9 @@ public: void deactivate_proxy_pushconsumer (PortableServer::Servant servant, CORBA::Environment &ACE_TRY_ENV); // Deactivate servant from <proxy_pushconsumer_POA_>. + void proxy_pushconsumer_destroyed (CosNotifyChannelAdmin::ProxyID proxyID); + // This id is no longer in use.It can be reused by <proxy_pushconsumer_ids_> + // = Interface methods virtual CosNotifyChannelAdmin::AdminID MyID ( CORBA::Environment &ACE_TRY_ENV |