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

# TAO_EC_Basic_ObserverStrategy Class Reference

A simple observer strategy. More...

`#include <EC_ObserverStrategy.h>`

Inheritance diagram for TAO_EC_Basic_ObserverStrategy:

[legend]
Collaboration diagram for TAO_EC_Basic_ObserverStrategy:

[legend]
List of all members.

## 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 Methods
| TAO_EC_Basic_ObserverStrategy (TAO_EC_Event_Channel *ec, ACE_Lock *lock)
| Constructor. More...
virtual | ~TAO_EC_Basic_ObserverStrategy (void)
| Destructor. More...
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)
| The basic methods to support the EC strategies. More...
virtual void | remove_observer (RtecEventChannelAdmin::Observer_Handle ACE_ENV_ARG_DECL) throw ( CORBA::SystemException, RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER)
virtual void | connected (TAO_EC_ProxyPushConsumer *ACE_ENV_ARG_DECL_NOT_USED)
| Used by the EC to inform the ObserverStrategy that a Consumer has connected or disconnected from it. More...
virtual void | disconnected (TAO_EC_ProxyPushConsumer *ACE_ENV_ARG_DECL_NOT_USED)
virtual void | connected (TAO_EC_ProxyPushSupplier *ACE_ENV_ARG_DECL_NOT_USED)
| Used by the EC to inform the ObserverStrategy that a Consumer has connected or disconnected from it. More...
virtual void | disconnected (TAO_EC_ProxyPushSupplier *ACE_ENV_ARG_DECL_NOT_USED)
## Protected Methods
void | fill_qos (RtecEventChannelAdmin::ConsumerQOS &qos ACE_ENV_ARG_DECL)
| Helper functions to compute the consumer and supplier QOS. More...
void | fill_qos (RtecEventChannelAdmin::SupplierQOS &qos ACE_ENV_ARG_DECL)
## Protected Attributes
TAO_EC_Event_Channel * | event_channel_
| The event channel. More...
ACE_Lock * | lock_
| The lock. More...
RtecEventChannelAdmin::Observer_Handle | handle_generator_
| The handles are generated in sequential order, but are opaque to the client. More...
Observer_Map | observers_
| Keep the set of Observers. More...

## Detailed Description

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.

## Memory Management

It assumes ownership of the <lock>, but not of the Event_Channel.

## Member Typedef Documentation

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

## Constructor & Destructor Documentation

ACE_INLINE TAO_EC_Basic_ObserverStrategy::TAO_EC_Basic_ObserverStrategy | ( | TAO_EC_Event_Channel * | ec,
|  | ACE_Lock * | lock
| ) |

| Constructor.

TAO_EC_Basic_ObserverStrategy::~TAO_EC_Basic_ObserverStrategy | ( | void |  | ) | `[virtual]`

| Destructor.

## Member Function Documentation

RtecEventChannelAdmin::Observer_Handle TAO_EC_Basic_ObserverStrategy::append_observer | ( | RtecEventChannelAdmin::Observer_ptr | obs | ) | throw ( CORBA::SystemException, RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER)`[virtual]`

| The basic methods to support the EC strategies. Reimplemented from TAO_EC_ObserverStrategy.

virtual void TAO_EC_Basic_ObserverStrategy::connected | ( | TAO_EC_ProxyPushSupplier * | ACE_ENV_ARG_DECL_NOT_USED | ) | `[virtual]`

| Used by the EC to inform the ObserverStrategy that a Consumer has connected or disconnected from it. Reimplemented from TAO_EC_ObserverStrategy.

virtual void TAO_EC_Basic_ObserverStrategy::connected | ( | TAO_EC_ProxyPushConsumer * | ACE_ENV_ARG_DECL_NOT_USED | ) | `[virtual]`

| Used by the EC to inform the ObserverStrategy that a Consumer has connected or disconnected from it. Reimplemented from TAO_EC_ObserverStrategy.

virtual void TAO_EC_Basic_ObserverStrategy::disconnected | ( | TAO_EC_ProxyPushSupplier * | ACE_ENV_ARG_DECL_NOT_USED | ) | `[virtual]`

| Reimplemented from TAO_EC_ObserverStrategy.

virtual void TAO_EC_Basic_ObserverStrategy::disconnected | ( | TAO_EC_ProxyPushConsumer * | ACE_ENV_ARG_DECL_NOT_USED | ) | `[virtual]`

| Reimplemented from TAO_EC_ObserverStrategy.

void TAO_EC_Basic_ObserverStrategy::fill_qos | ( | RtecEventChannelAdmin::SupplierQOS &qos | ACE_ENV_ARG_DECL | ) | `[protected]`

void TAO_EC_Basic_ObserverStrategy::fill_qos | ( | RtecEventChannelAdmin::ConsumerQOS &qos | ACE_ENV_ARG_DECL | ) | `[protected]`

| Helper functions to compute the consumer and supplier QOS.

void TAO_EC_Basic_ObserverStrategy::remove_observer | ( | RtecEventChannelAdmin::Observer_Handle | handle | ) | throw ( CORBA::SystemException, RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER)`[virtual]`

| Reimplemented from TAO_EC_ObserverStrategy.

## Member Data Documentation

TAO_EC_Event_Channel* TAO_EC_Basic_ObserverStrategy::event_channel_`[protected]`

| The event channel.

RtecEventChannelAdmin::Observer_Handle TAO_EC_Basic_ObserverStrategy::handle_generator_`[protected]`

| The handles are generated in sequential order, but are opaque to the client.

ACE_Lock* TAO_EC_Basic_ObserverStrategy::lock_`[protected]`

| The lock.

Observer_Map TAO_EC_Basic_ObserverStrategy::observers_`[protected]`

| Keep the set of Observers.

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

- EC_ObserverStrategy.h
- EC_ObserverStrategy.cpp
- EC_ObserverStrategy.i