TAO_RTEvent
2.2.0
|
A simple observer strategy. More...
#include <EC_ObserverStrategy.h>
Classes | |
struct | Header_Compare |
struct | Observer_Entry |
The data kept for each observer. More... | |
Public Types | |
typedef ACE_Map_Manager < RtecEventChannelAdmin::Observer_Handle, Observer_Entry, ACE_Null_Mutex > | Observer_Map |
typedef ACE_Map_Iterator < RtecEventChannelAdmin::Observer_Handle, Observer_Entry, ACE_Null_Mutex > | Observer_Map_Iterator |
typedef ACE_RB_Tree < RtecEventComm::EventHeader, int, Header_Compare, ACE_Null_Mutex > | Headers |
typedef ACE_RB_Tree_Iterator < RtecEventComm::EventHeader, int, Header_Compare, ACE_Null_Mutex > | HeadersIterator |
Public Member Functions | |
TAO_EC_Basic_ObserverStrategy (TAO_EC_Event_Channel_Base *ec, ACE_Lock *lock) | |
Constructor. More... | |
virtual | ~TAO_EC_Basic_ObserverStrategy (void) |
Destructor. More... | |
virtual RtecEventChannelAdmin::Observer_Handle | append_observer (RtecEventChannelAdmin::Observer_ptr) |
The basic methods to support the EC strategies. More... | |
virtual void | remove_observer (RtecEventChannelAdmin::Observer_Handle) |
virtual void | connected (TAO_EC_ProxyPushConsumer *) |
virtual void | disconnected (TAO_EC_ProxyPushConsumer *) |
virtual void | connected (TAO_EC_ProxyPushSupplier *) |
virtual void | disconnected (TAO_EC_ProxyPushSupplier *) |
Public Member Functions inherited from TAO_EC_ObserverStrategy | |
virtual | ~TAO_EC_ObserverStrategy (void) |
Destructor. More... | |
Protected Member Functions | |
virtual void | consumer_qos_update (TAO_EC_ProxyPushSupplier *supplier) |
Helpers. More... | |
virtual void | supplier_qos_update (TAO_EC_ProxyPushConsumer *consumer) |
Recompute EC supplier publications and send them out to all observers. More... | |
void | fill_qos (RtecEventChannelAdmin::ConsumerQOS &qos) |
Compute consumer QOS. More... | |
void | fill_qos (RtecEventChannelAdmin::SupplierQOS &qos) |
Compute supplier QOS. More... | |
int | create_observer_list (RtecEventChannelAdmin::Observer_var *&lst) |
Protected Attributes | |
TAO_EC_Event_Channel_Base * | event_channel_ |
The event channel. More... | |
ACE_Lock * | lock_ |
The lock. More... | |
RtecEventChannelAdmin::Observer_Handle | handle_generator_ |
Observer_Map | observers_ |
Keep the set of Observers. More... | |
A simple observer strategy.
This class simply keeps the information about the current list of observers, whenever the list of consumers and/or suppliers changes in queries the EC, computes the global subscription and/or publication list and sends the update message to all the observers.
It assumes ownership of the lock, but not of the Event_Channel.
typedef ACE_RB_Tree<RtecEventComm::EventHeader,int,Header_Compare,ACE_Null_Mutex> TAO_EC_Basic_ObserverStrategy::Headers |
typedef ACE_RB_Tree_Iterator<RtecEventComm::EventHeader,int,Header_Compare,ACE_Null_Mutex> TAO_EC_Basic_ObserverStrategy::HeadersIterator |
typedef ACE_Map_Manager<RtecEventChannelAdmin::Observer_Handle,Observer_Entry,ACE_Null_Mutex> TAO_EC_Basic_ObserverStrategy::Observer_Map |
typedef ACE_Map_Iterator<RtecEventChannelAdmin::Observer_Handle,Observer_Entry,ACE_Null_Mutex> TAO_EC_Basic_ObserverStrategy::Observer_Map_Iterator |
TAO_EC_Basic_ObserverStrategy::TAO_EC_Basic_ObserverStrategy | ( | TAO_EC_Event_Channel_Base * | ec, |
ACE_Lock * | lock | ||
) |
Constructor.
|
virtual |
Destructor.
|
virtual |
The basic methods to support the EC strategies.
Implements TAO_EC_ObserverStrategy.
|
virtual |
Used by the EC to inform the ObserverStrategy that a Consumer has connected or disconnected from it.
Implements TAO_EC_ObserverStrategy.
|
virtual |
Used by the EC to inform the ObserverStrategy that a Supplier has connected or disconnected from it.
Implements TAO_EC_ObserverStrategy.
|
protectedvirtual |
Helpers.
Recompute EC consumer subscriptions and send them out to all observers.
Reimplemented in TAO_EC_Reactive_ObserverStrategy.
|
protected |
Copies all current observers into an array and passes it back to the caller through lst. Returns the size of the array.
|
virtual |
Implements TAO_EC_ObserverStrategy.
|
virtual |
Implements TAO_EC_ObserverStrategy.
|
protected |
Compute consumer QOS.
|
protected |
Compute supplier QOS.
|
virtual |
Implements TAO_EC_ObserverStrategy.
|
protectedvirtual |
Recompute EC supplier publications and send them out to all observers.
Reimplemented in TAO_EC_Reactive_ObserverStrategy.
|
protected |
The event channel.
|
protected |
The handles are generated in sequential order, but are opaque to the client.
|
protected |
The lock.
|
protected |
Keep the set of Observers.