TAO_RTEvent
2.2.6
|
Event Channel Gateway using IIOP. More...
#include <EC_Gateway_IIOP.h>
Public Member Functions | |
TAO_EC_Gateway_IIOP (void) | |
virtual | ~TAO_EC_Gateway_IIOP (void) |
int | init (RtecEventChannelAdmin::EventChannel_ptr supplier_ec, RtecEventChannelAdmin::EventChannel_ptr consumer_ec) |
void | disconnect_push_supplier (void) |
The channel is disconnecting. More... | |
void | disconnect_push_consumer (void) |
The channel is disconnecting. More... | |
void | push (const RtecEventComm::EventSet &events) |
int | shutdown (void) |
Disconnect and shutdown the gateway. More... | |
virtual void | close (void) |
virtual void | update_consumer (const RtecEventChannelAdmin::ConsumerQOS &sub) |
virtual void | update_supplier (const RtecEventChannelAdmin::SupplierQOS &pub) |
void | reconnect_consumer_ec (void) |
CORBA::Boolean | consumer_ec_non_existent (CORBA::Boolean_out disconnected) |
Check whether the consumer event channel is non existent or not. More... | |
void | cleanup_consumer_proxies (void) |
int | cleanup_consumer_ec (void) |
int | cleanup_supplier_ec (void) |
void | suspend_supplier_ec (void) |
Suspend the connection to the supplier ec. More... | |
void | resume_supplier_ec (void) |
Resume the connection to the supplier ec. More... | |
![]() | |
TAO_EC_Gateway (void) | |
Default constructor. More... | |
virtual | ~TAO_EC_Gateway (void) |
Destructor. More... | |
void | observer_handle (RtecEventChannelAdmin::Observer_Handle h) |
Obtain and modify the observer handle. More... | |
RtecEventChannelAdmin::Observer_Handle | observer_handle (void) const |
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 Member Functions | |
int | init_i (RtecEventChannelAdmin::EventChannel_ptr supplier_ec, RtecEventChannelAdmin::EventChannel_ptr consumer_ec) |
Do the real work in init() More... | |
Protected Attributes | |
TAO_SYNCH_MUTEX | lock_ |
Lock to synchronize internal changes. More... | |
CORBA::ULong | busy_count_ |
int | update_posted_ |
RtecEventChannelAdmin::ConsumerQOS | c_qos_ |
int | cleanup_posted_ |
int | supplier_ec_suspended_ |
RtecEventChannelAdmin::EventChannel_var | supplier_ec_ |
RtecEventChannelAdmin::EventChannel_var | consumer_ec_ |
The event channel acting as consumer of this gateway. More... | |
RtecBase::handle_t | supplier_info_ |
Our RT_Infos for the event channel that is the supplier. More... | |
RtecBase::handle_t | consumer_info_ |
Our RT_Infos for the event channel that is the consumer. More... | |
ACE_PushConsumer_Adapter < TAO_EC_Gateway_IIOP > | consumer_ |
Our consumer personality.... More... | |
bool | consumer_is_active_ |
If it is true then we must deactivate the consumer. More... | |
ACE_PushSupplier_Adapter < TAO_EC_Gateway_IIOP > | supplier_ |
Our supplier personality.... More... | |
bool | supplier_is_active_ |
If it is true then we must deactivate the supplier. More... | |
Consumer_Map | consumer_proxy_map_ |
RtecEventChannelAdmin::ProxyPushConsumer_var | default_consumer_proxy_ |
RtecEventChannelAdmin::ProxyPushSupplier_var | supplier_proxy_ |
TAO_ECG_ConsumerEC_Control * | ec_control_ |
TAO_EC_Gateway_IIOP_Factory * | factory_ |
The Gateway IIOP Factory for all the settings. More... | |
int | use_ttl_ |
If 1, we use the TTL flags, if 0, we just ignore TTL. More... | |
int | use_consumer_proxy_map_ |
Private Member Functions | |
void | close_i (void) |
void | disconnect_supplier_proxy_i (void) |
Disconnect the supplier proxy. More... | |
void | disconnect_consumer_proxies_i (void) |
Disconnect all consumer proxies. More... | |
void | cleanup_consumer_proxies_i (void) |
Remove all consumer proxies without calling disconnect on them. More... | |
void | update_consumer_i (const RtecEventChannelAdmin::ConsumerQOS &sub) |
void | open_i (const RtecEventChannelAdmin::ConsumerQOS &sub) |
Create all connections to consumer ec and to supplier ec. More... | |
CORBA::Boolean | is_consumer_ec_connected_i (void) const |
Helper method to see if consumer ec is connected. More... | |
void | push_to_consumer (RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer, const RtecEventComm::EventSet &event) |
Push the event to the consumer. More... | |
void | cleanup_consumer_ec_i (void) |
void | cleanup_supplier_ec_i (void) |
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.
|
protected |
|
protected |
TAO_EC_Gateway_IIOP::TAO_EC_Gateway_IIOP | ( | void | ) |
|
virtual |
int TAO_EC_Gateway_IIOP::cleanup_consumer_ec | ( | void | ) |
Cleanup the connection to the consumer ec. Doesn't call anything on the ec again, just set the object to nil
|
private |
void TAO_EC_Gateway_IIOP::cleanup_consumer_proxies | ( | void | ) |
Cleanup all consumer proxies we have without trying to tell the consumer that we are going to disconnect. This can be used to cleanup the consumer proxy administration in case we know that the consumers are all unreachable.
|
private |
Remove all consumer proxies without calling disconnect on them.
int TAO_EC_Gateway_IIOP::cleanup_supplier_ec | ( | void | ) |
Cleanup the connection to the supplier ec. Doesn't call anything on the ec again, just set the object to nil
|
private |
|
virtual |
The gateway must disconnect from all the relevant event channels, or any other communication media (such as multicast groups).
Implements TAO_EC_Gateway.
|
private |
CORBA::Boolean TAO_EC_Gateway_IIOP::consumer_ec_non_existent | ( | CORBA::Boolean_out | disconnected | ) |
Check whether the consumer event channel is non existent or not.
|
private |
Disconnect all consumer proxies.
void TAO_EC_Gateway_IIOP::disconnect_push_consumer | ( | void | ) |
The channel is disconnecting.
void TAO_EC_Gateway_IIOP::disconnect_push_supplier | ( | void | ) |
The channel is disconnecting.
|
private |
Disconnect the supplier proxy.
int TAO_EC_Gateway_IIOP::init | ( | RtecEventChannelAdmin::EventChannel_ptr | supplier_ec, |
RtecEventChannelAdmin::EventChannel_ptr | consumer_ec | ||
) |
To do its job this class requires to know the local and remote ECs it will connect to.
|
protected |
Do the real work in init()
|
private |
Helper method to see if consumer ec is connected.
|
private |
Create all connections to consumer ec and to supplier ec.
void TAO_EC_Gateway_IIOP::push | ( | const RtecEventComm::EventSet & | events | ) |
This is the consumer side behavior, it pushes the events to the local event channel.
|
private |
Push the event to the consumer.
void TAO_EC_Gateway_IIOP::reconnect_consumer_ec | ( | void | ) |
void TAO_EC_Gateway_IIOP::resume_supplier_ec | ( | void | ) |
Resume the connection to the supplier ec.
int TAO_EC_Gateway_IIOP::shutdown | ( | void | ) |
Disconnect and shutdown the gateway.
void TAO_EC_Gateway_IIOP::suspend_supplier_ec | ( | void | ) |
Suspend the connection to the supplier ec.
|
virtual |
|
private |
|
virtual |
|
protected |
How many threads are running push() we cannot make changes until that reaches 0
|
protected |
|
protected |
We have a cleanup outstanding and must wait doing cleanup until all pushes are ready.
|
protected |
Our consumer personality....
|
protected |
The event channel acting as consumer of this gateway.
|
protected |
Our RT_Infos for the event channel that is the consumer.
|
protected |
If it is true then we must deactivate the consumer.
|
protected |
We talk to the EC (as a supplier) using either an per-supplier proxy or a generic proxy for the type only subscriptions. We push the events to these proxies
|
protected |
|
protected |
The consumer ec control which controls the behaviour in case of a misbehaving consumer ec
|
protected |
The Gateway IIOP Factory for all the settings.
|
protected |
Lock to synchronize internal changes.
|
protected |
Our supplier personality....
|
protected |
The event channel acting as supplier for this gateway so we can reconnect when the list changes.
|
protected |
Is the supplier ec suspended?
|
protected |
Our RT_Infos for the event channel that is the supplier.
|
protected |
If it is true then we must deactivate the supplier.
|
protected |
We talk to the EC (as a consumer) using this proxy. We receive the events from these proxy
|
protected |
An update_consumer() message arrived while we were doing a push() the modification is stored, if multiple update_consumer messages arrive only the last one is executed.
|
protected |
The flag for using the consumer proxy map. With 1 the consumer proxy map is used, meaning that for each unique source id we use a different proxy push consumer, if 0, we only use one proxy push consumer (the default) for all source ids.
|
protected |
If 1, we use the TTL flags, if 0, we just ignore TTL.