diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h | 67 |
1 files changed, 22 insertions, 45 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h index 3cc9cd8b303..e1ce7779e39 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h @@ -12,6 +12,12 @@ // = AUTHOR // Carlos O'Ryan (coryan@cs.wustl.edu) // +// = DESCRIPTION +// Implement the RtecEventChannelAdmin::ProxyPushConsumer interface, +// remember that this class is used to communicate with a +// PushSupplier, so, in effect, this is the ambassador for a +// supplier inside the event channel. +// // = CREDITS // Based on previous work by Tim Harrison (harrison@cs.wustl.edu) // and other members of the DOC group. @@ -36,16 +42,14 @@ class TAO_EC_Event_Channel; class TAO_EC_ProxyPushSupplier; class TAO_EC_SupplierFiltering; -class TAO_ORBSVCS_Export TAO_EC_ProxyPushConsumer : public POA_RtecEventChannelAdmin::ProxyPushConsumer +class TAO_EC_ProxyPushConsumer : public POA_RtecEventChannelAdmin::ProxyPushConsumer { // = TITLE // ProxyPushConsumer // // = DESCRIPTION - // Implement the RtecEventChannelAdmin::ProxyPushConsumer interface, - // remember that this class is used to communicate with a - // PushSupplier, so, in effect, this is the ambassador for a - // supplier inside the event channel. + // Implements the ProxyPushConsumer interface, i.e. the object + // used to communicate with a particular supplier. // // = MEMORY MANAGMENT // It makes a copy of the SupplierQOS and the supplier object @@ -60,7 +64,8 @@ class TAO_ORBSVCS_Export TAO_EC_ProxyPushConsumer : public POA_RtecEventChannelA // externally. // public: - TAO_EC_ProxyPushConsumer (TAO_EC_Event_Channel* event_channel); + TAO_EC_ProxyPushConsumer (TAO_EC_Event_Channel* event_channel, + TAO_EC_SupplierFiltering* filtering); // constructor... virtual ~TAO_EC_ProxyPushConsumer (void); @@ -77,65 +82,40 @@ public: // The QoS (subscription) used to connect to the EC. virtual void connected (TAO_EC_ProxyPushSupplier* supplier, - CORBA::Environment &env); + CORBA::Environment &env); virtual void disconnected (TAO_EC_ProxyPushSupplier* supplier, - CORBA::Environment &env); + CORBA::Environment &env); // Concrete implementations can use this methods to keep track of // the consumers interested in this events. virtual void connected (TAO_EC_ProxyPushConsumer* consumer, - CORBA::Environment &env); + CORBA::Environment &env); virtual void disconnected (TAO_EC_ProxyPushConsumer* consumer, - CORBA::Environment &env); + CORBA::Environment &env); // Usually implemented as no-ops, but some configurations may // require this methods. - virtual void shutdown (CORBA::Environment&); - // The event channel is shutting down - - const RtecEventChannelAdmin::SupplierQOS& publications_i (void) const; - // The QoS (subscription) used to connect to the EC, assumes the - // locks are held, use with care! + void set_default_POA (PortableServer::POA_ptr poa); + // Set this servant's default POA - CORBA::ULong _incr_refcnt (void); - CORBA::ULong _decr_refcnt (void); - // Increment and decrement the reference count. + virtual PortableServer::POA_ptr _default_POA (CORBA::Environment& env); + // Override the ServantBase method. // = The RtecEventChannelAdmin::ProxyPushConsumer methods... virtual void connect_push_supplier ( - RtecEventComm::PushSupplier_ptr push_supplier, + RtecEventComm::PushSupplier_ptr push_supplier, const RtecEventChannelAdmin::SupplierQOS& qos, CORBA::Environment &); virtual void push (const RtecEventComm::EventSet& event, CORBA::Environment &); virtual void disconnect_push_consumer (CORBA::Environment &); - // = The Servant methods - virtual PortableServer::POA_ptr _default_POA (CORBA::Environment& env); - virtual void _add_ref (CORBA_Environment &ACE_TRY_ENV = - CORBA::default_environment ()); - virtual void _remove_ref (CORBA_Environment &ACE_TRY_ENV = - CORBA::default_environment ()); - -private: - CORBA::Boolean is_connected_i (void) const; - // The private version (without locking) of is_connected(). - - void cleanup_i (void); - // Release the filter and the supplier - - void deactivate (CORBA::Environment &ACE_TRY_ENV); - // Deactivate from the POA - private: TAO_EC_Event_Channel* event_channel_; // The supplier admin, used for activation and memory managment. - ACE_Lock* lock_; - // The locking strategy. - - CORBA::ULong refcount_; - // The reference count. + TAO_EC_SupplierFiltering* supplier_filtering_; + // The strategy to do filtering close to the supplier RtecEventComm::PushSupplier_var supplier_; // The supplier.... @@ -145,9 +125,6 @@ private: PortableServer::POA_var default_POA_; // Store the default POA. - - TAO_EC_SupplierFiltering* filter_; - // The strategy to do filtering close to the supplier }; #if defined (__ACE_INLINE__) |