PushConsumer.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 /**
00003  *  @file PushConsumer.h
00004  *
00005  *  $Id: PushConsumer.h 81422 2008-04-24 12:33:29Z johnnyw $
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   /// Constructor
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);
00044 
00045   /// Push <event> to this consumer.
00046 //  virtual void push_i (const TAO_Notify_Event* event);
00047 
00048   /// Push <event> to this consumer.
00049   virtual void push (const CORBA::Any& event);
00050 
00051   /// Push <event> to this consumer.
00052   virtual void push (const CosNotification::StructuredEvent& event);
00053 
00054   /// Push a batch of events to this consumer.
00055   virtual void push (const CosNotification::EventBatch& event);
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 
00065 protected:
00066   /// The Consumer
00067   CosEventComm::PushConsumer_var push_consumer_;
00068 
00069 private:
00070   /// TAO_Notify_Destroy_Callback methods.
00071   virtual void release (void);
00072 };
00073 
00074 TAO_END_VERSIONED_NAMESPACE_DECL
00075 
00076 #include /**/ "ace/post.h"
00077 #endif /* TAO_Notify_PUSHCONSUMER_H */

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