EC_TPC_ProxySupplier.cpp

Go to the documentation of this file.
00001 // $Id: EC_TPC_ProxySupplier.cpp 77001 2007-02-12 07:54:49Z johnnyw $
00002 
00003 #include "orbsvcs/Event/EC_TPC_ProxySupplier.h"
00004 
00005 #if ! defined (__ACE_INLINE__)
00006 #include "orbsvcs/Event/EC_TPC_ProxySupplier.inl"
00007 #endif /* __ACE_INLINE__ */
00008 
00009 ACE_RCSID(Event, EC_TPC_ProxySupplier, "$Id: EC_TPC_ProxySupplier.cpp 77001 2007-02-12 07:54:49Z johnnyw $")
00010 
00011 #include "orbsvcs/Event/EC_Event_Channel_Base.h"
00012 #include "orbsvcs/Event/EC_TPC_Dispatching.h"
00013 
00014 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00015 
00016 extern unsigned long TAO_EC_TPC_debug_level;
00017 
00018 TAO_EC_TPC_ProxyPushSupplier::~TAO_EC_TPC_ProxyPushSupplier (void)
00019 {
00020 
00021 }
00022 
00023 void
00024 TAO_EC_TPC_ProxyPushSupplier:: disconnect_push_supplier (void)
00025 {
00026   if (TAO_EC_TPC_debug_level > 0)
00027     ACE_DEBUG ((LM_DEBUG, "EC (%P|%t): enter EC_TPC_ProxySupplier::disconnect_push_supplier (%@): refcount=%u,consumer=%@\n",
00028                 this,
00029                 this->refcount_,
00030                 this->consumer_.in()));
00031 
00032   if (this->is_connected_i ())
00033     {
00034       this->tpc_dispatching ()->remove_consumer (this->consumer_.in());
00035     }
00036   BASECLASS::disconnect_push_supplier ();
00037 
00038   if (TAO_EC_TPC_debug_level > 0)
00039     ACE_DEBUG ((LM_DEBUG, "EC (%P|%t): leave EC_TPC_ProxySupplier::disconnect_push_supplier (%@)\n", this));
00040 }
00041 
00042 TAO_EC_TPC_Dispatching*
00043 TAO_EC_TPC_ProxyPushSupplier::tpc_dispatching ()
00044 {
00045   TAO_EC_Dispatching* dispatcher = this->event_channel_->dispatching ();
00046 
00047   return dynamic_cast <TAO_EC_TPC_Dispatching*> (dispatcher);
00048 }
00049 
00050 void
00051 TAO_EC_TPC_ProxyPushSupplier::connect_push_consumer (
00052       RtecEventComm::PushConsumer_ptr push_consumer,
00053       const RtecEventChannelAdmin::ConsumerQOS& qos)
00054 {
00055   BASECLASS::connect_push_consumer (push_consumer, qos);
00056 
00057   if (TAO_EC_TPC_debug_level > 0)
00058     ACE_DEBUG ((LM_DEBUG, "EC (%P|%t): EC_ProxySupplier(%@): refcount=%u,consumer=%@\n",
00059               this, this->refcount_, this->consumer_.in()));
00060 
00061   TAO_EC_TPC_Dispatching* tpcdispatcher = this->tpc_dispatching ();
00062 
00063   // the new dispatching task gets automatically created
00064   tpcdispatcher->add_consumer (push_consumer);
00065 }
00066 
00067 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:44:06 2010 for TAO_RTEvent by  doxygen 1.4.7