TAO_EC_Event_Channel_Base Class Reference

The RtecEventChannelAdmin::EventChannel implementation. More...

#include <EC_Event_Channel_Base.h>

Inheritance diagram for TAO_EC_Event_Channel_Base:

Inheritance graph
[legend]
Collaboration diagram for TAO_EC_Event_Channel_Base:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~TAO_EC_Event_Channel_Base (void)
 destructor

virtual void activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
virtual void for_each_consumer (TAO_ESF_Worker< TAO_EC_ProxyPushSupplier > *worker ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
virtual void for_each_supplier (TAO_ESF_Worker< TAO_EC_ProxyPushConsumer > *worker ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
TAO_EC_Dispatchingdispatching (void) const
 Access the dispatching module....

TAO_EC_Filter_Builderfilter_builder (void) const
 Access the filter builder....

TAO_EC_Supplier_Filter_Buildersupplier_filter_builder (void) const
 Access the filter builder....

TAO_EC_ConsumerAdminconsumer_admin (void) const
TAO_EC_SupplierAdminsupplier_admin (void) const
TAO_EC_Timeout_Generatortimeout_generator (void) const
 Access the timer module...

TAO_EC_Scheduling_Strategyscheduling_strategy (void) const
 Access the scheduling strategy.

TAO_EC_ConsumerControlconsumer_control (void) const
 Access the client control strategies.

TAO_EC_SupplierControlsupplier_control (void) const
void create_proxy (TAO_EC_ProxyPushSupplier *&)
 Create and destroy a ProxyPushSupplier.

void destroy_proxy (TAO_EC_ProxyPushSupplier *)
void create_proxy (TAO_EC_ProxyPushConsumer *&)
 Create and destroy a ProxyPushConsumer.

void destroy_proxy (TAO_EC_ProxyPushConsumer *)
void create_proxy_collection (TAO_EC_ProxyPushSupplier_Collection *&)
void destroy_proxy_collection (TAO_EC_ProxyPushSupplier_Collection *)
void create_proxy_collection (TAO_EC_ProxyPushConsumer_Collection *&)
void destroy_proxy_collection (TAO_EC_ProxyPushConsumer_Collection *)
PortableServer::POA_ptr supplier_poa (void)
 Access the supplier and consumer POAs from the factory.

PortableServer::POA_ptr consumer_poa (void)
ACE_Lockcreate_consumer_lock (void)
void destroy_consumer_lock (ACE_Lock *)
ACE_Lockcreate_supplier_lock (void)
void destroy_supplier_lock (ACE_Lock *)
virtual void connected (TAO_EC_ProxyPushConsumer *ACE_ENV_ARG_DECL_NOT_USED)
virtual void reconnected (TAO_EC_ProxyPushConsumer *ACE_ENV_ARG_DECL_NOT_USED)
virtual void disconnected (TAO_EC_ProxyPushConsumer *ACE_ENV_ARG_DECL_NOT_USED)
virtual void connected (TAO_EC_ProxyPushSupplier *ACE_ENV_ARG_DECL_NOT_USED)
virtual void reconnected (TAO_EC_ProxyPushSupplier *ACE_ENV_ARG_DECL_NOT_USED)
virtual void disconnected (TAO_EC_ProxyPushSupplier *ACE_ENV_ARG_DECL_NOT_USED)
int consumer_reconnect (void) const
 Can the consumers reconnect to the EC?

int supplier_reconnect (void) const
 Can the suppliers reconnect to the EC?

int disconnect_callbacks (void) const
CORBA::Object_ptr scheduler (void)
 Obtain the scheduler, the user must release.

virtual RtecEventChannelAdmin::ConsumerAdmin_ptr for_consumers (ACE_ENV_SINGLE_ARG_DECL) throw (CORBA::SystemException)
virtual RtecEventChannelAdmin::SupplierAdmin_ptr for_suppliers (ACE_ENV_SINGLE_ARG_DECL) throw (CORBA::SystemException)
virtual void destroy (ACE_ENV_SINGLE_ARG_DECL) throw (CORBA::SystemException)
 Commit suicide.

virtual RtecEventChannelAdmin::Observer_Handle append_observer (RtecEventChannelAdmin::Observer_ptr ACE_ENV_ARG_DECL) throw ( CORBA::SystemException, RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER)
virtual void remove_observer (RtecEventChannelAdmin::Observer_Handle ACE_ENV_ARG_DECL) throw ( CORBA::SystemException, RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER)
int destroyed (void)
 Return 1 if the event channel is already destroyed.


Protected Types

enum  {
  EC_S_IDLE, EC_S_ACTIVATING, EC_S_ACTIVE, EC_S_DESTROYING,
  EC_S_DESTROYED
}
 Flag to track the status of the event channel. More...


Protected Member Functions

 TAO_EC_Event_Channel_Base (const TAO_EC_Event_Channel_Attributes &attributes, TAO_EC_Factory *factory=0, int own_factory=0)
TAO_EC_Factoryfactory (void) const
void factory (TAO_EC_Factory *factory, int own_factory=0)
void create_strategies (void)
void deactivate_supplier_admin (void)
void deactivate_consumer_admin (void)

Protected Attributes

PortableServer::POA_var supplier_poa_
PortableServer::POA_var consumer_poa_
TAO_EC_Factoryfactory_
int own_factory_
 Flag that indicates if we own the factory.

TAO_EC_Dispatchingdispatching_
 The dispatching "module".

TAO_EC_Filter_Builderfilter_builder_
 The filter builder.

TAO_EC_Supplier_Filter_Buildersupplier_filter_builder_
 The filter builder for suppliers.

TAO_EC_ConsumerAdminconsumer_admin_
 The ConsumerAdmin implementation.

TAO_EC_SupplierAdminsupplier_admin_
 The SupplierAdmin implementation.

TAO_EC_Timeout_Generatortimeout_generator_
 The timeout generator.

TAO_EC_ObserverStrategyobserver_strategy_
 The observer strategy.

CORBA::Object_var scheduler_
 The scheduler (may be nil).

TAO_EC_Scheduling_Strategyscheduling_strategy_
 The scheduling strategy.

int consumer_reconnect_
 Consumer reconnection flags.

int supplier_reconnect_
 Supplier reconnection flags.

int disconnect_callbacks_
 If not zero we send callbacks when a proxy is disconnected.

TAO_EC_ConsumerControlconsumer_control_
 Strategies to disconnect misbehaving or destroyed consumers.

TAO_EC_SupplierControlsupplier_control_
 Strategies to disconnect misbehaving or destroyed suppliers.

TAO_SYNCH_MUTEX mutex_
 Mutex to protect the internal state.

int status_

Detailed Description

The RtecEventChannelAdmin::EventChannel implementation.

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.


Member Enumeration Documentation

anonymous enum [protected]
 

Flag to track the status of the event channel.

Enumeration values:
EC_S_IDLE 
EC_S_ACTIVATING 
EC_S_ACTIVE 
EC_S_DESTROYING 
EC_S_DESTROYED 

Definition at line 359 of file EC_Event_Channel_Base.h.

00359        {
00360     EC_S_IDLE
00361     , EC_S_ACTIVATING
00362     , EC_S_ACTIVE
00363     , EC_S_DESTROYING
00364     , EC_S_DESTROYED
00365   };


Constructor & Destructor Documentation

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_, 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(), factory(), filter_builder_, observer_strategy_, supplier_admin_, 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(), TAO_EC_Event_Channel_Attributes::scheduler, and scheduler_.

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 }


Member Function Documentation

virtual void TAO_EC_Event_Channel_Base::activate ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  [virtual]
 

Start the internal threads (if any), etc. After this call the EC can be used.

RtecEventChannelAdmin::Observer_Handle TAO_EC_Event_Channel_Base::append_observer RtecEventChannelAdmin::Observer_ptr  ACE_ENV_ARG_DECL  )  throw ( CORBA::SystemException, RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER) [virtual]
 

Definition at line 306 of file EC_Event_Channel_Base.cpp.

References ACE_ENV_ARG_PARAMETER.

00313 {
00314   return this->observer_strategy_->append_observer (observer
00315                                                     ACE_ENV_ARG_PARAMETER);
00316 }

void TAO_EC_Event_Channel_Base::connected TAO_EC_ProxyPushSupplier ACE_ENV_ARG_DECL_NOT_USED  )  [virtual]
 

Used to inform the EC that a Supplier has connected or disconnected from it.

Definition at line 249 of file EC_Event_Channel_Base.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, TAO_EC_ObserverStrategy::connected(), consumer_admin_, observer_strategy_, and supplier_admin_.

00251 {
00252   this->supplier_admin_->peer_connected (supplier ACE_ENV_ARG_PARAMETER);
00253   ACE_CHECK;
00254   this->consumer_admin_->connected (supplier ACE_ENV_ARG_PARAMETER);
00255   ACE_CHECK;
00256   this->observer_strategy_->connected (supplier ACE_ENV_ARG_PARAMETER);
00257   ACE_CHECK;
00258 }

void TAO_EC_Event_Channel_Base::connected TAO_EC_ProxyPushConsumer ACE_ENV_ARG_DECL_NOT_USED  )  [virtual]
 

Used to inform the EC that a Consumer has connected or disconnected from it.

Definition at line 213 of file EC_Event_Channel_Base.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, TAO_EC_ObserverStrategy::connected(), consumer_admin_, observer_strategy_, and supplier_admin_.

00215 {
00216   this->consumer_admin_->peer_connected (consumer ACE_ENV_ARG_PARAMETER);
00217   ACE_CHECK;
00218   this->supplier_admin_->connected (consumer ACE_ENV_ARG_PARAMETER);
00219   ACE_CHECK;
00220   this->observer_strategy_->connected (consumer ACE_ENV_ARG_PARAMETER);
00221   ACE_CHECK;
00222 }

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.i.

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.i.

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.i.

Referenced by TAO_EC_ProxyPushConsumer::TAO_EC_ProxyPushConsumer().

00147 {
00148   return PortableServer::POA::_duplicate (this->consumer_poa_.in ());
00149 }

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.i.

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.i.

References TAO_EC_Factory::create_consumer_lock().

Referenced by TAO_EC_ProxyPushConsumer::TAO_EC_ProxyPushConsumer().

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.i.

References TAO_EC_Factory::create_proxy_push_consumer().

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.i.

References TAO_EC_Factory::create_proxy_push_supplier().

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.i.

References TAO_EC_Factory::create_proxy_push_consumer_collection(), and TAO_EC_ProxyPushConsumer_Collection.

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.i.

References TAO_EC_Factory::create_proxy_push_supplier_collection(), and TAO_EC_ProxyPushSupplier_Collection.

Referenced by TAO_EC_Per_Supplier_Filter::TAO_EC_Per_Supplier_Filter().

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_, 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(), filter_builder_, observer_strategy_, supplier_admin_, supplier_filter_builder_, and timeout_generator_.

Referenced by TAO_EC_Event_Channel::TAO_EC_Event_Channel().

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.i.

References TAO_EC_Factory::create_supplier_lock().

Referenced by TAO_EC_ProxyPushSupplier::TAO_EC_ProxyPushSupplier().

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 192 of file EC_Event_Channel_Base.cpp.

References TAO_EC_ConsumerAdmin::_default_POA, ACE_CATCHANY, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_TRY_CHECK, ACE_TRY_NEW_ENV, and consumer_admin_.

00193 {
00194   ACE_TRY_NEW_ENV
00195     {
00196       PortableServer::POA_var consumer_poa =
00197         this->consumer_admin_->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
00198       ACE_TRY_CHECK;
00199       PortableServer::ObjectId_var consumer_id =
00200         consumer_poa->servant_to_id (this->consumer_admin_ ACE_ENV_ARG_PARAMETER);
00201       ACE_TRY_CHECK;
00202       consumer_poa->deactivate_object (consumer_id.in () ACE_ENV_ARG_PARAMETER);
00203       ACE_TRY_CHECK;
00204     }
00205   ACE_CATCHANY
00206     {
00207             // The deactivation can throw...
00208     }
00209   ACE_ENDTRY;
00210 }

void TAO_EC_Event_Channel_Base::deactivate_supplier_admin void   )  [protected]
 

Helpers. Deactivate admins from their POAs, ignoring any CORBA exceptions.

Definition at line 170 of file EC_Event_Channel_Base.cpp.

References TAO_EC_SupplierAdmin::_default_POA, ACE_CATCHANY, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_TRY, ACE_TRY_CHECK, and supplier_admin_.

00171 {
00172   ACE_DECLARE_NEW_CORBA_ENV;
00173   ACE_TRY
00174     {
00175       PortableServer::POA_var supplier_poa =
00176         this->supplier_admin_->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
00177       ACE_TRY_CHECK;
00178       PortableServer::ObjectId_var supplier_id =
00179         supplier_poa->servant_to_id (this->supplier_admin_ ACE_ENV_ARG_PARAMETER);
00180       ACE_TRY_CHECK;
00181       supplier_poa->deactivate_object (supplier_id.in () ACE_ENV_ARG_PARAMETER);
00182       ACE_TRY_CHECK;
00183     }
00184   ACE_CATCHANY
00185     {
00186             // The deactivation can throw...
00187     }
00188   ACE_ENDTRY;
00189 }

virtual void TAO_EC_Event_Channel_Base::destroy ACE_ENV_SINGLE_ARG_DECL   )  throw (CORBA::SystemException) [virtual]
 

Commit suicide.

ACE_INLINE void TAO_EC_Event_Channel_Base::destroy_consumer_lock ACE_Lock  ) 
 

Definition at line 158 of file EC_Event_Channel_Base.i.

References TAO_EC_Factory::destroy_consumer_lock().

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.i.

References TAO_EC_Factory::destroy_proxy_push_consumer().

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.i.

References TAO_EC_Factory::destroy_proxy_push_supplier().

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.i.

References TAO_EC_Factory::destroy_proxy_push_consumer_collection(), and TAO_EC_ProxyPushConsumer_Collection.

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.i.

References TAO_EC_Factory::destroy_proxy_push_supplier_collection(), and TAO_EC_ProxyPushSupplier_Collection.

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.i.

References TAO_EC_Factory::destroy_supplier_lock().

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.i.

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.i.

References disconnect_callbacks_.

00189 {
00190   return this->disconnect_callbacks_;
00191 }

void TAO_EC_Event_Channel_Base::disconnected TAO_EC_ProxyPushSupplier ACE_ENV_ARG_DECL_NOT_USED  )  [virtual]
 

Definition at line 273 of file EC_Event_Channel_Base.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, consumer_admin_, TAO_EC_ObserverStrategy::disconnected(), observer_strategy_, and supplier_admin_.

00275 {
00276   this->supplier_admin_->peer_disconnected (supplier ACE_ENV_ARG_PARAMETER);
00277   ACE_CHECK;
00278   this->consumer_admin_->disconnected (supplier ACE_ENV_ARG_PARAMETER);
00279   ACE_CHECK;
00280   this->observer_strategy_->disconnected (supplier ACE_ENV_ARG_PARAMETER);
00281   ACE_CHECK;
00282 }

void TAO_EC_Event_Channel_Base::disconnected TAO_EC_ProxyPushConsumer ACE_ENV_ARG_DECL_NOT_USED  )  [virtual]
 

Definition at line 237 of file EC_Event_Channel_Base.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, consumer_admin_, TAO_EC_ObserverStrategy::disconnected(), observer_strategy_, and supplier_admin_.

00239 {
00240   this->consumer_admin_->peer_disconnected (consumer ACE_ENV_ARG_PARAMETER);
00241   ACE_CHECK;
00242   this->supplier_admin_->disconnected (consumer ACE_ENV_ARG_PARAMETER);
00243   ACE_CHECK;
00244   this->observer_strategy_->disconnected (consumer ACE_ENV_ARG_PARAMETER);
00245   ACE_CHECK;
00246 }

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.i.

Referenced by 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.i.

References 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.i.

Referenced by TAO_EC_Event_Channel::TAO_EC_Event_Channel(), 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.i.

References filter_builder_.

00045 {
00046   return this->filter_builder_;
00047 }

virtual RtecEventChannelAdmin::ConsumerAdmin_ptr TAO_EC_Event_Channel_Base::for_consumers ACE_ENV_SINGLE_ARG_DECL   )  throw (CORBA::SystemException) [virtual]
 

The default implementation is: this->consumer_admin ()->_this (ACE_ENV_SINGLE_ARG_PARAMETER);

virtual void TAO_EC_Event_Channel_Base::for_each_consumer TAO_ESF_Worker< TAO_EC_ProxyPushSupplier > *worker  ACE_ENV_ARG_DECL  )  throw (CORBA::SystemException) [virtual]
 

Referenced by TAO_EC_Basic_ObserverStrategy::fill_qos(), TAO_EC_Trivial_Supplier_Filter::push_scheduled_event(), and TAO_EC_Reactive_ConsumerControl::query_consumers().

virtual void TAO_EC_Event_Channel_Base::for_each_supplier TAO_ESF_Worker< TAO_EC_ProxyPushConsumer > *worker  ACE_ENV_ARG_DECL  )  throw (CORBA::SystemException) [virtual]
 

Referenced by TAO_EC_Basic_ObserverStrategy::fill_qos(), and TAO_EC_Reactive_SupplierControl::query_suppliers().

virtual RtecEventChannelAdmin::SupplierAdmin_ptr TAO_EC_Event_Channel_Base::for_suppliers ACE_ENV_SINGLE_ARG_DECL   )  throw (CORBA::SystemException) [virtual]
 

The default implementation is: this->supplier_admin ()->_this (ACE_ENV_SINGLE_ARG_PARAMETER);

void TAO_EC_Event_Channel_Base::reconnected TAO_EC_ProxyPushSupplier ACE_ENV_ARG_DECL_NOT_USED  )  [virtual]
 

Definition at line 261 of file EC_Event_Channel_Base.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, TAO_EC_ObserverStrategy::connected(), consumer_admin_, observer_strategy_, and supplier_admin_.

00263 {
00264   this->supplier_admin_->peer_reconnected (supplier ACE_ENV_ARG_PARAMETER);
00265   ACE_CHECK;
00266   this->consumer_admin_->reconnected (supplier ACE_ENV_ARG_PARAMETER);
00267   ACE_CHECK;
00268   this->observer_strategy_->connected (supplier ACE_ENV_ARG_PARAMETER);
00269   ACE_CHECK;
00270 }

void TAO_EC_Event_Channel_Base::reconnected TAO_EC_ProxyPushConsumer ACE_ENV_ARG_DECL_NOT_USED  )  [virtual]
 

Definition at line 225 of file EC_Event_Channel_Base.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, TAO_EC_ObserverStrategy::connected(), consumer_admin_, observer_strategy_, and supplier_admin_.

00227 {
00228   this->consumer_admin_->peer_reconnected (consumer ACE_ENV_ARG_PARAMETER);
00229   ACE_CHECK;
00230   this->supplier_admin_->reconnected (consumer ACE_ENV_ARG_PARAMETER);
00231   ACE_CHECK;
00232   this->observer_strategy_->connected (consumer ACE_ENV_ARG_PARAMETER);
00233   ACE_CHECK;
00234 }

void TAO_EC_Event_Channel_Base::remove_observer RtecEventChannelAdmin::Observer_Handle  ACE_ENV_ARG_DECL  )  throw ( CORBA::SystemException, RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER) [virtual]
 

Definition at line 319 of file EC_Event_Channel_Base.cpp.

References ACE_ENV_ARG_PARAMETER, and RtecEventChannelAdmin::Observer_Handle.

00326 {
00327   this->observer_strategy_->remove_observer (handle
00328                                              ACE_ENV_ARG_PARAMETER);
00329 }

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.i.

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(), TAO_EC_Kokyu_Factory::create_scheduling_strategy(), TAO_EC_Kokyu_Dispatching::TAO_EC_Kokyu_Dispatching(), and TAO_EC_Priority_Dispatching::TAO_EC_Priority_Dispatching().

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.i.

Referenced by TAO_EC_Trivial_Supplier_Filter::push(), and TAO_EC_Per_Supplier_Filter::push().

00075 {
00076   return this->scheduling_strategy_;
00077 }

virtual void TAO_EC_Event_Channel_Base::shutdown ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  [virtual]
 

Shutdown any internal threads, cleanup all the internal structures, flush all the messages, etc.

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.i.

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.i.

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.i.

References supplier_filter_builder_.

Referenced by TAO_EC_Per_Supplier_Filter::_decr_refcnt().

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.i.

Referenced by TAO_EC_ProxyPushSupplier::TAO_EC_ProxyPushSupplier().

00141 {
00142   return PortableServer::POA::_duplicate (this->supplier_poa_.in ());
00143 }

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.i.

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.i.

References timeout_generator_.

Referenced by TAO_EC_Timeout_Filter::clear(), TAO_EC_Timeout_Filter::TAO_EC_Timeout_Filter(), and TAO_EC_Timeout_Filter::~TAO_EC_Timeout_Filter().

00069 {
00070   return this->timeout_generator_;
00071 }


Member Data Documentation

TAO_EC_ConsumerAdmin* TAO_EC_Event_Channel_Base::consumer_admin_ [protected]
 

The ConsumerAdmin implementation.

Definition at line 323 of file EC_Event_Channel_Base.h.

Referenced by connected(), consumer_admin(), create_strategies(), deactivate_consumer_admin(), disconnected(), reconnected(), and ~TAO_EC_Event_Channel_Base().

TAO_EC_ConsumerControl* TAO_EC_Event_Channel_Base::consumer_control_ [protected]
 

Strategies to disconnect misbehaving or destroyed consumers.

Definition at line 350 of file EC_Event_Channel_Base.h.

PortableServer::POA_var TAO_EC_Event_Channel_Base::consumer_poa_ [protected]
 

Definition at line 301 of file EC_Event_Channel_Base.h.

int TAO_EC_Event_Channel_Base::consumer_reconnect_ [protected]
 

Consumer reconnection flags.

Definition at line 341 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 347 of file EC_Event_Channel_Base.h.

Referenced by disconnect_callbacks().

TAO_EC_Dispatching* TAO_EC_Event_Channel_Base::dispatching_ [protected]
 

The dispatching "module".

Definition at line 314 of file EC_Event_Channel_Base.h.

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 308 of file EC_Event_Channel_Base.h.

TAO_EC_Filter_Builder* TAO_EC_Event_Channel_Base::filter_builder_ [protected]
 

The filter builder.

Definition at line 317 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]
 

Mutex to protect the internal state.

Definition at line 356 of file EC_Event_Channel_Base.h.

TAO_EC_ObserverStrategy* TAO_EC_Event_Channel_Base::observer_strategy_ [protected]
 

The observer strategy.

Definition at line 332 of file EC_Event_Channel_Base.h.

Referenced by connected(), create_strategies(), disconnected(), reconnected(), 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 311 of file EC_Event_Channel_Base.h.

Referenced by factory().

CORBA::Object_var TAO_EC_Event_Channel_Base::scheduler_ [protected]
 

The scheduler (may be nil).

Definition at line 335 of file EC_Event_Channel_Base.h.

Referenced by TAO_EC_Event_Channel_Base().

TAO_EC_Scheduling_Strategy* TAO_EC_Event_Channel_Base::scheduling_strategy_ [protected]
 

The scheduling strategy.

Definition at line 338 of file EC_Event_Channel_Base.h.

int TAO_EC_Event_Channel_Base::status_ [protected]
 

Definition at line 366 of file EC_Event_Channel_Base.h.

TAO_EC_SupplierAdmin* TAO_EC_Event_Channel_Base::supplier_admin_ [protected]
 

The SupplierAdmin implementation.

Definition at line 326 of file EC_Event_Channel_Base.h.

Referenced by connected(), create_strategies(), deactivate_supplier_admin(), disconnected(), reconnected(), supplier_admin(), and ~TAO_EC_Event_Channel_Base().

TAO_EC_SupplierControl* TAO_EC_Event_Channel_Base::supplier_control_ [protected]
 

Strategies to disconnect misbehaving or destroyed suppliers.

Definition at line 353 of file EC_Event_Channel_Base.h.

TAO_EC_Supplier_Filter_Builder* TAO_EC_Event_Channel_Base::supplier_filter_builder_ [protected]
 

The filter builder for suppliers.

Definition at line 320 of file EC_Event_Channel_Base.h.

Referenced by create_strategies(), supplier_filter_builder(), and ~TAO_EC_Event_Channel_Base().

PortableServer::POA_var TAO_EC_Event_Channel_Base::supplier_poa_ [protected]
 

The POAs used to activate "supplier-side" and "consumer-side" objects.

Definition at line 300 of file EC_Event_Channel_Base.h.

int TAO_EC_Event_Channel_Base::supplier_reconnect_ [protected]
 

Supplier reconnection flags.

Definition at line 344 of file EC_Event_Channel_Base.h.

Referenced by supplier_reconnect().

TAO_EC_Timeout_Generator* TAO_EC_Event_Channel_Base::timeout_generator_ [protected]
 

The timeout generator.

Definition at line 329 of file EC_Event_Channel_Base.h.

Referenced by create_strategies(), timeout_generator(), and ~TAO_EC_Event_Channel_Base().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:14:44 2006 for TAO_RTEvent by doxygen 1.3.6