ProxyConsumer.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file ProxyConsumer.h
00005  *
00006  *  $Id: ProxyConsumer.h 77001 2007-02-12 07:54:49Z johnnyw $
00007  *
00008  *  @author Pradeep Gore <pradeep@oomworks.com>
00009  */
00010 
00011 #ifndef TAO_Notify_PROXYCONSUMER_H
00012 #define TAO_Notify_PROXYCONSUMER_H
00013 
00014 #include /**/ "ace/pre.h"
00015 
00016 #include "orbsvcs/Notify/notify_serv_export.h"
00017 #include "orbsvcs/Notify/Event.h"
00018 #include "orbsvcs/Notify/Proxy.h"
00019 #include "orbsvcs/Notify/SupplierAdmin.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "orbsvcs/CosEventChannelAdminC.h"
00026 
00027 #include "ace/Auto_Ptr.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 class TAO_Notify_Supplier;
00032 
00033 /**
00034  * @class TAO_Notify_ProxyConsumer
00035  *
00036  * @brief Base class for all types of ProxyConsumer implementations.
00037  *
00038  */
00039 class TAO_Notify_Serv_Export TAO_Notify_ProxyConsumer
00040   : public virtual TAO_Notify_Proxy
00041 {
00042 public:
00043   typedef TAO_Notify_Refcountable_Guard_T<TAO_Notify_ProxyConsumer> Ptr;
00044   /// Constuctor
00045   TAO_Notify_ProxyConsumer (void);
00046 
00047   /// Destructor
00048   virtual ~TAO_Notify_ProxyConsumer ();
00049 
00050   /// init: overrides Topology_Object method
00051   virtual void init (TAO_Notify::Topology_Parent * topology_parent);
00052 
00053   /// Connect
00054   void connect (TAO_Notify_Supplier* supplier);
00055 
00056   /// Disconnect
00057   void disconnect (void);
00058 
00059   /// Shutdown  (TAO_Notify_Container_T method)
00060   virtual int shutdown (void);
00061 
00062   /// Destroy this object.
00063   virtual void destroy (void);
00064 
00065 
00066   /// Return 1 if connected
00067   bool is_connected (void) const;
00068 
00069   /// The SA parent.
00070   TAO_Notify_SupplierAdmin& supplier_admin (void);
00071 
00072 protected:
00073   /// Access the Supplier
00074   TAO_Notify_Supplier* supplier (void);
00075 
00076   /// Accept an event from the Supplier
00077   void push_i (TAO_Notify_Event * event);
00078 
00079 private:
00080   /// Is this part of a reliable channel
00081   bool supports_reliable_events () const;
00082 
00083   ///= Data Members.
00084   /// The SA parent.
00085   TAO_Notify_SupplierAdmin::Ptr supplier_admin_;
00086 
00087   /// The Supplier that we're connect to.
00088   ACE_Auto_Ptr<TAO_Notify_Supplier> supplier_;
00089 
00090   /// Access our Peer.
00091   virtual TAO_Notify_Peer* peer (void);
00092 };
00093 
00094 TAO_END_VERSIONED_NAMESPACE_DECL
00095 
00096 #if defined (__ACE_INLINE__)
00097 #include "orbsvcs/Notify/ProxyConsumer.inl"
00098 #endif /* __ACE_INLINE__ */
00099 
00100 #include /**/ "ace/post.h"
00101 #endif /* TAO_Notify_PROXYCONSUMER_H */

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