TAO_EC_ProxyPushSupplier Class Reference

ProxyPushSupplier. More...

#include <EC_ProxySupplier.h>

Inheritance diagram for TAO_EC_ProxyPushSupplier:

Inheritance graph
[legend]
Collaboration diagram for TAO_EC_ProxyPushSupplier:

Collaboration graph
[legend]
List of all members.

Public Types

typedef RtecEventChannelAdmin::ProxyPushSupplier Interface
typedef RtecEventChannelAdmin::ProxyPushSupplier_var _var_type
typedef RtecEventChannelAdmin::ProxyPushSupplier_ptr _ptr_type

Public Member Functions

 TAO_EC_ProxyPushSupplier (TAO_EC_Event_Channel_Base *event_channel, int validate_connection)
 Constructor...
virtual ~TAO_EC_ProxyPushSupplier (void)
 Destructor...
virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL)=0
 Disconnect this from.
CORBA::Boolean is_connected (void) const
 Return 0 if no consumer is connected...
CORBA::Boolean is_suspended (void) const
 Return 1 if it is suspended.
RtecEventComm::PushConsumer_ptr consumer (void) const
const RtecEventChannelAdmin::ConsumerQOSsubscriptions (void) const
 The QoS (subscription) used to connect to the EC.
virtual void connected (TAO_EC_ProxyPushConsumer *consumer ACE_ENV_ARG_DECL)
virtual void reconnected (TAO_EC_ProxyPushConsumer *consumer ACE_ENV_ARG_DECL)
virtual void disconnected (TAO_EC_ProxyPushConsumer *consumer ACE_ENV_ARG_DECL)
virtual void connected (TAO_EC_ProxyPushSupplier *supplier ACE_ENV_ARG_DECL)
virtual void reconnected (TAO_EC_ProxyPushSupplier *supplier ACE_ENV_ARG_DECL)
virtual void disconnected (TAO_EC_ProxyPushSupplier *supplier ACE_ENV_ARG_DECL)
virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
 The event channel is shutting down.
void push_to_consumer (RtecEventComm::PushConsumer_ptr consumer, const RtecEventComm::EventSet &event ACE_ENV_ARG_DECL)
void reactive_push_to_consumer (RtecEventComm::PushConsumer_ptr consumer, const RtecEventComm::EventSet &event ACE_ENV_ARG_DECL)
CORBA::Boolean consumer_non_existent (CORBA::Boolean_out disconnected ACE_ENV_ARG_DECL)
CORBA::ULong _incr_refcnt (void)
 Increment and decrement the reference count.
CORBA::ULong _decr_refcnt (void)
virtual int filter (const RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info ACE_ENV_ARG_DECL)
virtual int filter_nocopy (RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info ACE_ENV_ARG_DECL)
virtual void push (const RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info ACE_ENV_ARG_DECL)
virtual void push_nocopy (RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info ACE_ENV_ARG_DECL)
virtual void clear (void)
virtual CORBA::ULong max_event_size (void) const
 Returns the maximum size of the events pushed by this filter.
virtual int can_match (const RtecEventComm::EventHeader &header) const
virtual int add_dependencies (const RtecEventComm::EventHeader &header, const TAO_EC_QOS_Info &qos_info ACE_ENV_ARG_DECL)

Protected Member Functions

void consumer (RtecEventComm::PushConsumer_ptr consumer)
void consumer_i (RtecEventComm::PushConsumer_ptr consumer)
void cleanup_i (void)
 Release the child and the consumer.

Protected Attributes

TAO_EC_Event_Channel_Baseevent_channel_
 The Event Channel that owns this object.
ACE_Locklock_
 The locking strategy.
CORBA::ULong refcount_
 The reference count.
RtecEventComm::PushConsumer_var consumer_
 The consumer....
CORBA::Boolean suspended_
 Is this consumer suspended?
RtecEventChannelAdmin::ConsumerQOS qos_
 The subscription and QoS information...
PortableServer::POA_var default_POA_
 Store the default POA.
TAO_EC_Filterchild_
 The filter object.
int consumer_validate_connection_
 Validate the connection to consumer on connect.

Private Member Functions

virtual void refcount_zero_hook (void)
 Template method hooks.
virtual void pre_dispatch_hook (RtecEventComm::EventSet &ACE_ENV_ARG_DECL)

Detailed Description

ProxyPushSupplier.

Implement the RtecEventChannelAdmin::ProxyPushSupplier interface, remember that this class is used to communicate with a PushConsumer, so, in effect, this is the ambassador for a consumer inside the event channel.

Memory Management

It does not assume ownership of the TAO_EC_Dispatching object. It makes a copy of the ConsumerQOS and the consumer object reference.

Locking

Locking is strategized, the event channel acts as a factory for the locking strategies.

Todo:
We don't need to provide a trivial filter, the object itself could short-circuit the filter() ---> push() cycle when the EC is properly configured, we need to explore this...


Member Typedef Documentation

typedef RtecEventChannelAdmin::ProxyPushSupplier_ptr TAO_EC_ProxyPushSupplier::_ptr_type

typedef RtecEventChannelAdmin::ProxyPushSupplier_var TAO_EC_ProxyPushSupplier::_var_type

typedef RtecEventChannelAdmin::ProxyPushSupplier TAO_EC_ProxyPushSupplier::Interface


Constructor & Destructor Documentation

TAO_EC_ProxyPushSupplier::TAO_EC_ProxyPushSupplier ( TAO_EC_Event_Channel_Base event_channel,
int  validate_connection 
)

Constructor...

TAO_EC_ProxyPushSupplier::~TAO_EC_ProxyPushSupplier ( void   )  [virtual]

Destructor...


Member Function Documentation

CORBA::ULong TAO_EC_ProxyPushSupplier::_decr_refcnt ( void   ) 

CORBA::ULong TAO_EC_ProxyPushSupplier::_incr_refcnt ( void   ) 

Increment and decrement the reference count.

virtual int TAO_EC_ProxyPushSupplier::add_dependencies ( const RtecEventComm::EventHeader header,
const TAO_EC_QOS_Info &qos_info  ACE_ENV_ARG_DECL 
) [virtual]

This is used for computing the scheduling dependencies:

Leaf filters check if the header could be matched, similar to the can_match() method; if it does they return 1, and 0 otherwise. Intermediate nodes always return 0.

This is used to build precise dependencies between the suppliers and the leaf of the filters that accept that event. Notice that only the nodes doing scheduling recurse through the list, so in configurations that do no require scheduling the recursion stops fairly soon.

Implements TAO_EC_Filter.

int TAO_EC_ProxyPushSupplier::can_match ( const RtecEventComm::EventHeader header  )  const [virtual]

Returns 0 if an event with that header could never be accepted. This can used by the suppliers to filter out consumers that couldn't possibly be interested in their events. The rt_info and

Implements TAO_EC_Filter.

void TAO_EC_ProxyPushSupplier::cleanup_i ( void   )  [protected]

Release the child and the consumer.

void TAO_EC_ProxyPushSupplier::clear ( void   )  [virtual]

Clear any saved state, must reset and assume no events have been received.

Implements TAO_EC_Filter.

virtual void TAO_EC_ProxyPushSupplier::connected ( TAO_EC_ProxyPushSupplier *supplier  ACE_ENV_ARG_DECL  )  [virtual]

Usually implemented as no-ops, but some configurations may require this methods.

virtual void TAO_EC_ProxyPushSupplier::connected ( TAO_EC_ProxyPushConsumer *consumer  ACE_ENV_ARG_DECL  )  [virtual]

Concrete implementations can use this methods to keep track of the suppliers that publish its events.

ACE_INLINE void TAO_EC_ProxyPushSupplier::consumer ( RtecEventComm::PushConsumer_ptr  consumer  )  [protected]

Set the consumer, used by some implementations to change the policies used when invoking operations on the consumer.

ACE_INLINE RtecEventComm::PushConsumer_ptr TAO_EC_ProxyPushSupplier::consumer ( void   )  const

Return the consumer object reference. It returns nil() if it has not connected yet.

ACE_INLINE void TAO_EC_ProxyPushSupplier::consumer_i ( RtecEventComm::PushConsumer_ptr  consumer  )  [protected]

CORBA::Boolean TAO_EC_ProxyPushSupplier::consumer_non_existent ( CORBA::Boolean_out disconnected  ACE_ENV_ARG_DECL  ) 

Invoke the _non_existent() pseudo-operation on the consumer. If it is disconnected then it returns true and sets the <disconnected> flag.

virtual void TAO_EC_ProxyPushSupplier::disconnect_push_supplier ( ACE_ENV_SINGLE_ARG_DECL   )  [pure virtual]

Disconnect this from.

virtual void TAO_EC_ProxyPushSupplier::disconnected ( TAO_EC_ProxyPushSupplier *supplier  ACE_ENV_ARG_DECL  )  [virtual]

virtual void TAO_EC_ProxyPushSupplier::disconnected ( TAO_EC_ProxyPushConsumer *consumer  ACE_ENV_ARG_DECL  )  [virtual]

virtual int TAO_EC_ProxyPushSupplier::filter ( const RtecEventComm::EventSet event,
TAO_EC_QOS_Info &qos_info  ACE_ENV_ARG_DECL 
) [virtual]

Filter this event, returns 1 if the event is accepted, 0 otherwise. Notice that there are two versions of the method, if the event is not const then filter can take ownership of the event.

Attention:
There seems to be a disparity in interfaces: Supplier always push event sets of size 1 to the EC_ProxyPushSupplier, and EC_Filters do not implement handling of sets of more than 1 event. Then, why is this not enforced by the interface by having EC_ProxyPushSupplier take an event rather than a set?

Implements TAO_EC_Filter.

virtual int TAO_EC_ProxyPushSupplier::filter_nocopy ( RtecEventComm::EventSet event,
TAO_EC_QOS_Info &qos_info  ACE_ENV_ARG_DECL 
) [virtual]

Implements TAO_EC_Filter.

ACE_INLINE CORBA::Boolean TAO_EC_ProxyPushSupplier::is_connected ( void   )  const

Return 0 if no consumer is connected...

ACE_INLINE CORBA::Boolean TAO_EC_ProxyPushSupplier::is_suspended ( void   )  const

Return 1 if it is suspended.

CORBA::ULong TAO_EC_ProxyPushSupplier::max_event_size ( void   )  const [virtual]

Returns the maximum size of the events pushed by this filter.

Implements TAO_EC_Filter.

void TAO_EC_ProxyPushSupplier::pre_dispatch_hook ( RtecEventComm::EventSet ACE_ENV_ARG_DECL  )  [private, virtual]

virtual void TAO_EC_ProxyPushSupplier::push ( const RtecEventComm::EventSet event,
TAO_EC_QOS_Info &qos_info  ACE_ENV_ARG_DECL 
) [virtual]

This is called by the children when they accept an event and which to pass it up. Notice that there are two versions of the method, if the event is not const then filter can take ownership of the event.

Implements TAO_EC_Filter.

virtual void TAO_EC_ProxyPushSupplier::push_nocopy ( RtecEventComm::EventSet event,
TAO_EC_QOS_Info &qos_info  ACE_ENV_ARG_DECL 
) [virtual]

Implements TAO_EC_Filter.

void TAO_EC_ProxyPushSupplier::push_to_consumer ( RtecEventComm::PushConsumer_ptr  consumer,
const RtecEventComm::EventSet &event  ACE_ENV_ARG_DECL 
)

These methods take consumer argument because during the time the filters have been processing the event, this proxy's consumer may have changed.

void TAO_EC_ProxyPushSupplier::reactive_push_to_consumer ( RtecEventComm::PushConsumer_ptr  consumer,
const RtecEventComm::EventSet &event  ACE_ENV_ARG_DECL 
)

virtual void TAO_EC_ProxyPushSupplier::reconnected ( TAO_EC_ProxyPushSupplier *supplier  ACE_ENV_ARG_DECL  )  [virtual]

virtual void TAO_EC_ProxyPushSupplier::reconnected ( TAO_EC_ProxyPushConsumer *consumer  ACE_ENV_ARG_DECL  )  [virtual]

void TAO_EC_ProxyPushSupplier::refcount_zero_hook ( void   )  [private, virtual]

Template method hooks.

virtual void TAO_EC_ProxyPushSupplier::shutdown ( ACE_ENV_SINGLE_ARG_DECL   )  [virtual]

The event channel is shutting down.

ACE_INLINE const RtecEventChannelAdmin::ConsumerQOS & TAO_EC_ProxyPushSupplier::subscriptions ( void   )  const

The QoS (subscription) used to connect to the EC.


Member Data Documentation

TAO_EC_Filter* TAO_EC_ProxyPushSupplier::child_ [protected]

The filter object.

RtecEventComm::PushConsumer_var TAO_EC_ProxyPushSupplier::consumer_ [protected]

The consumer....

int TAO_EC_ProxyPushSupplier::consumer_validate_connection_ [protected]

Validate the connection to consumer on connect.

PortableServer::POA_var TAO_EC_ProxyPushSupplier::default_POA_ [protected]

Store the default POA.

TAO_EC_Event_Channel_Base* TAO_EC_ProxyPushSupplier::event_channel_ [protected]

The Event Channel that owns this object.

ACE_Lock* TAO_EC_ProxyPushSupplier::lock_ [protected]

The locking strategy.

RtecEventChannelAdmin::ConsumerQOS TAO_EC_ProxyPushSupplier::qos_ [protected]

The subscription and QoS information...

CORBA::ULong TAO_EC_ProxyPushSupplier::refcount_ [protected]

The reference count.

CORBA::Boolean TAO_EC_ProxyPushSupplier::suspended_ [protected]

Is this consumer suspended?


The documentation for this class was generated from the following files:
Generated on Tue Nov 21 09:55:17 2006 for TAO_RTEvent by  doxygen 1.4.7-1