ProxyConsumer.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file ProxyConsumer.h
00005  *
00006  *  ProxyConsumer.h,v 1.21 2006/03/14 06:14:34 jtc Exp
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 ACE_ENV_ARG_DECL);
00052 
00053   /// Connect
00054   void connect (TAO_Notify_Supplier* supplier ACE_ENV_ARG_DECL)
00055     ACE_THROW_SPEC ((
00056                      CORBA::SystemException
00057                      , CosEventChannelAdmin::AlreadyConnected
00058                      ));
00059 
00060   /// Disconnect
00061   void disconnect (ACE_ENV_SINGLE_ARG_DECL);
00062 
00063   /// Shutdown  (TAO_Notify_Container_T method)
00064   virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
00065 
00066   /// Destroy this object.
00067   virtual void destroy (ACE_ENV_SINGLE_ARG_DECL);
00068 
00069 
00070   /// Return 1 if connected
00071   bool is_connected (void) const;
00072 
00073   /// The SA parent.
00074   TAO_Notify_SupplierAdmin& supplier_admin (void);
00075 
00076 protected:
00077   /// Access the Supplier
00078   TAO_Notify_Supplier* supplier (void);
00079 
00080   /// Accept an event from the Supplier
00081   void push_i (TAO_Notify_Event * event ACE_ENV_ARG_DECL);
00082 
00083 private:
00084   /// Is this part of a reliable channel
00085   bool supports_reliable_events () const;
00086 
00087   ///= Data Members.
00088   /// The SA parent.
00089   TAO_Notify_SupplierAdmin::Ptr supplier_admin_;
00090 
00091   /// The Supplier that we're connect to.
00092   ACE_Auto_Ptr<TAO_Notify_Supplier> supplier_;
00093 
00094   /// Access our Peer.
00095   virtual TAO_Notify_Peer* peer (void);
00096 };
00097 
00098 TAO_END_VERSIONED_NAMESPACE_DECL
00099 
00100 #if defined (__ACE_INLINE__)
00101 #include "orbsvcs/Notify/ProxyConsumer.inl"
00102 #endif /* __ACE_INLINE__ */
00103 
00104 #include /**/ "ace/post.h"
00105 #endif /* TAO_Notify_PROXYCONSUMER_H */

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