00001 // -*- C++ -*- 00002 00003 /** 00004 * @file Proxy.h 00005 * 00006 * Proxy.h,v 1.18 2006/03/14 06:14:34 jtc Exp 00007 * 00008 * @author Pradeep Gore <pradeep@oomworks.com> 00009 */ 00010 00011 #ifndef TAO_Notify_PROXY_H 00012 #define TAO_Notify_PROXY_H 00013 00014 #include /**/ "ace/pre.h" 00015 00016 #include "orbsvcs/Notify/notify_serv_export.h" 00017 00018 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00019 # pragma once 00020 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00021 00022 #include "orbsvcs/Notify/Topology_Object.h" 00023 #include "orbsvcs/Notify/EventTypeSeq.h" 00024 #include "orbsvcs/Notify/FilterAdmin.h" 00025 #include "orbsvcs/Notify/Admin.h" 00026 00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00028 00029 class TAO_Notify_Admin; 00030 class TAO_Notify_Peer; 00031 00032 /** 00033 * @class TAO_Notify_Proxy 00034 * 00035 * @brief Base class proxy for all proxys in NS. 00036 * 00037 */ 00038 class TAO_Notify_Serv_Export TAO_Notify_Proxy 00039 : public TAO_Notify::Topology_Parent 00040 { 00041 friend class TAO_Notify_Peer; 00042 00043 public: 00044 typedef TAO_Notify_Refcountable_Guard_T<TAO_Notify_Proxy> Ptr; 00045 typedef CosNotifyChannelAdmin::ProxyIDSeq SEQ; 00046 typedef CosNotifyChannelAdmin::ProxyIDSeq_var SEQ_VAR; 00047 00048 /// Constuctor 00049 TAO_Notify_Proxy (void); 00050 00051 /// Destructor 00052 virtual ~TAO_Notify_Proxy (); 00053 00054 /// Activate 00055 virtual CORBA::Object_ptr activate (PortableServer::Servant servant 00056 ACE_ENV_ARG_DECL); 00057 00058 /// Activate with a given ID 00059 virtual CORBA::Object_ptr activate ( 00060 PortableServer::Servant servant, 00061 CORBA::Long id 00062 ACE_ENV_ARG_DECL); 00063 00064 /// Deactivate 00065 void deactivate (ACE_ENV_SINGLE_ARG_DECL); 00066 00067 /// Obtain the Proxy's subscribed types. 00068 void subscribed_types (TAO_Notify_EventTypeSeq& subscribed_types 00069 ACE_ENV_ARG_DECL); 00070 00071 /// Check if this event passes the admin and proxy filters. 00072 CORBA::Boolean check_filters ( 00073 const TAO_Notify_Event* event, 00074 TAO_Notify_FilterAdmin& parent_filter_admin, 00075 CosNotifyChannelAdmin::InterFilterGroupOperator filter_operator 00076 ACE_ENV_ARG_DECL 00077 ); 00078 00079 /// Inform this proxy that the following types are being advertised. 00080 void types_changed (const TAO_Notify_EventTypeSeq& added, 00081 const TAO_Notify_EventTypeSeq& removed 00082 ACE_ENV_ARG_DECL); 00083 00084 /// Have updates been turned off. 00085 CORBA::Boolean updates_off (void); 00086 00087 /// Destroy this object. 00088 virtual void destroy (ACE_ENV_SINGLE_ARG_DECL) = 0; 00089 00090 /// Access our Peer. 00091 virtual TAO_Notify_Peer* peer (void) = 0; 00092 00093 /// Implement the Obtain Types. 00094 virtual CosNotification::EventTypeSeq* obtain_types ( 00095 CosNotifyChannelAdmin::ObtainInfoMode mode, 00096 const TAO_Notify_EventTypeSeq& types 00097 ACE_ENV_ARG_DECL 00098 ) 00099 ACE_THROW_SPEC ((CORBA::SystemException)); 00100 00101 /// Notification of subscriptions/offers set at the admin. 00102 virtual void admin_types_changed (const CosNotification::EventTypeSeq & added, 00103 const CosNotification::EventTypeSeq & removed 00104 ACE_ENV_ARG_DECL) = 0; 00105 00106 00107 /// Override, TAO_Notify_Object::qos_changed 00108 virtual void qos_changed (const TAO_Notify_QoSProperties& qos_properties); 00109 00110 // TAO_Notify::Topology_Object 00111 00112 virtual void save_persistent (TAO_Notify::Topology_Saver& saver ACE_ENV_ARG_DECL); 00113 virtual void save_attrs(TAO_Notify::NVPList& attrs); 00114 virtual const char * get_proxy_type_name (void) const = 0; 00115 00116 virtual TAO_Notify::Topology_Object* load_child (const ACE_CString &type, CORBA::Long id, 00117 const TAO_Notify::NVPList& attrs ACE_ENV_ARG_DECL); 00118 00119 protected: 00120 00121 /// Filter Administration 00122 TAO_Notify_FilterAdmin filter_admin_; 00123 00124 /// The types that we're subscribed with the event manager. 00125 TAO_Notify_EventTypeSeq subscribed_types_; 00126 00127 /// True if updates have been turned off. 00128 CORBA::Boolean updates_off_; 00129 }; 00130 00131 TAO_END_VERSIONED_NAMESPACE_DECL 00132 00133 #if defined (__ACE_INLINE__) 00134 #include "orbsvcs/Notify/Proxy.inl" 00135 #endif /* __ACE_INLINE__ */ 00136 00137 #include /**/ "ace/post.h" 00138 00139 #endif /* TAO_Notify_PROXY_H */