PushConsumer.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 /**
00003  *  @file PushConsumer.h
00004  *
00005  *  PushConsumer.h,v 1.14 2006/03/15 21:29:09 jtc Exp
00006  *
00007  *  @author Pradeep Gore <pradeep@oomworks.com>
00008  *
00009  *
00010  */
00011 
00012 #ifndef TAO_Notify_PUSHCONSUMER_H
00013 #define TAO_Notify_PUSHCONSUMER_H
00014 #include /**/ "ace/pre.h"
00015 
00016 #include "orbsvcs/Notify/notify_serv_export.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 # pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 #include "orbsvcs/CosNotifyCommC.h"
00023 #include "orbsvcs/Notify/Consumer.h"
00024 
00025 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00026 
00027 /**
00028  * @class TAO_Notify_PushConsumer
00029  *
00030  * @brief Wrapper for the PushConsumer that connect to the EventChannel.
00031  *
00032  */
00033 class TAO_Notify_Serv_Export TAO_Notify_PushConsumer : public TAO_Notify_Consumer
00034 {
00035 public:
00036   /// Constuctor
00037   TAO_Notify_PushConsumer (TAO_Notify_ProxySupplier* proxy);
00038 
00039   /// Destructor
00040   virtual ~TAO_Notify_PushConsumer ();
00041 
00042   /// Init
00043   void init (CosEventComm::PushConsumer_ptr push_consumer ACE_ENV_ARG_DECL);
00044 
00045   /// Push <event> to this consumer.
00046 //  virtual void push_i (const TAO_Notify_Event* event ACE_ENV_ARG_DECL);
00047 
00048   /// Push <event> to this consumer.
00049   virtual void push (const CORBA::Any& event ACE_ENV_ARG_DECL);
00050 
00051   /// Push <event> to this consumer.
00052   virtual void push (const CosNotification::StructuredEvent& event ACE_ENV_ARG_DECL);
00053 
00054   /// Push a batch of events to this consumer.
00055   virtual void push (const CosNotification::EventBatch& event ACE_ENV_ARG_DECL);
00056 
00057   /// Retrieve the ior of this peer
00058   virtual ACE_CString get_ior (void) const;
00059 
00060   /// on reconnect we need to move events from the old consumer
00061   /// to the new one
00062   virtual void reconnect_from_consumer (
00063     TAO_Notify_Consumer* old_consumer
00064     ACE_ENV_ARG_DECL);
00065 
00066 protected:
00067   /// The Consumer
00068   CosEventComm::PushConsumer_var push_consumer_;
00069 
00070 private:
00071   /// TAO_Notify_Destroy_Callback methods.
00072   virtual void release (void);
00073 };
00074 
00075 TAO_END_VERSIONED_NAMESPACE_DECL
00076 
00077 #include /**/ "ace/post.h"
00078 #endif /* TAO_Notify_PUSHCONSUMER_H */

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