#include <EC_Event_Channel_Base.h>
Inheritance diagram for TAO_EC_Event_Channel_Base:
This class is the Mediator between all the classes in the EC implementation, its main task is to redirect the messages to the right components, to hold and manage the lifetime of the long lived objects (Timer_Module, SupplierAdmin, ConsumerAdmin and Dispatching) and to provide a simpler interface to the EC_Factory.
Definition at line 110 of file EC_Event_Channel_Base.h.
anonymous enum [protected] |
Flag to track the status of the event channel.
Definition at line 336 of file EC_Event_Channel_Base.h.
00336 { 00337 EC_S_IDLE 00338 , EC_S_ACTIVATING 00339 , EC_S_ACTIVE 00340 , EC_S_DESTROYING 00341 , EC_S_DESTROYED 00342 };
TAO_EC_Event_Channel_Base::~TAO_EC_Event_Channel_Base | ( | void | ) | [virtual] |
destructor
Definition at line 48 of file EC_Event_Channel_Base.cpp.
References consumer_admin_, consumer_control_, TAO_EC_Factory::destroy_consumer_admin(), TAO_EC_Factory::destroy_consumer_control(), TAO_EC_Factory::destroy_dispatching(), TAO_EC_Factory::destroy_filter_builder(), TAO_EC_Factory::destroy_observer_strategy(), TAO_EC_Factory::destroy_scheduling_strategy(), TAO_EC_Factory::destroy_supplier_admin(), TAO_EC_Factory::destroy_supplier_control(), TAO_EC_Factory::destroy_supplier_filter_builder(), TAO_EC_Factory::destroy_timeout_generator(), dispatching_, factory(), factory_, filter_builder_, observer_strategy_, scheduling_strategy_, supplier_admin_, supplier_control_, supplier_filter_builder_, and timeout_generator_.
00049 { 00050 // Destroy Strategies in the reverse order of creation, they 00051 // refere to each other during destruction and thus need to be 00052 // cleaned up properly. 00053 this->factory_->destroy_supplier_control (this->supplier_control_); 00054 this->supplier_control_ = 0; 00055 this->factory_->destroy_consumer_control (this->consumer_control_); 00056 this->consumer_control_ = 0; 00057 00058 this->factory_->destroy_scheduling_strategy (this->scheduling_strategy_); 00059 this->scheduling_strategy_ = 0; 00060 00061 this->factory_->destroy_observer_strategy (this->observer_strategy_); 00062 this->observer_strategy_ = 0; 00063 00064 this->factory_->destroy_timeout_generator (this->timeout_generator_); 00065 this->timeout_generator_ = 0; 00066 00067 this->factory_->destroy_supplier_admin (this->supplier_admin_); 00068 this->supplier_admin_ = 0; 00069 this->factory_->destroy_consumer_admin (this->consumer_admin_); 00070 this->consumer_admin_ = 0; 00071 00072 this->factory_->destroy_supplier_filter_builder (this->supplier_filter_builder_); 00073 this->supplier_filter_builder_ = 0; 00074 00075 this->factory_->destroy_filter_builder (this->filter_builder_); 00076 this->filter_builder_ = 0; 00077 00078 this->factory_->destroy_dispatching (this->dispatching_); 00079 this->dispatching_ = 0; 00080 00081 this->factory (0, 0); 00082 }
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_EC_Event_Channel_Base::TAO_EC_Event_Channel_Base | ( | const TAO_EC_Event_Channel_Attributes & | attributes, | |
TAO_EC_Factory * | factory = 0 , |
|||
int | own_factory = 0 | |||
) | [protected] |
Constructor If own_factory is not 0 it assumes ownership of the factory. If the factory is nil it uses the Service_Configurator to load the Factory, if not found it uses TAO_EC_Default_Resource_Factory
Definition at line 22 of file EC_Event_Channel_Base.cpp.
References CORBA::Object::_duplicate().
00025 : supplier_poa_ (PortableServer::POA::_duplicate (attr.supplier_poa)), 00026 consumer_poa_ (PortableServer::POA::_duplicate (attr.consumer_poa)), 00027 factory_ (factory), 00028 own_factory_ (own_factory), 00029 dispatching_ (0), 00030 filter_builder_ (0), 00031 supplier_filter_builder_ (0), 00032 consumer_admin_ (0), 00033 supplier_admin_ (0), 00034 timeout_generator_ (0), 00035 observer_strategy_ (0), 00036 scheduling_strategy_(0), 00037 consumer_reconnect_ (attr.consumer_reconnect), 00038 supplier_reconnect_ (attr.supplier_reconnect), 00039 disconnect_callbacks_ (attr.disconnect_callbacks), 00040 consumer_control_ (0), 00041 supplier_control_ (0), 00042 status_ (EC_S_IDLE) 00043 { 00044 this->scheduler_ = 00045 CORBA::Object::_duplicate (attr.scheduler); 00046 }
void TAO_EC_Event_Channel_Base::activate | ( | void | ) | [virtual] |
Start the internal threads (if any), etc. After this call the EC can be used.
Definition at line 112 of file EC_Event_Channel_Base.cpp.
References ACE_ASSERT, ACE_GUARD, TAO_EC_SupplierControl::activate(), TAO_EC_ConsumerControl::activate(), TAO_EC_Timeout_Generator::activate(), TAO_EC_Dispatching::activate(), consumer_control_, dispatching_, EC_S_ACTIVATING, EC_S_ACTIVE, EC_S_IDLE, status_, supplier_control_, TAO_SYNCH_MUTEX, and timeout_generator_.
00113 { 00114 { 00115 // First check if the EC is idle, if it is not then we need to 00116 // return right away... 00117 ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); 00118 if (this->status_ != EC_S_IDLE) 00119 return; 00120 this->status_ = EC_S_ACTIVATING; 00121 } 00122 this->dispatching_->activate (); 00123 this->timeout_generator_->activate (); 00124 this->consumer_control_->activate (); 00125 this->supplier_control_->activate (); 00126 { 00127 // Only when all the operations complete successfully we can mark 00128 // the EC as active... 00129 ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); 00130 ACE_ASSERT (this->status_ == EC_S_ACTIVATING); 00131 this->status_ = EC_S_ACTIVE; 00132 } 00133 }
RtecEventChannelAdmin::Observer_Handle TAO_EC_Event_Channel_Base::append_observer | ( | RtecEventChannelAdmin::Observer_ptr | ) | [virtual] |
Definition at line 268 of file EC_Event_Channel_Base.cpp.
References TAO_EC_ObserverStrategy::append_observer(), and observer_strategy_.
00270 { 00271 return this->observer_strategy_->append_observer (observer); 00272 }
void TAO_EC_Event_Channel_Base::connected | ( | TAO_EC_ProxyPushSupplier * | ) | [virtual] |
Used to inform the EC that a Supplier has connected or disconnected from it.
Definition at line 226 of file EC_Event_Channel_Base.cpp.
References TAO_EC_ObserverStrategy::connected(), TAO_ESF_Proxy_Admin< EVENT_CHANNEL, PROXY, INTERFACE >::connected(), consumer_admin_, observer_strategy_, TAO_ESF_Peer_Admin< EVENT_CHANNEL, PROXY, INTERFACE, PEER >::peer_connected(), and supplier_admin_.
00227 { 00228 this->supplier_admin_->peer_connected (supplier); 00229 this->consumer_admin_->connected (supplier); 00230 this->observer_strategy_->connected (supplier); 00231 }
void TAO_EC_Event_Channel_Base::connected | ( | TAO_EC_ProxyPushConsumer * | ) | [virtual] |
Used to inform the EC that a Consumer has connected or disconnected from it.
Definition at line 202 of file EC_Event_Channel_Base.cpp.
References TAO_EC_ObserverStrategy::connected(), TAO_ESF_Proxy_Admin< EVENT_CHANNEL, PROXY, INTERFACE >::connected(), consumer_admin_, observer_strategy_, TAO_ESF_Peer_Admin< EVENT_CHANNEL, PROXY, INTERFACE, PEER >::peer_connected(), and supplier_admin_.
Referenced by TAO_EC_Default_ProxyPushSupplier::connect_push_consumer(), and TAO_EC_Default_ProxyPushConsumer::connect_push_supplier().
00203 { 00204 this->consumer_admin_->peer_connected (consumer); 00205 this->supplier_admin_->connected (consumer); 00206 this->observer_strategy_->connected (consumer); 00207 }
ACE_INLINE TAO_EC_ConsumerAdmin * TAO_EC_Event_Channel_Base::consumer_admin | ( | void | ) | const |
Access the consumer admin implementation, useful for controlling the activation...
Definition at line 56 of file EC_Event_Channel_Base.inl.
References consumer_admin_.
00057 { 00058 return this->consumer_admin_; 00059 }
ACE_INLINE TAO_EC_ConsumerControl * TAO_EC_Event_Channel_Base::consumer_control | ( | void | ) | const |
Access the client control strategies.
Definition at line 80 of file EC_Event_Channel_Base.inl.
References consumer_control_.
Referenced by TAO_EC_ProxyPushSupplier::reactive_push_to_consumer().
00081 { 00082 return this->consumer_control_; 00083 }
ACE_INLINE PortableServer::POA_ptr TAO_EC_Event_Channel_Base::consumer_poa | ( | void | ) |
Definition at line 146 of file EC_Event_Channel_Base.inl.
Referenced by deactivate_consumer_admin().
ACE_INLINE int TAO_EC_Event_Channel_Base::consumer_reconnect | ( | void | ) | const |
Can the consumers reconnect to the EC?
Definition at line 176 of file EC_Event_Channel_Base.inl.
References consumer_reconnect_.
00177 { 00178 return this->consumer_reconnect_; 00179 }
ACE_INLINE ACE_Lock * TAO_EC_Event_Channel_Base::create_consumer_lock | ( | void | ) |
Locking strategies for the ProxyPushConsumer and ProxyPushSupplier objects
Definition at line 152 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::create_consumer_lock(), and factory_.
00153 { 00154 return this->factory_->create_consumer_lock (); 00155 }
ACE_INLINE void TAO_EC_Event_Channel_Base::create_proxy | ( | TAO_EC_ProxyPushConsumer *& | ) |
Create and destroy a ProxyPushConsumer.
Definition at line 104 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::create_proxy_push_consumer(), and factory_.
00105 { 00106 x = this->factory_->create_proxy_push_consumer (this); 00107 }
ACE_INLINE void TAO_EC_Event_Channel_Base::create_proxy | ( | TAO_EC_ProxyPushSupplier *& | ) |
Create and destroy a ProxyPushSupplier.
Definition at line 92 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::create_proxy_push_supplier(), and factory_.
00093 { 00094 x = this->factory_->create_proxy_push_supplier (this); 00095 }
ACE_INLINE void TAO_EC_Event_Channel_Base::create_proxy_collection | ( | TAO_EC_ProxyPushConsumer_Collection *& | ) |
Create and destroy a the collections used to store ProxyPushConsumers
Definition at line 116 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::create_proxy_push_consumer_collection(), and factory_.
00117 { 00118 x = this->factory_->create_proxy_push_consumer_collection (this); 00119 }
ACE_INLINE void TAO_EC_Event_Channel_Base::create_proxy_collection | ( | TAO_EC_ProxyPushSupplier_Collection *& | ) |
Create and destroy a the collections used to store ProxyPushSuppliers
Definition at line 128 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::create_proxy_push_supplier_collection(), and factory_.
00129 { 00130 x = this->factory_->create_proxy_push_supplier_collection (this); 00131 }
void TAO_EC_Event_Channel_Base::create_strategies | ( | void | ) | [protected] |
Create all strategies
Definition at line 85 of file EC_Event_Channel_Base.cpp.
References consumer_admin_, consumer_control_, TAO_EC_Factory::create_consumer_admin(), TAO_EC_Factory::create_consumer_control(), TAO_EC_Factory::create_dispatching(), TAO_EC_Factory::create_filter_builder(), TAO_EC_Factory::create_observer_strategy(), TAO_EC_Factory::create_scheduling_strategy(), TAO_EC_Factory::create_supplier_admin(), TAO_EC_Factory::create_supplier_control(), TAO_EC_Factory::create_supplier_filter_builder(), TAO_EC_Factory::create_timeout_generator(), dispatching_, factory_, filter_builder_, observer_strategy_, scheduling_strategy_, supplier_admin_, supplier_control_, supplier_filter_builder_, and timeout_generator_.
00086 { 00087 this->dispatching_ = 00088 this->factory_->create_dispatching (this); 00089 this->filter_builder_ = 00090 this->factory_->create_filter_builder (this); 00091 this->supplier_filter_builder_ = 00092 this->factory_->create_supplier_filter_builder (this); 00093 this->consumer_admin_ = 00094 this->factory_->create_consumer_admin (this); 00095 this->supplier_admin_ = 00096 this->factory_->create_supplier_admin (this); 00097 this->timeout_generator_ = 00098 this->factory_->create_timeout_generator (this); 00099 this->observer_strategy_ = 00100 this->factory_->create_observer_strategy (this); 00101 00102 this->scheduling_strategy_ = 00103 this->factory_->create_scheduling_strategy (this); 00104 00105 this->consumer_control_ = 00106 this->factory_->create_consumer_control (this); 00107 this->supplier_control_ = 00108 this->factory_->create_supplier_control (this); 00109 }
ACE_INLINE ACE_Lock * TAO_EC_Event_Channel_Base::create_supplier_lock | ( | void | ) |
Definition at line 164 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::create_supplier_lock(), and factory_.
00165 { 00166 return this->factory_->create_supplier_lock (); 00167 }
void TAO_EC_Event_Channel_Base::deactivate_consumer_admin | ( | void | ) | [protected] |
Helpers. Deactivate admins from their POAs, ignoring any CORBA exceptions.
Definition at line 185 of file EC_Event_Channel_Base.cpp.
References TAO_EC_ConsumerAdmin::_default_POA(), consumer_admin_, and consumer_poa().
Referenced by shutdown().
00186 { 00187 try 00188 { 00189 PortableServer::POA_var consumer_poa = 00190 this->consumer_admin_->_default_POA (); 00191 PortableServer::ObjectId_var consumer_id = 00192 consumer_poa->servant_to_id (this->consumer_admin_); 00193 consumer_poa->deactivate_object (consumer_id.in ()); 00194 } 00195 catch (const CORBA::Exception&) 00196 { 00197 // The deactivation can throw... 00198 } 00199 }
void TAO_EC_Event_Channel_Base::deactivate_supplier_admin | ( | void | ) | [protected] |
Helpers. Deactivate admins from their POAs, ignoring any CORBA exceptions.
Definition at line 168 of file EC_Event_Channel_Base.cpp.
References TAO_EC_SupplierAdmin::_default_POA(), supplier_admin_, and supplier_poa().
Referenced by shutdown().
00169 { 00170 try 00171 { 00172 PortableServer::POA_var supplier_poa = 00173 this->supplier_admin_->_default_POA (); 00174 PortableServer::ObjectId_var supplier_id = 00175 supplier_poa->servant_to_id (this->supplier_admin_); 00176 supplier_poa->deactivate_object (supplier_id.in ()); 00177 } 00178 catch (const CORBA::Exception&) 00179 { 00180 // The deactivation can throw... 00181 } 00182 }
void TAO_EC_Event_Channel_Base::destroy | ( | void | ) | [virtual] |
Commit suicide.
Definition at line 262 of file EC_Event_Channel_Base.cpp.
References shutdown().
00263 { 00264 this->shutdown (); 00265 }
ACE_INLINE void TAO_EC_Event_Channel_Base::destroy_consumer_lock | ( | ACE_Lock * | ) |
Definition at line 158 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::destroy_consumer_lock(), and factory_.
Referenced by TAO_EC_ProxyPushConsumer::~TAO_EC_ProxyPushConsumer().
00159 { 00160 this->factory_->destroy_consumer_lock (x); 00161 }
ACE_INLINE void TAO_EC_Event_Channel_Base::destroy_proxy | ( | TAO_EC_ProxyPushConsumer * | ) |
Definition at line 110 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::destroy_proxy_push_consumer(), and factory_.
00111 { 00112 this->factory_->destroy_proxy_push_consumer (consumer); 00113 }
ACE_INLINE void TAO_EC_Event_Channel_Base::destroy_proxy | ( | TAO_EC_ProxyPushSupplier * | ) |
Definition at line 98 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::destroy_proxy_push_supplier(), and factory_.
Referenced by TAO_EC_ProxyPushSupplier::refcount_zero_hook(), and TAO_EC_ProxyPushConsumer::refcount_zero_hook().
00099 { 00100 this->factory_->destroy_proxy_push_supplier (supplier); 00101 }
ACE_INLINE void TAO_EC_Event_Channel_Base::destroy_proxy_collection | ( | TAO_EC_ProxyPushConsumer_Collection * | ) |
Definition at line 122 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::destroy_proxy_push_consumer_collection(), and factory_.
00123 { 00124 this->factory_->destroy_proxy_push_consumer_collection (x); 00125 }
ACE_INLINE void TAO_EC_Event_Channel_Base::destroy_proxy_collection | ( | TAO_EC_ProxyPushSupplier_Collection * | ) |
Definition at line 134 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::destroy_proxy_push_supplier_collection(), and factory_.
Referenced by TAO_EC_Per_Supplier_Filter::~TAO_EC_Per_Supplier_Filter().
00135 { 00136 this->factory_->destroy_proxy_push_supplier_collection (x); 00137 }
ACE_INLINE void TAO_EC_Event_Channel_Base::destroy_supplier_lock | ( | ACE_Lock * | ) |
Definition at line 170 of file EC_Event_Channel_Base.inl.
References TAO_EC_Factory::destroy_supplier_lock(), and factory_.
Referenced by TAO_EC_ProxyPushSupplier::~TAO_EC_ProxyPushSupplier().
00171 { 00172 this->factory_->destroy_supplier_lock (x); 00173 }
ACE_INLINE int TAO_EC_Event_Channel_Base::destroyed | ( | void | ) |
Return 1 if the event channel is already destroyed.
Definition at line 200 of file EC_Event_Channel_Base.inl.
References ACE_GUARD_RETURN, EC_S_DESTROYED, and TAO_SYNCH_MUTEX.
00201 { 00202 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, 0); 00203 return (this->status_ == EC_S_DESTROYED); 00204 }
ACE_INLINE int TAO_EC_Event_Channel_Base::disconnect_callbacks | ( | void | ) | const |
Should we send callback disconnect messages when a proxy is disconnected by the client
Definition at line 188 of file EC_Event_Channel_Base.inl.
References disconnect_callbacks_.
00189 { 00190 return this->disconnect_callbacks_; 00191 }
void TAO_EC_Event_Channel_Base::disconnected | ( | TAO_EC_ProxyPushSupplier * | ) | [virtual] |
Definition at line 242 of file EC_Event_Channel_Base.cpp.
References consumer_admin_, TAO_EC_ObserverStrategy::disconnected(), TAO_ESF_Proxy_Admin< EVENT_CHANNEL, PROXY, INTERFACE >::disconnected(), observer_strategy_, TAO_ESF_Peer_Admin< EVENT_CHANNEL, PROXY, INTERFACE, PEER >::peer_disconnected(), and supplier_admin_.
00243 { 00244 this->supplier_admin_->peer_disconnected (supplier); 00245 this->consumer_admin_->disconnected (supplier); 00246 this->observer_strategy_->disconnected (supplier); 00247 }
void TAO_EC_Event_Channel_Base::disconnected | ( | TAO_EC_ProxyPushConsumer * | ) | [virtual] |
Definition at line 218 of file EC_Event_Channel_Base.cpp.
References consumer_admin_, TAO_EC_ObserverStrategy::disconnected(), TAO_ESF_Proxy_Admin< EVENT_CHANNEL, PROXY, INTERFACE >::disconnected(), observer_strategy_, TAO_ESF_Peer_Admin< EVENT_CHANNEL, PROXY, INTERFACE, PEER >::peer_disconnected(), and supplier_admin_.
Referenced by TAO_EC_Default_ProxyPushConsumer::disconnect_push_consumer(), and TAO_EC_Default_ProxyPushSupplier::disconnect_push_supplier().
00219 { 00220 this->consumer_admin_->peer_disconnected (consumer); 00221 this->supplier_admin_->disconnected (consumer); 00222 this->observer_strategy_->disconnected (consumer); 00223 }
ACE_INLINE TAO_EC_Dispatching * TAO_EC_Event_Channel_Base::dispatching | ( | void | ) | const |
Access the dispatching module....
Definition at line 38 of file EC_Event_Channel_Base.inl.
References dispatching_.
Referenced by TAO_EC_ProxyPushSupplier::push(), TAO_EC_ProxyPushSupplier::push_nocopy(), TAO_EC_TPC_ProxyPushSupplier::tpc_dispatching(), and TAO_EC_TPC_ProxyPushConsumer::tpc_dispatching().
00039 { 00040 return this->dispatching_; 00041 }
ACE_INLINE void TAO_EC_Event_Channel_Base::factory | ( | TAO_EC_Factory * | factory, | |
int | own_factory = 0 | |||
) | [protected] |
Set the factory, if own_factory is not 0 it assumes ownership of the factory.
Definition at line 27 of file EC_Event_Channel_Base.inl.
References factory(), factory_, and own_factory_.
00029 { 00030 if (this->own_factory_) 00031 delete this->factory_; 00032 00033 this->factory_ = factory; 00034 this->own_factory_ = own_factory; 00035 }
ACE_INLINE TAO_EC_Factory * TAO_EC_Event_Channel_Base::factory | ( | void | ) | const [protected] |
Get the factory.
Definition at line 21 of file EC_Event_Channel_Base.inl.
References factory_.
Referenced by factory(), and ~TAO_EC_Event_Channel_Base().
00022 { 00023 return this->factory_; 00024 }
ACE_INLINE TAO_EC_Filter_Builder * TAO_EC_Event_Channel_Base::filter_builder | ( | void | ) | const |
Access the filter builder....
Definition at line 44 of file EC_Event_Channel_Base.inl.
References filter_builder_.
Referenced by TAO_EC_Default_ProxyPushSupplier::connect_push_consumer().
00045 { 00046 return this->filter_builder_; 00047 }
RtecEventChannelAdmin::ConsumerAdmin_ptr TAO_EC_Event_Channel_Base::for_consumers | ( | void | ) | [virtual] |
The default implementation is: this->consumer_admin ()->_this ();
Definition at line 250 of file EC_Event_Channel_Base.cpp.
References consumer_admin_.
00251 { 00252 return this->consumer_admin_->_this (); 00253 }
void TAO_EC_Event_Channel_Base::for_each_consumer | ( | TAO_ESF_Worker< TAO_EC_ProxyPushSupplier > * | worker | ) | [virtual] |
Definition at line 282 of file EC_Event_Channel_Base.cpp.
References consumer_admin_, and TAO_ESF_Proxy_Admin< EVENT_CHANNEL, PROXY, INTERFACE >::for_each().
Referenced by TAO_EC_Basic_ObserverStrategy::fill_qos(), TAO_EC_Trivial_Supplier_Filter::push_scheduled_event(), and TAO_EC_Reactive_ConsumerControl::query_consumers().
00284 { 00285 this->consumer_admin_->for_each (worker); 00286 }
void TAO_EC_Event_Channel_Base::for_each_supplier | ( | TAO_ESF_Worker< TAO_EC_ProxyPushConsumer > * | worker | ) | [virtual] |
Definition at line 289 of file EC_Event_Channel_Base.cpp.
References TAO_ESF_Proxy_Admin< EVENT_CHANNEL, PROXY, INTERFACE >::for_each(), and supplier_admin_.
Referenced by TAO_EC_Basic_ObserverStrategy::fill_qos(), and TAO_EC_Reactive_SupplierControl::query_suppliers().
00291 { 00292 this->supplier_admin_->for_each (worker); 00293 }
RtecEventChannelAdmin::SupplierAdmin_ptr TAO_EC_Event_Channel_Base::for_suppliers | ( | void | ) | [virtual] |
The default implementation is: this->supplier_admin ()->_this ();
Definition at line 256 of file EC_Event_Channel_Base.cpp.
References supplier_admin_.
00257 { 00258 return this->supplier_admin_->_this (); 00259 }
void TAO_EC_Event_Channel_Base::reconnected | ( | TAO_EC_ProxyPushSupplier * | ) | [virtual] |
Definition at line 234 of file EC_Event_Channel_Base.cpp.
References TAO_EC_ObserverStrategy::connected(), consumer_admin_, observer_strategy_, TAO_ESF_Peer_Admin< EVENT_CHANNEL, PROXY, INTERFACE, PEER >::peer_reconnected(), TAO_ESF_Proxy_Admin< EVENT_CHANNEL, PROXY, INTERFACE >::reconnected(), and supplier_admin_.
00235 { 00236 this->supplier_admin_->peer_reconnected (supplier); 00237 this->consumer_admin_->reconnected (supplier); 00238 this->observer_strategy_->connected (supplier); 00239 }
void TAO_EC_Event_Channel_Base::reconnected | ( | TAO_EC_ProxyPushConsumer * | ) | [virtual] |
Definition at line 210 of file EC_Event_Channel_Base.cpp.
References TAO_EC_ObserverStrategy::connected(), consumer_admin_, observer_strategy_, TAO_ESF_Peer_Admin< EVENT_CHANNEL, PROXY, INTERFACE, PEER >::peer_reconnected(), TAO_ESF_Proxy_Admin< EVENT_CHANNEL, PROXY, INTERFACE >::reconnected(), and supplier_admin_.
Referenced by TAO_EC_Default_ProxyPushSupplier::connect_push_consumer(), and TAO_EC_Default_ProxyPushConsumer::connect_push_supplier().
00211 { 00212 this->consumer_admin_->peer_reconnected (consumer); 00213 this->supplier_admin_->reconnected (consumer); 00214 this->observer_strategy_->connected (consumer); 00215 }
void TAO_EC_Event_Channel_Base::remove_observer | ( | RtecEventChannelAdmin::Observer_Handle | ) | [virtual] |
Definition at line 275 of file EC_Event_Channel_Base.cpp.
References observer_strategy_, and TAO_EC_ObserverStrategy::remove_observer().
00277 { 00278 this->observer_strategy_->remove_observer (handle); 00279 }
ACE_INLINE CORBA::Object_ptr TAO_EC_Event_Channel_Base::scheduler | ( | void | ) |
Obtain the scheduler, the user must release.
Definition at line 194 of file EC_Event_Channel_Base.inl.
References CORBA::Object::_duplicate().
Referenced by TAO_EC_Sched_Filter_Builder::build(), TAO_EC_Kokyu_Filter_Builder::build(), TAO_EC_Sched_Factory::create_scheduling_strategy(), and TAO_EC_Kokyu_Factory::create_scheduling_strategy().
00195 { 00196 return CORBA::Object::_duplicate (this->scheduler_.in ()); 00197 }
ACE_INLINE TAO_EC_Scheduling_Strategy * TAO_EC_Event_Channel_Base::scheduling_strategy | ( | void | ) | const |
Access the scheduling strategy.
Definition at line 74 of file EC_Event_Channel_Base.inl.
References scheduling_strategy_.
Referenced by TAO_EC_ProxyPushSupplier::connected(), TAO_EC_Trivial_Supplier_Filter::push(), TAO_EC_Per_Supplier_Filter::push(), and TAO_EC_ProxyPushSupplier::reconnected().
00075 { 00076 return this->scheduling_strategy_; 00077 }
void TAO_EC_Event_Channel_Base::shutdown | ( | void | ) | [virtual] |
Shutdown any internal threads, cleanup all the internal structures, flush all the messages, etc.
Definition at line 136 of file EC_Event_Channel_Base.cpp.
References ACE_ASSERT, ACE_GUARD, consumer_admin_, consumer_control_, deactivate_consumer_admin(), deactivate_supplier_admin(), dispatching_, EC_S_ACTIVE, EC_S_DESTROYED, EC_S_DESTROYING, TAO_ESF_Proxy_Admin< EVENT_CHANNEL, PROXY, INTERFACE >::shutdown(), TAO_EC_ConsumerControl::shutdown(), TAO_EC_SupplierControl::shutdown(), TAO_EC_Timeout_Generator::shutdown(), TAO_EC_Dispatching::shutdown(), status_, supplier_admin_, supplier_control_, TAO_SYNCH_MUTEX, and timeout_generator_.
Referenced by destroy().
00137 { 00138 { 00139 // First check if the EC is already active, if it is not then we 00140 // need to return right away... 00141 ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); 00142 if (this->status_ != EC_S_ACTIVE) 00143 return; 00144 this->status_ = EC_S_DESTROYING; 00145 } 00146 this->dispatching_->shutdown (); 00147 this->timeout_generator_->shutdown (); 00148 this->supplier_control_->shutdown (); 00149 this->consumer_control_->shutdown (); 00150 00151 this->deactivate_supplier_admin (); 00152 this->deactivate_consumer_admin (); 00153 00154 this->supplier_admin_->shutdown (); 00155 00156 this->consumer_admin_->shutdown (); 00157 00158 { 00159 // Wait until all the shutdown() operations return before marking 00160 // the EC as destroyed... 00161 ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); 00162 ACE_ASSERT (this->status_ == EC_S_DESTROYING); 00163 this->status_ = EC_S_DESTROYED; 00164 } 00165 }
ACE_INLINE TAO_EC_SupplierAdmin * TAO_EC_Event_Channel_Base::supplier_admin | ( | void | ) | const |
Access the supplier admin implementation, useful for controlling the activation...
Definition at line 62 of file EC_Event_Channel_Base.inl.
References supplier_admin_.
00063 { 00064 return this->supplier_admin_; 00065 }
ACE_INLINE TAO_EC_SupplierControl * TAO_EC_Event_Channel_Base::supplier_control | ( | void | ) | const |
Definition at line 86 of file EC_Event_Channel_Base.inl.
References supplier_control_.
00087 { 00088 return this->supplier_control_; 00089 }
ACE_INLINE TAO_EC_Supplier_Filter_Builder * TAO_EC_Event_Channel_Base::supplier_filter_builder | ( | void | ) | const |
Access the filter builder....
Definition at line 50 of file EC_Event_Channel_Base.inl.
References supplier_filter_builder_.
Referenced by TAO_EC_Per_Supplier_Filter::_decr_refcnt(), and TAO_EC_Default_ProxyPushConsumer::connect_push_supplier().
00051 { 00052 return this->supplier_filter_builder_; 00053 }
ACE_INLINE PortableServer::POA_ptr TAO_EC_Event_Channel_Base::supplier_poa | ( | void | ) |
Access the supplier and consumer POAs from the factory.
Definition at line 140 of file EC_Event_Channel_Base.inl.
Referenced by deactivate_supplier_admin().
ACE_INLINE int TAO_EC_Event_Channel_Base::supplier_reconnect | ( | void | ) | const |
Can the suppliers reconnect to the EC?
Definition at line 182 of file EC_Event_Channel_Base.inl.
References supplier_reconnect_.
00183 { 00184 return this->supplier_reconnect_; 00185 }
ACE_INLINE TAO_EC_Timeout_Generator * TAO_EC_Event_Channel_Base::timeout_generator | ( | void | ) | const |
Access the timer module...
Definition at line 68 of file EC_Event_Channel_Base.inl.
References timeout_generator_.
Referenced by TAO_EC_Timeout_Filter::clear(), and TAO_EC_Timeout_Filter::~TAO_EC_Timeout_Filter().
00069 { 00070 return this->timeout_generator_; 00071 }
The ConsumerAdmin implementation.
Definition at line 300 of file EC_Event_Channel_Base.h.
Referenced by connected(), consumer_admin(), create_strategies(), deactivate_consumer_admin(), disconnected(), for_consumers(), for_each_consumer(), reconnected(), shutdown(), and ~TAO_EC_Event_Channel_Base().
Strategies to disconnect misbehaving or destroyed consumers.
Definition at line 327 of file EC_Event_Channel_Base.h.
Referenced by activate(), consumer_control(), create_strategies(), shutdown(), and ~TAO_EC_Event_Channel_Base().
Definition at line 278 of file EC_Event_Channel_Base.h.
int TAO_EC_Event_Channel_Base::consumer_reconnect_ [protected] |
Consumer reconnection flags.
Definition at line 318 of file EC_Event_Channel_Base.h.
Referenced by consumer_reconnect().
int TAO_EC_Event_Channel_Base::disconnect_callbacks_ [protected] |
If not zero we send callbacks when a proxy is disconnected.
Definition at line 324 of file EC_Event_Channel_Base.h.
Referenced by disconnect_callbacks().
The dispatching "module".
Definition at line 291 of file EC_Event_Channel_Base.h.
Referenced by activate(), create_strategies(), dispatching(), shutdown(), and ~TAO_EC_Event_Channel_Base().
TAO_EC_Factory* TAO_EC_Event_Channel_Base::factory_ [protected] |
This is the abstract factory that creates all the objects that compose an event channel, the event channel simply acts as a Mediator among them.
Definition at line 285 of file EC_Event_Channel_Base.h.
Referenced by create_consumer_lock(), create_proxy(), create_proxy_collection(), create_strategies(), create_supplier_lock(), destroy_consumer_lock(), destroy_proxy(), destroy_proxy_collection(), destroy_supplier_lock(), factory(), and ~TAO_EC_Event_Channel_Base().
The filter builder.
Definition at line 294 of file EC_Event_Channel_Base.h.
Referenced by create_strategies(), filter_builder(), and ~TAO_EC_Event_Channel_Base().
TAO_SYNCH_MUTEX TAO_EC_Event_Channel_Base::mutex_ [protected] |
The observer strategy.
Definition at line 309 of file EC_Event_Channel_Base.h.
Referenced by append_observer(), connected(), create_strategies(), disconnected(), reconnected(), remove_observer(), and ~TAO_EC_Event_Channel_Base().
int TAO_EC_Event_Channel_Base::own_factory_ [protected] |
Flag that indicates if we own the factory.
Definition at line 288 of file EC_Event_Channel_Base.h.
Referenced by factory().
The scheduling strategy.
Definition at line 315 of file EC_Event_Channel_Base.h.
Referenced by create_strategies(), scheduling_strategy(), and ~TAO_EC_Event_Channel_Base().
int TAO_EC_Event_Channel_Base::status_ [protected] |
The SupplierAdmin implementation.
Definition at line 303 of file EC_Event_Channel_Base.h.
Referenced by connected(), create_strategies(), deactivate_supplier_admin(), disconnected(), for_each_supplier(), for_suppliers(), reconnected(), shutdown(), supplier_admin(), and ~TAO_EC_Event_Channel_Base().
Strategies to disconnect misbehaving or destroyed suppliers.
Definition at line 330 of file EC_Event_Channel_Base.h.
Referenced by activate(), create_strategies(), shutdown(), supplier_control(), and ~TAO_EC_Event_Channel_Base().
The filter builder for suppliers.
Definition at line 297 of file EC_Event_Channel_Base.h.
Referenced by create_strategies(), supplier_filter_builder(), and ~TAO_EC_Event_Channel_Base().
The POAs used to activate "supplier-side" and "consumer-side" objects.
Definition at line 277 of file EC_Event_Channel_Base.h.
int TAO_EC_Event_Channel_Base::supplier_reconnect_ [protected] |
Supplier reconnection flags.
Definition at line 321 of file EC_Event_Channel_Base.h.
Referenced by supplier_reconnect().
The timeout generator.
Definition at line 306 of file EC_Event_Channel_Base.h.
Referenced by activate(), create_strategies(), shutdown(), timeout_generator(), and ~TAO_EC_Event_Channel_Base().