EC_TPC_ProxySupplier.cpp

Go to the documentation of this file.
00001 // EC_TPC_ProxySupplier.cpp,v 1.7 2006/03/14 06:14:25 jtc Exp
00002 
00003 #include "orbsvcs/Event/EC_TPC_ProxySupplier.h"
00004 
00005 #if ! defined (__ACE_INLINE__)
00006 #include "orbsvcs/Event/EC_TPC_ProxySupplier.i"
00007 #endif /* __ACE_INLINE__ */
00008 
00009 ACE_RCSID(Event, EC_TPC_ProxySupplier, "EC_TPC_ProxySupplier.cpp,v 1.7 2006/03/14 06:14:25 jtc Exp")
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 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 (ACE_ENV_SINGLE_ARG_DECL)
00025   ACE_THROW_SPEC ((CORBA::SystemException))
00026 {
00027   if (EC_TPC_debug_level > 0)
00028     ACE_DEBUG ((LM_DEBUG, "EC (%P|%t): enter EC_TPC_ProxySupplier::disconnect_push_supplier (%@): refcount=%u,consumer=%@\n",
00029                                 this,
00030                                 this->refcount_,
00031                                 this->consumer_.in()));
00032 
00033   if (this->is_connected_i ())
00034     {
00035       this->tpc_dispatching ()->remove_consumer (this->consumer_.in()
00036                                                  ACE_ENV_ARG_PARAMETER);
00037       ACE_CHECK;
00038     }
00039   BASECLASS::disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER);
00040   ACE_CHECK;
00041 
00042   if (EC_TPC_debug_level > 0)
00043     ACE_DEBUG ((LM_DEBUG, "EC (%P|%t): leave EC_TPC_ProxySupplier::disconnect_push_supplier (%@)\n", this));
00044 }
00045 
00046 TAO_EC_TPC_Dispatching*
00047 TAO_EC_TPC_ProxyPushSupplier::tpc_dispatching ()
00048 {
00049   TAO_EC_Dispatching* dispatcher = this->event_channel_->dispatching ();
00050 
00051   return dynamic_cast <TAO_EC_TPC_Dispatching*> (dispatcher);
00052 }
00053 
00054 void
00055 TAO_EC_TPC_ProxyPushSupplier::connect_push_consumer (
00056       RtecEventComm::PushConsumer_ptr push_consumer,
00057       const RtecEventChannelAdmin::ConsumerQOS& qos
00058       ACE_ENV_ARG_DECL)
00059     ACE_THROW_SPEC ((CORBA::SystemException,
00060                      RtecEventChannelAdmin::AlreadyConnected,
00061                      RtecEventChannelAdmin::TypeError))
00062 {
00063   BASECLASS::connect_push_consumer (push_consumer, qos ACE_ENV_ARG_PARAMETER);
00064   ACE_CHECK;
00065 
00066   if (EC_TPC_debug_level > 0)
00067     ACE_DEBUG ((LM_DEBUG, "EC (%P|%t): EC_ProxySupplier(%@): refcount=%u,consumer=%@\n",
00068               this, this->refcount_, this->consumer_.in()));
00069 
00070   TAO_EC_TPC_Dispatching* tpcdispatcher = this->tpc_dispatching ();
00071 
00072   // the new dispatching task gets automatically created
00073   tpcdispatcher->add_consumer (push_consumer ACE_ENV_ARG_PARAMETER);
00074 }
00075 
00076 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 13:11:09 2006 for TAO_RTEvent by doxygen 1.3.6