ProxySupplier.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file ProxySupplier.h
00005  *
00006  *  $Id: ProxySupplier.h 81422 2008-04-24 12:33:29Z johnnyw $
00007  *
00008  *  @author Pradeep Gore <pradeep@oomworks.com>
00009  */
00010 
00011 #ifndef TAO_Notify_PROXYSUPPLIER_H
00012 #define TAO_Notify_PROXYSUPPLIER_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/Notify/Event.h"
00022 #include "orbsvcs/Notify/Proxy.h"
00023 #include "orbsvcs/Notify/ConsumerAdmin.h"
00024 
00025 #include "orbsvcs/CosEventChannelAdminC.h"
00026 
00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 class TAO_Notify_Consumer;
00030 class TAO_Notify_Method_Request_Dispatch_No_Copy;
00031 /**
00032  * @class TAO_Notify_ProxySupplier
00033  *
00034  * @brief Base class for all the ProxySuppliers.
00035  *
00036  */
00037 class TAO_Notify_Serv_Export TAO_Notify_ProxySupplier : public virtual TAO_Notify_Proxy
00038 {
00039   friend class TAO_Notify_Consumer;
00040 
00041 public:
00042   typedef TAO_Notify_Refcountable_Guard_T<TAO_Notify_ProxySupplier> Ptr;
00043   /// Constructor
00044   TAO_Notify_ProxySupplier (void);
00045 
00046   /// Destructor
00047   virtual ~TAO_Notify_ProxySupplier ();
00048 
00049   /// Init
00050   virtual void init (TAO_Notify_ConsumerAdmin* consumer_admin);
00051 
00052   /// Connect
00053   void connect (TAO_Notify_Consumer* consumer);
00054   /// Disconnect
00055   void disconnect (void);
00056 
00057   /// Dispatch Event to consumer
00058   virtual void deliver (TAO_Notify_Method_Request_Dispatch_No_Copy & request);
00059 
00060   /// Override TAO_Notify_Container_T::shutdown  method
00061   virtual int shutdown (void);
00062 
00063   /// Destroy this object.
00064   virtual void destroy (void);
00065 
00066   /// Override, TAO_Notify_Proxy::qos_changed to apply MaxEventssPerConsumer QoS.
00067   virtual void qos_changed (const TAO_Notify_QoSProperties& qos_properties);
00068 
00069   /// Returns true if connected
00070   bool is_connected (void) const;
00071 
00072   /// Access the Consumer
00073   TAO_Notify_Consumer* consumer (void);
00074 
00075   /// The CA parent.
00076   TAO_Notify_ConsumerAdmin& consumer_admin (void);
00077 
00078 private:
00079   ///= Data Members.
00080   /// The CA parent.
00081   TAO_Notify_ConsumerAdmin::Ptr consumer_admin_;
00082 
00083   /// The Consumer that we're connect to.
00084   ACE_Auto_Ptr<TAO_Notify_Consumer> consumer_;
00085 
00086   /// Access our Peer.
00087   virtual TAO_Notify_Peer* peer (void);
00088 };
00089 
00090 TAO_END_VERSIONED_NAMESPACE_DECL
00091 
00092 #if defined (__ACE_INLINE__)
00093 #include "orbsvcs/Notify/ProxySupplier.inl"
00094 #endif /* __ACE_INLINE__ */
00095 
00096 #include /**/ "ace/post.h"
00097 #endif /* TAO_Notify_PROXYSUPPLIER_H */

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