00001 // $Id: MonitorProxySupplier_T.h 87442 2009-11-10 18:18:06Z dai_y $ 00002 #ifndef MONITORPROXYSUPPLIER_H 00003 #define MONITORPROXYSUPPLIER_H 00004 00005 #include /**/ "ace/pre.h" 00006 #include "orbsvcs/Notify/MonitorControlExt/notify_mc_ext_export.h" 00007 00008 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00009 # pragma once 00010 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00011 00012 #include "ace/SString.h" 00013 #include "orbsvcs/Notify/MonitorControlExt/NotifyMonitoringExtS.h" 00014 #include "orbsvcs/Notify/Buffering_Strategy.h" 00015 #include "orbsvcs/Notify/SupplierAdmin.h" 00016 00017 #if defined (TAO_HAS_MONITOR_FRAMEWORK) && (TAO_HAS_MONITOR_FRAMEWORK == 1) 00018 00019 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00020 00021 namespace ACE 00022 { 00023 namespace Monitor_Control 00024 { 00025 class Monitor_Base; 00026 } 00027 } 00028 00029 ACE_END_VERSIONED_NAMESPACE_DECL 00030 00031 using namespace ACE_VERSIONED_NAMESPACE_NAME::ACE::Monitor_Control; 00032 00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00034 00035 class TAO_MonitorEventChannel; 00036 class TAO_MonitorConsumerAdmin; 00037 00038 template <typename ProxyPushSupplier> 00039 class TAO_MonitorProxySupplier_T 00040 : public TAO_Notify_Buffering_Strategy::Tracker 00041 , public ProxyPushSupplier 00042 { 00043 public: 00044 /// Construct a monitor supplier admin 00045 TAO_MonitorProxySupplier_T (void); 00046 00047 /// Remove the statistics for this event channel 00048 virtual ~TAO_MonitorProxySupplier_T (void); 00049 00050 /// Configure the statistics after construction 00051 /// @param admin the parent admin for this proxy 00052 /// @proxy_id the ID assigned to this proxy 00053 virtual void configure( 00054 TAO_Notify_ConsumerAdmin & admin, 00055 CosNotifyChannelAdmin::ProxyID_out proxy_id); 00056 00057 // Implement Tracer interface 00058 virtual void update_queue_count (size_t count); 00059 virtual void count_queue_overflow (bool local_overflow, bool global_overflow); 00060 00061 /// Access to Statistics Name 00062 ACE_CString & queue_item_stat_name (void); 00063 00064 /// Access to Statistics Name 00065 ACE_CString & overflow_stat_name (void); 00066 00067 private: 00068 ACE_CString base_stat_name_; 00069 ACE_CString queue_item_stat_name_; 00070 ACE_CString overflow_stat_name_; 00071 00072 Monitor_Base * queue_item_count_; 00073 Monitor_Base * overflows_; 00074 00075 TAO_MonitorEventChannel* event_channel_; 00076 TAO_MonitorConsumerAdmin * admin_; 00077 }; 00078 00079 TAO_END_VERSIONED_NAMESPACE_DECL 00080 00081 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) 00082 #include "orbsvcs/Notify/MonitorControlExt/MonitorProxySupplier_T.cpp" 00083 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ 00084 00085 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) 00086 #include "orbsvcs/Notify/MonitorControlExt/MonitorProxySupplier_T.cpp" 00087 #pragma implementation ("MonitorProxySupplier_T.cpp") 00088 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ 00089 00090 #endif // TAO_HAS_MONITOR_FRAMEWORK == 1 00091 00092 #include /**/ "ace/post.h" 00093 #endif /* MONITORPROXYSUPPLIER_H */ 00094