TAO_RTEvent  2.2.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
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
Collaboration diagram for TAO_EC_Event_Channel_Base:
Collaboration graph

Public Member Functions

virtual ~TAO_EC_Event_Channel_Base (void)
 destructor More...
 
virtual void activate (void)
 
virtual void shutdown (void)
 
virtual void for_each_consumer (TAO_ESF_Worker< TAO_EC_ProxyPushSupplier > *worker)
 
virtual void for_each_supplier (TAO_ESF_Worker< TAO_EC_ProxyPushConsumer > *worker)
 
TAO_EC_Dispatchingdispatching (void) const
 Access the dispatching module.... More...
 
TAO_EC_Filter_Builderfilter_builder (void) const
 Access the filter builder.... More...
 
TAO_EC_Supplier_Filter_Buildersupplier_filter_builder (void) const
 Access the filter builder.... More...
 
TAO_EC_ConsumerAdminconsumer_admin (void) const
 
TAO_EC_SupplierAdminsupplier_admin (void) const
 
TAO_EC_Timeout_Generatortimeout_generator (void) const
 Access the timer module... More...
 
TAO_EC_Scheduling_Strategyscheduling_strategy (void) const
 Access the scheduling strategy. More...
 
TAO_EC_ConsumerControlconsumer_control (void) const
 Access the client control strategies. More...
 
TAO_EC_SupplierControlsupplier_control (void) const
 
void create_proxy (TAO_EC_ProxyPushSupplier *&)
 Create and destroy a ProxyPushSupplier. More...
 
void destroy_proxy (TAO_EC_ProxyPushSupplier *)
 
void create_proxy (TAO_EC_ProxyPushConsumer *&)
 Create and destroy a ProxyPushConsumer. More...
 
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. More...
 
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 *)
 
virtual void reconnected (TAO_EC_ProxyPushConsumer *)
 
virtual void disconnected (TAO_EC_ProxyPushConsumer *)
 
virtual void connected (TAO_EC_ProxyPushSupplier *)
 
virtual void reconnected (TAO_EC_ProxyPushSupplier *)
 
virtual void disconnected (TAO_EC_ProxyPushSupplier *)
 
int consumer_reconnect (void) const
 Can the consumers reconnect to the EC? More...
 
int supplier_reconnect (void) const
 Can the suppliers reconnect to the EC? More...
 
int disconnect_callbacks (void) const
 
CORBA::Object_ptr scheduler (void)
 Obtain the scheduler, the user must release. More...
 
virtual
RtecEventChannelAdmin::ConsumerAdmin_ptr 
for_consumers (void)
 
virtual
RtecEventChannelAdmin::SupplierAdmin_ptr 
for_suppliers (void)
 
virtual void destroy (void)
 Commit suicide. More...
 
virtual
RtecEventChannelAdmin::Observer_Handle 
append_observer (RtecEventChannelAdmin::Observer_ptr)
 
virtual void remove_observer (RtecEventChannelAdmin::Observer_Handle)
 
int destroyed (void)
 Return 1 if the event channel is already destroyed. More...
 

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. More...
 
TAO_EC_Dispatchingdispatching_
 The dispatching "module". More...
 
TAO_EC_Filter_Builderfilter_builder_
 The filter builder. More...
 
TAO_EC_Supplier_Filter_Buildersupplier_filter_builder_
 The filter builder for suppliers. More...
 
TAO_EC_ConsumerAdminconsumer_admin_
 The ConsumerAdmin implementation. More...
 
TAO_EC_SupplierAdminsupplier_admin_
 The SupplierAdmin implementation. More...
 
TAO_EC_Timeout_Generatortimeout_generator_
 The timeout generator. More...
 
TAO_EC_ObserverStrategyobserver_strategy_
 The observer strategy. More...
 
CORBA::Object_var scheduler_
 The scheduler (may be nil) More...
 
TAO_EC_Scheduling_Strategyscheduling_strategy_
 The scheduling strategy. More...
 
int consumer_reconnect_
 Consumer reconnection flags. More...
 
int supplier_reconnect_
 Supplier reconnection flags. More...
 
int disconnect_callbacks_
 If not zero we send callbacks when a proxy is disconnected. More...
 
TAO_EC_ConsumerControlconsumer_control_
 Strategies to disconnect misbehaving or destroyed consumers. More...
 
TAO_EC_SupplierControlsupplier_control_
 Strategies to disconnect misbehaving or destroyed suppliers. More...
 
TAO_SYNCH_MUTEX mutex_
 Mutex to protect the internal state. More...
 
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.

Member Enumeration Documentation

anonymous enum
protected

Flag to track the status of the event channel.

Enumerator
EC_S_IDLE 
EC_S_ACTIVATING 
EC_S_ACTIVE 
EC_S_DESTROYING 
EC_S_DESTROYED 

Constructor & Destructor Documentation

TAO_EC_Event_Channel_Base::~TAO_EC_Event_Channel_Base ( void  )
virtual

destructor

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

Member Function Documentation

void TAO_EC_Event_Channel_Base::activate ( void  )
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  observer)
virtual
void TAO_EC_Event_Channel_Base::connected ( TAO_EC_ProxyPushConsumer consumer)
virtual

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

void TAO_EC_Event_Channel_Base::connected ( TAO_EC_ProxyPushSupplier supplier)
virtual

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

TAO_EC_ConsumerAdmin * TAO_EC_Event_Channel_Base::consumer_admin ( void  ) const

Access the consumer admin implementation, useful for controlling the activation...

TAO_EC_ConsumerControl * TAO_EC_Event_Channel_Base::consumer_control ( void  ) const

Access the client control strategies.

PortableServer::POA_ptr TAO_EC_Event_Channel_Base::consumer_poa ( void  )
int TAO_EC_Event_Channel_Base::consumer_reconnect ( void  ) const

Can the consumers reconnect to the EC?

ACE_Lock * TAO_EC_Event_Channel_Base::create_consumer_lock ( void  )

Locking strategies for the ProxyPushConsumer and ProxyPushSupplier objects

void TAO_EC_Event_Channel_Base::create_proxy ( TAO_EC_ProxyPushSupplier *&  x)

Create and destroy a ProxyPushSupplier.

void TAO_EC_Event_Channel_Base::create_proxy ( TAO_EC_ProxyPushConsumer *&  x)

Create and destroy a ProxyPushConsumer.

void TAO_EC_Event_Channel_Base::create_proxy_collection ( TAO_EC_ProxyPushSupplier_Collection *&  x)

Create and destroy a the collections used to store ProxyPushSuppliers

void TAO_EC_Event_Channel_Base::create_proxy_collection ( TAO_EC_ProxyPushConsumer_Collection *&  x)

Create and destroy a the collections used to store ProxyPushConsumers

void TAO_EC_Event_Channel_Base::create_strategies ( void  )
protected

Create all strategies

ACE_Lock * TAO_EC_Event_Channel_Base::create_supplier_lock ( void  )
void TAO_EC_Event_Channel_Base::deactivate_consumer_admin ( void  )
protected

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

void TAO_EC_Event_Channel_Base::deactivate_supplier_admin ( void  )
protected

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

void TAO_EC_Event_Channel_Base::destroy ( void  )
virtual

Commit suicide.

void TAO_EC_Event_Channel_Base::destroy_consumer_lock ( ACE_Lock x)
void TAO_EC_Event_Channel_Base::destroy_proxy ( TAO_EC_ProxyPushSupplier supplier)
void TAO_EC_Event_Channel_Base::destroy_proxy ( TAO_EC_ProxyPushConsumer consumer)
void TAO_EC_Event_Channel_Base::destroy_proxy_collection ( TAO_EC_ProxyPushSupplier_Collection x)
void TAO_EC_Event_Channel_Base::destroy_proxy_collection ( TAO_EC_ProxyPushConsumer_Collection x)
void TAO_EC_Event_Channel_Base::destroy_supplier_lock ( ACE_Lock x)
int TAO_EC_Event_Channel_Base::destroyed ( void  )

Return 1 if the event channel is already destroyed.

int TAO_EC_Event_Channel_Base::disconnect_callbacks ( void  ) const

Should we send callback disconnect messages when a proxy is disconnected by the client

void TAO_EC_Event_Channel_Base::disconnected ( TAO_EC_ProxyPushConsumer consumer)
virtual
void TAO_EC_Event_Channel_Base::disconnected ( TAO_EC_ProxyPushSupplier supplier)
virtual
TAO_EC_Dispatching * TAO_EC_Event_Channel_Base::dispatching ( void  ) const

Access the dispatching module....

TAO_EC_Factory * TAO_EC_Event_Channel_Base::factory ( void  ) const
protected

Get the factory.

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.

TAO_EC_Filter_Builder * TAO_EC_Event_Channel_Base::filter_builder ( void  ) const

Access the filter builder....

RtecEventChannelAdmin::ConsumerAdmin_ptr TAO_EC_Event_Channel_Base::for_consumers ( void  )
virtual

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

void TAO_EC_Event_Channel_Base::for_each_consumer ( TAO_ESF_Worker< TAO_EC_ProxyPushSupplier > *  worker)
virtual
void TAO_EC_Event_Channel_Base::for_each_supplier ( TAO_ESF_Worker< TAO_EC_ProxyPushConsumer > *  worker)
virtual
RtecEventChannelAdmin::SupplierAdmin_ptr TAO_EC_Event_Channel_Base::for_suppliers ( void  )
virtual

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

void TAO_EC_Event_Channel_Base::reconnected ( TAO_EC_ProxyPushConsumer consumer)
virtual
void TAO_EC_Event_Channel_Base::reconnected ( TAO_EC_ProxyPushSupplier supplier)
virtual
void TAO_EC_Event_Channel_Base::remove_observer ( RtecEventChannelAdmin::Observer_Handle  handle)
virtual
CORBA::Object_ptr TAO_EC_Event_Channel_Base::scheduler ( void  )

Obtain the scheduler, the user must release.

TAO_EC_Scheduling_Strategy * TAO_EC_Event_Channel_Base::scheduling_strategy ( void  ) const

Access the scheduling strategy.

void TAO_EC_Event_Channel_Base::shutdown ( void  )
virtual

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

TAO_EC_SupplierAdmin * TAO_EC_Event_Channel_Base::supplier_admin ( void  ) const

Access the supplier admin implementation, useful for controlling the activation...

TAO_EC_SupplierControl * TAO_EC_Event_Channel_Base::supplier_control ( void  ) const
TAO_EC_Supplier_Filter_Builder * TAO_EC_Event_Channel_Base::supplier_filter_builder ( void  ) const

Access the filter builder....

PortableServer::POA_ptr TAO_EC_Event_Channel_Base::supplier_poa ( void  )

Access the supplier and consumer POAs from the factory.

int TAO_EC_Event_Channel_Base::supplier_reconnect ( void  ) const

Can the suppliers reconnect to the EC?

TAO_EC_Timeout_Generator * TAO_EC_Event_Channel_Base::timeout_generator ( void  ) const

Access the timer module...

Member Data Documentation

TAO_EC_ConsumerAdmin* TAO_EC_Event_Channel_Base::consumer_admin_
protected

The ConsumerAdmin implementation.

TAO_EC_ConsumerControl* TAO_EC_Event_Channel_Base::consumer_control_
protected

Strategies to disconnect misbehaving or destroyed consumers.

PortableServer::POA_var TAO_EC_Event_Channel_Base::consumer_poa_
protected
int TAO_EC_Event_Channel_Base::consumer_reconnect_
protected

Consumer reconnection flags.

int TAO_EC_Event_Channel_Base::disconnect_callbacks_
protected

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

TAO_EC_Dispatching* TAO_EC_Event_Channel_Base::dispatching_
protected

The dispatching "module".

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.

TAO_EC_Filter_Builder* TAO_EC_Event_Channel_Base::filter_builder_
protected

The filter builder.

TAO_SYNCH_MUTEX TAO_EC_Event_Channel_Base::mutex_
protected

Mutex to protect the internal state.

TAO_EC_ObserverStrategy* TAO_EC_Event_Channel_Base::observer_strategy_
protected

The observer strategy.

int TAO_EC_Event_Channel_Base::own_factory_
protected

Flag that indicates if we own the factory.

CORBA::Object_var TAO_EC_Event_Channel_Base::scheduler_
protected

The scheduler (may be nil)

TAO_EC_Scheduling_Strategy* TAO_EC_Event_Channel_Base::scheduling_strategy_
protected

The scheduling strategy.

int TAO_EC_Event_Channel_Base::status_
protected
TAO_EC_SupplierAdmin* TAO_EC_Event_Channel_Base::supplier_admin_
protected

The SupplierAdmin implementation.

TAO_EC_SupplierControl* TAO_EC_Event_Channel_Base::supplier_control_
protected

Strategies to disconnect misbehaving or destroyed suppliers.

TAO_EC_Supplier_Filter_Builder* TAO_EC_Event_Channel_Base::supplier_filter_builder_
protected

The filter builder for suppliers.

PortableServer::POA_var TAO_EC_Event_Channel_Base::supplier_poa_
protected

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

int TAO_EC_Event_Channel_Base::supplier_reconnect_
protected

Supplier reconnection flags.

TAO_EC_Timeout_Generator* TAO_EC_Event_Channel_Base::timeout_generator_
protected

The timeout generator.


The documentation for this class was generated from the following files: