Proxy.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file Proxy.h
00005  *
00006  *  $Id: Proxy.h 81422 2008-04-24 12:33:29Z 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   /// Constructor
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   /// Inform this proxy that the following types are being advertised.
00075   void types_changed (const TAO_Notify_EventTypeSeq& added,
00076                       const TAO_Notify_EventTypeSeq& removed);
00077 
00078   /// Have updates been turned off.
00079   CORBA::Boolean updates_off (void);
00080 
00081   /// Destroy this object.
00082   virtual void destroy (void) = 0;
00083 
00084   /// Access our Peer.
00085   virtual TAO_Notify_Peer* peer (void) = 0;
00086 
00087   /// Implement the Obtain Types.
00088   virtual CosNotification::EventTypeSeq* obtain_types (
00089       CosNotifyChannelAdmin::ObtainInfoMode mode,
00090       const TAO_Notify_EventTypeSeq& types);
00091 
00092   /// Notification of subscriptions/offers set at the admin.
00093   virtual void admin_types_changed (const CosNotification::EventTypeSeq & added,
00094                                     const CosNotification::EventTypeSeq & removed) = 0;
00095 
00096 
00097   /// Override, TAO_Notify_Object::qos_changed
00098   virtual void qos_changed (const TAO_Notify_QoSProperties& qos_properties);
00099 
00100   // TAO_Notify::Topology_Object
00101 
00102   virtual void save_persistent (TAO_Notify::Topology_Saver& saver);
00103   virtual void save_attrs(TAO_Notify::NVPList& attrs);
00104   virtual const char * get_proxy_type_name (void) const = 0;
00105 
00106   virtual TAO_Notify::Topology_Object* load_child (const ACE_CString &type, CORBA::Long id,
00107     const TAO_Notify::NVPList& attrs);
00108 
00109 protected:
00110 
00111   /// Filter Administration
00112   TAO_Notify_FilterAdmin filter_admin_;
00113 
00114   /// The types that we're subscribed with the event manager.
00115   TAO_Notify_EventTypeSeq subscribed_types_;
00116 
00117   /// True if updates have been turned off.
00118   CORBA::Boolean updates_off_;
00119 };
00120 
00121 TAO_END_VERSIONED_NAMESPACE_DECL
00122 
00123 #if defined (__ACE_INLINE__)
00124 #include "orbsvcs/Notify/Proxy.inl"
00125 #endif /* __ACE_INLINE__ */
00126 
00127 #include /**/ "ace/post.h"
00128 
00129 #endif /* TAO_Notify_PROXY_H */

Generated on Tue Feb 2 17:45:29 2010 for TAO_CosNotification by  doxygen 1.4.7