00001 // EC_TPC_ProxyConsumer.cpp,v 1.6 2006/03/14 06:14:25 jtc Exp 00002 00003 #include "orbsvcs/Event/EC_TPC_ProxyConsumer.h" 00004 00005 ACE_RCSID(Event, EC_TPC_ProxyConsumer, "EC_TPC_ProxyConsumer.cpp,v 1.6 2006/03/14 06:14:25 jtc Exp") 00006 00007 #include "orbsvcs/Event/EC_Event_Channel_Base.h" 00008 #include "orbsvcs/Event/EC_TPC_Dispatching.h" 00009 00010 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00011 00012 extern unsigned long EC_TPC_debug_level; 00013 00014 TAO_EC_TPC_ProxyPushConsumer::TAO_EC_TPC_ProxyPushConsumer (TAO_EC_Event_Channel_Base* ec) 00015 : TAO_EC_Default_ProxyPushConsumer (ec) 00016 { 00017 } 00018 00019 TAO_EC_TPC_Dispatching* 00020 TAO_EC_TPC_ProxyPushConsumer::tpc_dispatching () 00021 { 00022 TAO_EC_Dispatching* dispatcher = this->event_channel_->dispatching (); 00023 TAO_EC_TPC_Dispatching* tpcdispatcher = 00024 dynamic_cast<TAO_EC_TPC_Dispatching*>(dispatcher); 00025 return tpcdispatcher; 00026 } 00027 00028 TAO_EC_TPC_ProxyPushConsumer::~TAO_EC_TPC_ProxyPushConsumer (void) 00029 { 00030 // @@@ Do I need to call the logic to remove the consumer from the 00031 // dispatch map in here? I'm not sure... But, if I do, then I need 00032 // to fact that "remove" code out of just the 00033 // disconnect_push_consumer. 00034 if (EC_TPC_debug_level > 0) 00035 ACE_DEBUG ((LM_DEBUG, "RTEC (%P|%t): inside ~TAO_EC_TPC_ProxyPushConsumer (%x)\n", this)); 00036 } 00037 00038 void 00039 TAO_EC_TPC_ProxyPushConsumer::disconnect_push_consumer ( 00040 ACE_ENV_SINGLE_ARG_DECL) 00041 ACE_THROW_SPEC ((CORBA::SystemException)) 00042 { 00043 RtecEventComm::PushConsumer_var emulated_exceptions_suck = 00044 this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); 00045 ACE_CHECK; 00046 00047 this->tpc_dispatching ()->remove_consumer (emulated_exceptions_suck.in () 00048 ACE_ENV_ARG_PARAMETER); 00049 ACE_CHECK; 00050 00051 BASECLASS::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); 00052 ACE_CHECK; 00053 } 00054 00055 TAO_END_VERSIONED_NAMESPACE_DECL