diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Notify_SequenceProxyPushSupplier_i.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/Notify_SequenceProxyPushSupplier_i.cpp | 69 |
1 files changed, 18 insertions, 51 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_SequenceProxyPushSupplier_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_SequenceProxyPushSupplier_i.cpp index 450ac08e61d..5fb74e80a36 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_SequenceProxyPushSupplier_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_SequenceProxyPushSupplier_i.cpp @@ -6,10 +6,8 @@ ACE_RCSID(Notify, Notify_SequenceProxyPushSupplier_i, "$Id$") -typedef ACE_Reverse_Lock<ACE_Lock> TAO_Notify_Unlock; - -TAO_Notify_SequenceProxyPushSupplier_i::TAO_Notify_SequenceProxyPushSupplier_i (TAO_Notify_ConsumerAdmin_i* consumer_admin) - :proxy_inherited (consumer_admin) +TAO_Notify_SequenceProxyPushSupplier_i::TAO_Notify_SequenceProxyPushSupplier_i (TAO_Notify_ConsumerAdmin_i* consumeradmin, TAO_Notify_Resource_Manager* resource_manager) + :sequence_proxy_inherited (consumeradmin, resource_manager) { } @@ -18,6 +16,14 @@ TAO_Notify_SequenceProxyPushSupplier_i::~TAO_Notify_SequenceProxyPushSupplier_i } void +TAO_Notify_SequenceProxyPushSupplier_i::cleanup_i (CORBA::Environment &ACE_TRY_ENV) +{ + sequence_proxy_inherited::cleanup_i (ACE_TRY_ENV); + + this->push_consumer_ = CosNotifyComm::SequencePushConsumer::_nil (); +} + +void TAO_Notify_SequenceProxyPushSupplier_i::connect_sequence_push_consumer (CosNotifyComm::SequencePushConsumer_ptr push_consumer, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC (( CORBA::SystemException, @@ -25,10 +31,6 @@ TAO_Notify_SequenceProxyPushSupplier_i::connect_sequence_push_consumer (CosNotif CosEventChannelAdmin::TypeError )) { - ACE_GUARD_THROW_EX (ACE_Lock, ace_mon, *this->lock_, - CORBA::INTERNAL ()); - ACE_CHECK; - if (CORBA::is_nil (push_consumer)) ACE_THROW (CosEventChannelAdmin::TypeError ()); else if (this->is_connected_ == 1) @@ -37,22 +39,14 @@ TAO_Notify_SequenceProxyPushSupplier_i::connect_sequence_push_consumer (CosNotif { this->push_consumer_ = CosNotifyComm::SequencePushConsumer::_duplicate (push_consumer); - - this->is_connected_ = 1; } ACE_TRY { - TAO_Notify_Unlock reverse_lock (*this->lock_); - - { - ACE_GUARD_THROW_EX (TAO_Notify_Unlock, ace_mon, reverse_lock, - CORBA::INTERNAL ()); - ACE_CHECK; + this->on_connected (ACE_TRY_ENV); + ACE_TRY_CHECK; - this->on_connected (ACE_TRY_ENV); - ACE_TRY_CHECK; - } + this->is_connected_ = 1; } ACE_CATCHALL { @@ -88,46 +82,19 @@ TAO_Notify_SequenceProxyPushSupplier_i::dispatch_update_i (CosNotification::Even } void -TAO_Notify_SequenceProxyPushSupplier_i::disconnect_sequence_push_supplier(CORBA::Environment &ACE_TRY_ENV) +TAO_Notify_SequenceProxyPushSupplier_i::disconnect_sequence_push_supplier( + CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC (( CORBA::SystemException )) { - this->on_disconnected (ACE_TRY_ENV); - ACE_CHECK; + this->is_destroyed_ = 1; // ask our parent to deactivate us. - this->consumer_admin_-> + this->myadmin_-> deactivate_proxy_pushsupplier (this, ACE_TRY_ENV); -} - -void -TAO_Notify_SequenceProxyPushSupplier_i::shutdown (CORBA::Environment &ACE_TRY_ENV) -{ - // Tell the consumer that we're going away ... - // @@ Later, lookup a "notify_on_disconnect" option. - - { - ACE_GUARD (ACE_Lock, ace_mon, *this->lock_); - - if (this->is_connected_ == 0) - return; - } - - this->disconnect_sequence_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - ACE_TRY - { - this->push_consumer_->disconnect_sequence_push_consumer (ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHALL - { - // ignore - } - ACE_ENDTRY; + this->cleanup_i (ACE_TRY_ENV); } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) |