Peer.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file Peer.h
00005  *
00006  *  Peer.h,v 1.16 2006/03/14 06:14:34 jtc Exp
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 (ACE_ENV_SINGLE_ARG_DECL);
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                                  ACE_ENV_ARG_DECL);
00061 
00062   /// QoS changed notification from the Peer.
00063   virtual void qos_changed (const TAO_Notify_QoSProperties& qos_properties);
00064 
00065   /// Handle dispatch exceptions.
00066   void handle_dispatch_exception (ACE_ENV_SINGLE_ARG_DECL);
00067 
00068   /// Retrieve the ior of this peer
00069   virtual ACE_CString get_ior (void) const = 0;
00070 
00071 protected:
00072   /// Implementation of Peer specific dispatch_updates
00073   virtual void dispatch_updates_i (const CosNotification::EventTypeSeq& added,
00074                                    const CosNotification::EventTypeSeq& removed
00075                                    ACE_ENV_ARG_DECL) = 0;
00076 
00077 private:
00078   /// Release
00079   virtual void release (void) = 0;
00080 };
00081 
00082 TAO_END_VERSIONED_NAMESPACE_DECL
00083 
00084 #include /**/ "ace/post.h"
00085 #endif /* TAO_Notify_PEER_H */

Generated on Thu Nov 9 13:24:12 2006 for TAO_CosNotification by doxygen 1.3.6