diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.h | 150 |
1 files changed, 129 insertions, 21 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.h index 5d9508dd593..35dc6aa46fd 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_T.h @@ -17,8 +17,16 @@ #ifndef TAO_NOTIFY_PROXY_SUPPLIER_T_H #define TAO_NOTIFY_PROXY_SUPPLIER_T_H -#include "Notify_Proxy_T.h" +#include "Notify_QoSAdmin_i.h" +#include "Notify_FilterAdmin_i.h" +#include "Notify_Listeners.h" +#include "orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/CosNotificationS.h" +#include "ace/Containers_T.h" + class TAO_Notify_ConsumerAdmin_i; +class TAO_Notify_Resource_Manager; +class TAO_Notify_Event_Manager; #if defined(_MSC_VER) #if (_MSC_VER >= 1200) @@ -28,13 +36,15 @@ class TAO_Notify_ConsumerAdmin_i; #endif /* _MSC_VER */ template <class SERVANT_TYPE> -class TAO_ORBSVCS_Export TAO_Notify_ProxySupplier : public TAO_Notify_Proxy <SERVANT_TYPE>, public TAO_Notify_Event_Listener +class TAO_ORBSVCS_Export TAO_Notify_ProxySupplier : public SERVANT_TYPE, public TAO_Notify_Event_Listener, public TAO_Notify_Update_Listener { // = TITLE // TAO_Notify_ProxySupplier // // = DESCRIPTION - // The is a base class for all proxy suppliers. + // The is a base class for all proxy suppliers, templatized by the servant + // type. All the Filter Admin and QoS Admin interface methods are + // implemented here by delegating to the admin implementations. // public: @@ -48,17 +58,7 @@ public: void init (CORBA::Environment &ACE_TRY_ENV); // Init - // = Notify_Event_Listener methods - virtual void dispatch_event (TAO_Notify_Event &event, CORBA::Environment &ACE_TRY_ENV); - // = Interface methods -virtual CosNotifyChannelAdmin::ConsumerAdmin_ptr MyAdmin ( - CORBA::Environment &ACE_TRY_ENV - ) - ACE_THROW_SPEC (( - CORBA::SystemException - )); - virtual void suspend_connection ( CORBA::Environment &ACE_TRY_ENV ) @@ -77,6 +77,20 @@ virtual void resume_connection ( CosNotifyChannelAdmin::NotConnected )); +virtual CosNotifyChannelAdmin::ProxyType MyType ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyChannelAdmin::ConsumerAdmin_ptr MyAdmin ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + virtual CosNotifyFilter::MappingFilter_ptr priority_filter ( CORBA::Environment &ACE_TRY_ENV ) @@ -115,6 +129,82 @@ virtual CosNotification::EventTypeSeq * obtain_offered_types ( CORBA::SystemException )); +virtual void validate_event_qos ( + const CosNotification::QoSProperties & required_qos, + CosNotification::NamedPropertyRangeSeq_out available_qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )); + +virtual CosNotification::QoSProperties * get_qos ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual void set_qos ( + const CosNotification::QoSProperties & qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )); + +virtual void validate_qos ( + const CosNotification::QoSProperties & required_qos, + CosNotification::NamedPropertyRangeSeq_out available_qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )); + +virtual CosNotifyFilter::FilterID add_filter ( + CosNotifyFilter::Filter_ptr new_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual void remove_filter ( + CosNotifyFilter::FilterID filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyFilter::FilterNotFound + )); + +virtual CosNotifyFilter::Filter_ptr get_filter ( + CosNotifyFilter::FilterID filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyFilter::FilterNotFound + )); + +virtual CosNotifyFilter::FilterIDSeq * get_all_filters ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual void remove_all_filters ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + virtual void subscription_change ( const CosNotification::EventTypeSeq & added, const CosNotification::EventTypeSeq & removed, @@ -127,26 +217,44 @@ virtual void subscription_change ( protected: // = Helper methods - virtual void dispatch_event_i (TAO_Notify_Event &event, CORBA::Environment &ACE_TRY_ENV) = 0; virtual void cleanup_i (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); // Cleanup all resources used by this object. - void on_connected (CORBA::Environment &ACE_TRY_ENV); - // Derived classes should call this when their consumers connect. + void update_subscription_list_i (const CosNotification::EventTypeSeq & added, const CosNotification::EventTypeSeq & removed, EVENTTYPE_LIST& added_ret, EVENTTYPE_LIST& removed_ret, CORBA::Environment &ACE_TRY_ENV); + + void subscribe_for_events_i (CORBA::Environment &ACE_TRY_ENV); + // Derived classes should call this when they consumers connect. // = Data members + CosNotifyChannelAdmin::ProxyType mytype_; + // What type are we? + TAO_Notify_ConsumerAdmin_i* myadmin_; // My parent consumer admin. - EVENTTYPE_LIST subscription_list_; - // A list of event types that we are interested in. + TAO_Notify_Event_Manager* event_manager_; + // Our event manager. + + TAO_Notify_Resource_Manager* resource_manager_; + // The resource factory. + + EVENTTYPE_LIST subscription_list_; + // A list of event types that we are interested in. + + CORBA::Boolean is_connected_; + // True if we are connected to a consumer. CORBA::Boolean is_suspended_; // True if we are connected to a consumer and suspended. - typedef ACE_Unbounded_Queue<TAO_Notify_Event*> EVENT_LIST; - EVENT_LIST event_list_; - // A list of events populated when we're suspended. + CORBA::Boolean is_destroyed_; + // True if we are destroyed. + + TAO_Notify_QoSAdmin_i qos_admin_; + // Handle QoS admin methods. + + TAO_Notify_FilterAdmin_i filter_admin_; + // Handles the Filter admin methods. }; #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) |