00001 // -*- C++ -*- 00002 00003 /** 00004 * @file Proxy.h 00005 * 00006 * $Id: Proxy.h 77001 2007-02-12 07:54:49Z johnnyw $ 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 00057 /// Activate with a given ID 00058 virtual CORBA::Object_ptr activate ( 00059 PortableServer::Servant servant, 00060 CORBA::Long id); 00061 00062 /// Deactivate 00063 void deactivate (void); 00064 00065 /// Obtain the Proxy's subscribed types. 00066 void subscribed_types (TAO_Notify_EventTypeSeq& subscribed_types); 00067 00068 /// Check if this event passes the admin and proxy filters. 00069 CORBA::Boolean check_filters ( 00070 const TAO_Notify_Event* event, 00071 TAO_Notify_FilterAdmin& parent_filter_admin, 00072 CosNotifyChannelAdmin::InterFilterGroupOperator filter_operator 00073 ); 00074 00075 /// Inform this proxy that the following types are being advertised. 00076 void types_changed (const TAO_Notify_EventTypeSeq& added, 00077 const TAO_Notify_EventTypeSeq& removed); 00078 00079 /// Have updates been turned off. 00080 CORBA::Boolean updates_off (void); 00081 00082 /// Destroy this object. 00083 virtual void destroy (void) = 0; 00084 00085 /// Access our Peer. 00086 virtual TAO_Notify_Peer* peer (void) = 0; 00087 00088 /// Implement the Obtain Types. 00089 virtual CosNotification::EventTypeSeq* obtain_types ( 00090 CosNotifyChannelAdmin::ObtainInfoMode mode, 00091 const TAO_Notify_EventTypeSeq& types 00092 ); 00093 00094 /// Notification of subscriptions/offers set at the admin. 00095 virtual void admin_types_changed (const CosNotification::EventTypeSeq & added, 00096 const CosNotification::EventTypeSeq & removed) = 0; 00097 00098 00099 /// Override, TAO_Notify_Object::qos_changed 00100 virtual void qos_changed (const TAO_Notify_QoSProperties& qos_properties); 00101 00102 // TAO_Notify::Topology_Object 00103 00104 virtual void save_persistent (TAO_Notify::Topology_Saver& saver); 00105 virtual void save_attrs(TAO_Notify::NVPList& attrs); 00106 virtual const char * get_proxy_type_name (void) const = 0; 00107 00108 virtual TAO_Notify::Topology_Object* load_child (const ACE_CString &type, CORBA::Long id, 00109 const TAO_Notify::NVPList& attrs); 00110 00111 protected: 00112 00113 /// Filter Administration 00114 TAO_Notify_FilterAdmin filter_admin_; 00115 00116 /// The types that we're subscribed with the event manager. 00117 TAO_Notify_EventTypeSeq subscribed_types_; 00118 00119 /// True if updates have been turned off. 00120 CORBA::Boolean updates_off_; 00121 }; 00122 00123 TAO_END_VERSIONED_NAMESPACE_DECL 00124 00125 #if defined (__ACE_INLINE__) 00126 #include "orbsvcs/Notify/Proxy.inl" 00127 #endif /* __ACE_INLINE__ */ 00128 00129 #include /**/ "ace/post.h" 00130 00131 #endif /* TAO_Notify_PROXY_H */