TAO_RTEvent
2.0.8
|
ProxyPushSupplier. More...
#include <EC_ProxySupplier.h>
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 | activate (RtecEventChannelAdmin::ProxyPushSupplier_ptr &proxy)=0 |
Activate in the POA. | |
virtual void | deactivate (void) throw () |
Deactivate from the POA. | |
virtual void | disconnect_push_supplier ()=0 |
Disconnect this from. | |
CORBA::Boolean | is_connected (void) const |
Return false if no consumer is connected... | |
CORBA::Boolean | is_suspended (void) const |
Return true if it is suspended. | |
RtecEventComm::PushConsumer_ptr | consumer (void) const |
const RtecEventChannelAdmin::ConsumerQOS & | subscriptions (void) const |
The QoS (subscription) used to connect to the EC. | |
virtual void | connected (TAO_EC_ProxyPushConsumer *consumer) |
virtual void | reconnected (TAO_EC_ProxyPushConsumer *consumer) |
virtual void | disconnected (TAO_EC_ProxyPushConsumer *consumer) |
virtual void | connected (TAO_EC_ProxyPushSupplier *supplier) |
virtual void | reconnected (TAO_EC_ProxyPushSupplier *supplier) |
virtual void | disconnected (TAO_EC_ProxyPushSupplier *supplier) |
virtual void | shutdown (void) |
The event channel is shutting down. | |
void | push_to_consumer (RtecEventComm::PushConsumer_ptr consumer, const RtecEventComm::EventSet &event) |
void | reactive_push_to_consumer (RtecEventComm::PushConsumer_ptr consumer, const RtecEventComm::EventSet &event) |
CORBA::Boolean | consumer_non_existent (CORBA::Boolean_out disconnected) |
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) |
virtual int | filter_nocopy (RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info) |
virtual void | push (const RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info) |
virtual void | push_nocopy (RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info) |
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) |
Protected Member Functions | |
void | consumer (RtecEventComm::PushConsumer_ptr consumer) |
void | consumer_i (RtecEventComm::PushConsumer_ptr consumer) |
void | suspend_connection_i (void) |
void | resume_connection_i (void) |
void | suspend_connection_locked (void) |
void | resume_connection_locked (void) |
CORBA::Boolean | is_connected_i (void) const |
The private version (without locking) of is_connected(). | |
void | cleanup_i (void) |
Release the child and the consumer. | |
Protected Attributes | |
TAO_EC_Event_Channel_Base * | event_channel_ |
The Event Channel that owns this object. | |
ACE_Lock * | lock_ |
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_Filter * | child_ |
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 &) |
virtual PortableServer::ObjectId | object_id (void)=0 |
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.
It does not assume ownership of the TAO_EC_Dispatching object. It makes a copy of the ConsumerQOS and the consumer object reference.
Locking is strategized, the event channel acts as a factory for the locking strategies.
typedef RtecEventChannelAdmin::ProxyPushSupplier_ptr TAO_EC_ProxyPushSupplier::_ptr_type |
typedef RtecEventChannelAdmin::ProxyPushSupplier_var TAO_EC_ProxyPushSupplier::_var_type |
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...
CORBA::ULong TAO_EC_ProxyPushSupplier::_decr_refcnt | ( | void | ) |
CORBA::ULong TAO_EC_ProxyPushSupplier::_incr_refcnt | ( | void | ) |
Increment and decrement the reference count.
virtual void TAO_EC_ProxyPushSupplier::activate | ( | RtecEventChannelAdmin::ProxyPushSupplier_ptr & | proxy | ) | [pure virtual] |
Activate in the POA.
Implemented in TAO_EC_Default_ProxyPushSupplier.
int TAO_EC_ProxyPushSupplier::add_dependencies | ( | const RtecEventComm::EventHeader & | header, |
const TAO_EC_QOS_Info & | qos_info | ||
) | [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.
void TAO_EC_ProxyPushSupplier::connected | ( | TAO_EC_ProxyPushConsumer * | consumer | ) | [virtual] |
Concrete implementations can use this methods to keep track of the suppliers that publish its events.
void TAO_EC_ProxyPushSupplier::connected | ( | TAO_EC_ProxyPushSupplier * | supplier | ) | [virtual] |
Usually implemented as no-ops, but some configurations may require this methods.
RtecEventComm::PushConsumer_ptr TAO_EC_ProxyPushSupplier::consumer | ( | void | ) | const |
Return the consumer object reference. It returns nil() if it has not connected yet.
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.
void TAO_EC_ProxyPushSupplier::consumer_i | ( | RtecEventComm::PushConsumer_ptr | consumer | ) | [protected] |
CORBA::Boolean TAO_EC_ProxyPushSupplier::consumer_non_existent | ( | CORBA::Boolean_out | disconnected | ) |
Invoke the _non_existent() pseudo-operation on the consumer. If it is disconnected then it returns true and sets the <disconnected> flag.
void TAO_EC_ProxyPushSupplier::deactivate | ( | void | ) | throw () [virtual] |
Deactivate from the POA.
virtual void TAO_EC_ProxyPushSupplier::disconnect_push_supplier | ( | ) | [pure virtual] |
Disconnect this from.
Implemented in TAO_EC_Default_ProxyPushSupplier, and TAO_EC_TPC_ProxyPushSupplier.
void TAO_EC_ProxyPushSupplier::disconnected | ( | TAO_EC_ProxyPushConsumer * | consumer | ) | [virtual] |
void TAO_EC_ProxyPushSupplier::disconnected | ( | TAO_EC_ProxyPushSupplier * | supplier | ) | [virtual] |
int TAO_EC_ProxyPushSupplier::filter | ( | const RtecEventComm::EventSet & | event, |
TAO_EC_QOS_Info & | qos_info | ||
) | [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.
Implements TAO_EC_Filter.
int TAO_EC_ProxyPushSupplier::filter_nocopy | ( | RtecEventComm::EventSet & | event, |
TAO_EC_QOS_Info & | qos_info | ||
) | [virtual] |
Implements TAO_EC_Filter.
CORBA::Boolean TAO_EC_ProxyPushSupplier::is_connected | ( | void | ) | const |
Return false if no consumer is connected...
CORBA::Boolean TAO_EC_ProxyPushSupplier::is_connected_i | ( | void | ) | const [protected] |
The private version (without locking) of is_connected().
CORBA::Boolean TAO_EC_ProxyPushSupplier::is_suspended | ( | void | ) | const |
Return true 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.
virtual PortableServer::ObjectId TAO_EC_ProxyPushSupplier::object_id | ( | void | ) | [private, pure virtual] |
Implemented in TAO_EC_Default_ProxyPushSupplier.
void TAO_EC_ProxyPushSupplier::pre_dispatch_hook | ( | RtecEventComm::EventSet & | ) | [private, virtual] |
void TAO_EC_ProxyPushSupplier::push | ( | const RtecEventComm::EventSet & | event, |
TAO_EC_QOS_Info & | qos_info | ||
) | [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.
void TAO_EC_ProxyPushSupplier::push_nocopy | ( | RtecEventComm::EventSet & | event, |
TAO_EC_QOS_Info & | qos_info | ||
) | [virtual] |
Implements TAO_EC_Filter.
void TAO_EC_ProxyPushSupplier::push_to_consumer | ( | RtecEventComm::PushConsumer_ptr | consumer, |
const RtecEventComm::EventSet & | event | ||
) |
Pushes to the consumer, verifies that it is connected and that it is not suspended. 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 | ||
) |
void TAO_EC_ProxyPushSupplier::reconnected | ( | TAO_EC_ProxyPushConsumer * | consumer | ) | [virtual] |
void TAO_EC_ProxyPushSupplier::reconnected | ( | TAO_EC_ProxyPushSupplier * | supplier | ) | [virtual] |
void TAO_EC_ProxyPushSupplier::refcount_zero_hook | ( | void | ) | [private, virtual] |
Template method hooks.
void TAO_EC_ProxyPushSupplier::resume_connection_i | ( | void | ) | [protected] |
void TAO_EC_ProxyPushSupplier::resume_connection_locked | ( | void | ) | [protected] |
void TAO_EC_ProxyPushSupplier::shutdown | ( | void | ) | [virtual] |
The event channel is shutting down.
const RtecEventChannelAdmin::ConsumerQOS & TAO_EC_ProxyPushSupplier::subscriptions | ( | void | ) | const |
The QoS (subscription) used to connect to the EC.
void TAO_EC_ProxyPushSupplier::suspend_connection_i | ( | void | ) | [protected] |
void TAO_EC_ProxyPushSupplier::suspend_connection_locked | ( | void | ) | [protected] |
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.
Store the default POA.
The Event Channel that owns this object.
ACE_Lock* TAO_EC_ProxyPushSupplier::lock_ [protected] |
The locking strategy.
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?