Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_EC_Gateway_IIOP Class Reference

Event Channel Gateway using IIOP. More...

#include <EC_Gateway.h>

Inheritance diagram for TAO_EC_Gateway_IIOP:

Inheritance graph
[legend]
Collaboration diagram for TAO_EC_Gateway_IIOP:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_EC_Gateway_IIOP (void)
 ~TAO_EC_Gateway_IIOP (void)
void init (RtecEventChannelAdmin::EventChannel_ptr rmt_ec, RtecEventChannelAdmin::EventChannel_ptr lcl_ec ACE_ENV_ARG_DECL)
 To do its job this class requires to know the local and remote ECs it will connect to,. More...

void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 The channel is disconnecting. More...

void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 The channel is disconnecting. More...

void push (const RtecEventComm::EventSet &events ACE_ENV_ARG_DECL_WITH_DEFAULTS)
 This is the Consumer side behavior, it pushes the events to the local event channel. More...

int shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Disconnect and shutdown the gateway. More...

virtual void close (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 The gateway must disconnect from all the relevant event channels, or any other communication media (such as multicast groups). More...

virtual void update_consumer (const RtecEventChannelAdmin::ConsumerQOS &sub ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
virtual void update_supplier (const RtecEventChannelAdmin::SupplierQOS &pub ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)

Protected Types

typedef ACE_Map_Manager< RtecEventComm::EventSourceID,
RtecEventChannelAdmin::ProxyPushConsumer_ptr,
ACE_Null_Mutex
Consumer_Map
typedef ACE_Map_Iterator<
RtecEventComm::EventSourceID,
RtecEventChannelAdmin::ProxyPushConsumer_ptr,
ACE_Null_Mutex
Consumer_Map_Iterator

Protected Methods

void init_i (RtecEventChannelAdmin::EventChannel_ptr rmt_ec, RtecEventChannelAdmin::EventChannel_ptr lcl_ec ACE_ENV_ARG_DECL)
 Do the real work in init(). More...


Protected Attributes

TAO_SYNCH_MUTEX lock_
 Lock to synchronize internal changes. More...

CORBA::ULong busy_count_
 How many threads are running push() we cannot make changes until that reaches 0. More...

int update_posted_
 An update_consumer() message arrived *while* we were doing a push() the modification is stored <pub_>, if multiple update_consumer messages arrive only the last one is executed. More...

RtecEventChannelAdmin::ConsumerQOS c_qos_
RtecEventChannelAdmin::EventChannel_var rmt_ec_
 The remote and the local EC, so we can reconnect when the list changes. More...

RtecEventChannelAdmin::EventChannel_var lcl_ec_
RtecBase::handle_t rmt_info_
 Our local and remote RT_Infos. More...

RtecBase::handle_t lcl_info_
ACE_PushConsumer_Adapter<
TAO_EC_Gateway_IIOP > 
consumer_
 Our consumer personality.... If it is not 0 then we must deactivate the supplier. More...

int consumer_is_active_
ACE_PushSupplier_Adapter<
TAO_EC_Gateway_IIOP > 
supplier_
 Our supplier personality.... If it is not 0 then we must deactivate the supplier. More...

int supplier_is_active_
Consumer_Map consumer_proxy_map_
 We talk to the EC (as a supplier) using either an per-supplier proxy or a generic proxy for the type only subscriptions. More...

RtecEventChannelAdmin::ProxyPushConsumer_var default_consumer_proxy_
RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_
 We talk to the EC (as a consumer) using this proxy. More...


Private Methods

void close_i (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
void update_consumer_i (const RtecEventChannelAdmin::ConsumerQOS &sub ACE_ENV_ARG_DECL)

Detailed Description

Event Channel Gateway using IIOP.

This class mediates among two event channels, it connects as a consumer of events with a remote event channel, and as a supplier of events with the local EC. As a consumer it gives a QoS designed to only accept the events in which *local* consumers are interested. Eventually the local EC should create this object and compute its QoS in an automated manner; but this requires some way to filter out the peers registered as consumers, otherwise we will get loops in the QoS graph. It uses exactly the same set of events in the publications list when connected as a supplier.

Note:
An alternative implementation would be to register with the remote EC as a supplier, and then filter on the remote EC, but one of the objectives is to minimize network traffic. On the other hand the events will be pushed to remote consumers, event though they will be dropped upon receipt (due to the TTL field); IMHO this is another suggestion that the EC needs to know (somehow) which consumers are truly its peers in disguise.
Todo:
: The class makes an extra copy of the events, we need to investigate if closer collaboration with its collocated EC could be used to remove that copy.


Member Typedef Documentation

typedef ACE_Map_Manager<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> TAO_EC_Gateway_IIOP::Consumer_Map [protected]
 

typedef ACE_Map_Iterator<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> TAO_EC_Gateway_IIOP::Consumer_Map_Iterator [protected]
 


Constructor & Destructor Documentation

TAO_EC_Gateway_IIOP::TAO_EC_Gateway_IIOP void   
 

TAO_EC_Gateway_IIOP::~TAO_EC_Gateway_IIOP void   
 


Member Function Documentation

void TAO_EC_Gateway_IIOP::close ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    [virtual]
 

The gateway must disconnect from all the relevant event channels, or any other communication media (such as multicast groups).

Reimplemented from TAO_EC_Gateway.

void TAO_EC_Gateway_IIOP::close_i ACE_ENV_SINGLE_ARG_DECL_NOT_USED    [private]
 

void TAO_EC_Gateway_IIOP::disconnect_push_consumer ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   
 

The channel is disconnecting.

void TAO_EC_Gateway_IIOP::disconnect_push_supplier ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   
 

The channel is disconnecting.

void TAO_EC_Gateway_IIOP::init RtecEventChannelAdmin::EventChannel_ptr    rmt_ec,
RtecEventChannelAdmin::EventChannel_ptr lcl_ec    ACE_ENV_ARG_DECL
 

To do its job this class requires to know the local and remote ECs it will connect to,.

void TAO_EC_Gateway_IIOP::init_i RtecEventChannelAdmin::EventChannel_ptr    rmt_ec,
RtecEventChannelAdmin::EventChannel_ptr lcl_ec    ACE_ENV_ARG_DECL_NOT_USED
[protected]
 

Do the real work in init().

void TAO_EC_Gateway_IIOP::push const RtecEventComm::EventSet &events    ACE_ENV_ARG_DECL
 

This is the Consumer side behavior, it pushes the events to the local event channel.

int TAO_EC_Gateway_IIOP::shutdown ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   
 

Disconnect and shutdown the gateway.

virtual void TAO_EC_Gateway_IIOP::update_consumer const RtecEventChannelAdmin::ConsumerQOS &sub    ACE_ENV_ARG_DECL_WITH_DEFAULTS throw (CORBA::SystemException) [virtual]
 

void TAO_EC_Gateway_IIOP::update_consumer_i const RtecEventChannelAdmin::ConsumerQOS &sub    ACE_ENV_ARG_DECL [private]
 

virtual void TAO_EC_Gateway_IIOP::update_supplier const RtecEventChannelAdmin::SupplierQOS &pub    ACE_ENV_ARG_DECL_WITH_DEFAULTS throw (CORBA::SystemException) [virtual]
 


Member Data Documentation

CORBA::ULong TAO_EC_Gateway_IIOP::busy_count_ [protected]
 

How many threads are running push() we cannot make changes until that reaches 0.

RtecEventChannelAdmin::ConsumerQOS TAO_EC_Gateway_IIOP::c_qos_ [protected]
 

ACE_PushConsumer_Adapter<TAO_EC_Gateway_IIOP> TAO_EC_Gateway_IIOP::consumer_ [protected]
 

Our consumer personality.... If it is not 0 then we must deactivate the supplier.

int TAO_EC_Gateway_IIOP::consumer_is_active_ [protected]
 

Consumer_Map TAO_EC_Gateway_IIOP::consumer_proxy_map_ [protected]
 

We talk to the EC (as a supplier) using either an per-supplier proxy or a generic proxy for the type only subscriptions.

RtecEventChannelAdmin::ProxyPushConsumer_var TAO_EC_Gateway_IIOP::default_consumer_proxy_ [protected]
 

RtecEventChannelAdmin::EventChannel_var TAO_EC_Gateway_IIOP::lcl_ec_ [protected]
 

RtecBase::handle_t TAO_EC_Gateway_IIOP::lcl_info_ [protected]
 

TAO_SYNCH_MUTEX TAO_EC_Gateway_IIOP::lock_ [protected]
 

Lock to synchronize internal changes.

RtecEventChannelAdmin::EventChannel_var TAO_EC_Gateway_IIOP::rmt_ec_ [protected]
 

The remote and the local EC, so we can reconnect when the list changes.

RtecBase::handle_t TAO_EC_Gateway_IIOP::rmt_info_ [protected]
 

Our local and remote RT_Infos.

ACE_PushSupplier_Adapter<TAO_EC_Gateway_IIOP> TAO_EC_Gateway_IIOP::supplier_ [protected]
 

Our supplier personality.... If it is not 0 then we must deactivate the supplier.

int TAO_EC_Gateway_IIOP::supplier_is_active_ [protected]
 

RtecEventChannelAdmin::ProxyPushSupplier_var TAO_EC_Gateway_IIOP::supplier_proxy_ [protected]
 

We talk to the EC (as a consumer) using this proxy.

int TAO_EC_Gateway_IIOP::update_posted_ [protected]
 

An update_consumer() message arrived *while* we were doing a push() the modification is stored <pub_>, if multiple update_consumer messages arrive only the last one is executed.


The documentation for this class was generated from the following files:
Generated on Thu Oct 10 21:16:39 2002 for TAO_RTEvent by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001