summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp53
1 files changed, 19 insertions, 34 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp
index 7bacdf93ff5..da73b3c012f 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp
@@ -12,15 +12,22 @@
ACE_RCSID(Event, EC_ConsumerAdmin, "$Id$")
-TAO_EC_ConsumerAdmin::TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel *ec)
- : busy_lock_ (this),
- event_channel_ (ec),
- busy_hwm_ (1)
+TAO_EC_ConsumerAdmin::TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel *ec,
+ TAO_EC_ProxyPushSupplier_Set* ss)
+ : event_channel_ (ec),
+ supplier_set_ (ss)
{
+ if (this->supplier_set_ == 0)
+ {
+ this->supplier_set_ =
+ this->event_channel_->create_proxy_push_supplier_set ();
+ }
}
TAO_EC_ConsumerAdmin::~TAO_EC_ConsumerAdmin (void)
{
+ this->event_channel_->destroy_proxy_push_supplier_set (this->supplier_set_);
+ this->supplier_set_ = 0;
}
void
@@ -35,7 +42,7 @@ TAO_EC_ConsumerAdmin::connected (TAO_EC_ProxyPushConsumer *consumer,
CORBA::Environment &ACE_TRY_ENV)
{
ACE_GUARD_THROW (TAO_EC_ConsumerAdmin::Busy_Lock,
- ace_mon, this->busy_lock_,
+ ace_mon, this->busy_lock (),
RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
SupplierSetIterator end = this->end ();
@@ -53,7 +60,7 @@ TAO_EC_ConsumerAdmin::disconnected (TAO_EC_ProxyPushConsumer *consumer,
CORBA::Environment &ACE_TRY_ENV)
{
ACE_GUARD_THROW (TAO_EC_ConsumerAdmin::Busy_Lock,
- ace_mon, this->busy_lock_,
+ ace_mon, this->busy_lock (),
RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ());
SupplierSetIterator end = this->end ();
@@ -67,20 +74,17 @@ TAO_EC_ConsumerAdmin::disconnected (TAO_EC_ProxyPushConsumer *consumer,
}
void
-TAO_EC_ConsumerAdmin::connected_i (TAO_EC_ProxyPushSupplier *supplier,
- CORBA::Environment &ACE_TRY_ENV)
+TAO_EC_ConsumerAdmin::connected (TAO_EC_ProxyPushSupplier *supplier,
+ CORBA::Environment &ACE_TRY_ENV)
{
- if (this->all_suppliers_.insert (supplier) != 0)
- ACE_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
+ this->supplier_set_->connected (supplier, ACE_TRY_ENV);
}
void
-TAO_EC_ConsumerAdmin::disconnected_i (TAO_EC_ProxyPushSupplier *supplier,
- CORBA::Environment &ACE_TRY_ENV)
+TAO_EC_ConsumerAdmin::disconnected (TAO_EC_ProxyPushSupplier *supplier,
+ CORBA::Environment &ACE_TRY_ENV)
{
- if (this->all_suppliers_.remove (supplier) != 0)
- ACE_THROW (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR ());
- supplier->_decr_refcnt ();
+ this->supplier_set_->disconnected (supplier, ACE_TRY_ENV);
}
RtecEventChannelAdmin::ProxyPushSupplier_ptr
@@ -102,27 +106,8 @@ TAO_EC_ConsumerAdmin::_default_POA (CORBA::Environment&)
return PortableServer::POA::_duplicate (this->default_POA_.in ());
}
-void
-TAO_EC_ConsumerAdmin::execute_delayed_operations (void)
-{
-}
-
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Node<TAO_EC_ProxyPushSupplier*>;
-template class ACE_Unbounded_Set<TAO_EC_ProxyPushSupplier*>;
-template class ACE_Unbounded_Set_Iterator<TAO_EC_ProxyPushSupplier*>;
-template class TAO_EC_Busy_Lock_Adapter<TAO_EC_ConsumerAdmin>;
-template class TAO_EC_Connected_Command<TAO_EC_ConsumerAdmin,TAO_EC_ProxyPushSupplier>;
-template class TAO_EC_Disconnected_Command<TAO_EC_ConsumerAdmin,TAO_EC_ProxyPushSupplier>;
-
#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Node<TAO_EC_ProxyPushSupplier*>
-#pragma instantiate ACE_Unbounded_Set<TAO_EC_ProxyPushSupplier*>
-#pragma instantiate ACE_Unbounded_Set_Iterator<TAO_EC_ProxyPushSupplier*>
-#pragma instantiate TAO_EC_Busy_Lock_Adapter<TAO_EC_ConsumerAdmin>
-#pragma instantiate TAO_EC_Connected_Command<TAO_EC_ConsumerAdmin,TAO_EC_ProxyPushSupplier>
-#pragma instantiate TAO_EC_Disconnected_Command<TAO_EC_ConsumerAdmin,TAO_EC_ProxyPushSupplier>
-
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */