Peer.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file Peer.h
00005  *
00006  *  $Id: Peer.h 76589 2007-01-25 18:04:11Z elliott_c $
00007  *
00008  *  @author Pradeep Gore <pradeep@oomworks.com>
00009  */
00010 
00011 #ifndef TAO_Notify_PEER_H
00012 #define TAO_Notify_PEER_H
00013 #include /**/ "ace/pre.h"
00014 
00015 #include "orbsvcs/Notify/notify_serv_export.h"
00016 
00017 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00018 # pragma once
00019 #endif /* ACE_LACKS_PRAGMA_ONCE */
00020 
00021 #include "orbsvcs/CosNotificationC.h"
00022 #include "orbsvcs/Notify/EventTypeSeq.h"
00023 
00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 class TAO_Notify_Proxy;
00027 class TAO_Notify_QoSProperties;
00028 class TAO_Notify_Peer;
00029 
00030 /**
00031  * @class TAO_Notify_Peer
00032  *
00033  * @brief Base class for Supplier and Consumer classes.
00034  *        This object delegates its reference count to its creator proxy object.
00035  *
00036  */
00037 class TAO_Notify_Serv_Export TAO_Notify_Peer
00038 {
00039 public:
00040   typedef TAO_Notify_Refcountable_Guard_T< TAO_Notify_Peer > Ptr;
00041   /// Constuctor
00042   TAO_Notify_Peer (void);
00043 
00044   /// Destructor
00045   virtual ~TAO_Notify_Peer ();
00046 
00047   /// This method sigantures deliberately match the RefCounting methods required for ESF Proxy
00048   CORBA::ULong _incr_refcnt (void);
00049   CORBA::ULong _decr_refcnt (void);
00050 
00051   /// Shutdown the peer.
00052   virtual void shutdown (void);
00053 
00054   /// Access Proxy.
00055   virtual TAO_Notify_Proxy* proxy (void) = 0;
00056 
00057   // Dispatch updates
00058   virtual void dispatch_updates (const TAO_Notify_EventTypeSeq & added,
00059                                  const TAO_Notify_EventTypeSeq & removed);
00060 
00061   /// QoS changed notification from the Peer.
00062   virtual void qos_changed (const TAO_Notify_QoSProperties& qos_properties);
00063 
00064   /// Handle dispatch exceptions.
00065   void handle_dispatch_exception (void);
00066 
00067   /// Retrieve the ior of this peer
00068   virtual ACE_CString get_ior (void) const = 0;
00069 
00070 protected:
00071   /// Implementation of Peer specific dispatch_updates
00072   virtual void dispatch_updates_i (const CosNotification::EventTypeSeq& added,
00073                                    const CosNotification::EventTypeSeq& removed) = 0;
00074 
00075 private:
00076   /// Release
00077   virtual void release (void) = 0;
00078 };
00079 
00080 TAO_END_VERSIONED_NAMESPACE_DECL
00081 
00082 #include /**/ "ace/post.h"
00083 #endif /* TAO_Notify_PEER_H */

Generated on Sun Jan 27 15:39:57 2008 for TAO_CosNotification by doxygen 1.3.6