00001 /* -*- C++ -*- */ 00002 /** 00003 * @file StructuredPushConsumer.h 00004 * 00005 * $Id: StructuredPushConsumer.h 84685 2009-03-02 22:49:17Z mesnier_p $ 00006 * 00007 * @author Pradeep Gore <pradeep@oomworks.com> 00008 * 00009 * 00010 */ 00011 00012 #ifndef TAO_Notify_STRUCTUREDPUSHCONSUMER_H 00013 #define TAO_Notify_STRUCTUREDPUSHCONSUMER_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 class TAO_Notify_ProxySupplier; 00028 00029 /** 00030 * @class TAO_Notify_StructuredPushConsumer 00031 * 00032 * @brief Wrapper for the StructuredPushConsumer that connect to the EventChannel. 00033 * 00034 */ 00035 class TAO_Notify_Serv_Export TAO_Notify_StructuredPushConsumer : public TAO_Notify_Consumer 00036 { 00037 public: 00038 /// Constructor 00039 TAO_Notify_StructuredPushConsumer (TAO_Notify_ProxySupplier* proxy); 00040 00041 /// Init the Consumer 00042 void init (CosNotifyComm::StructuredPushConsumer_ptr push_consumer); 00043 00044 /// Destructor 00045 virtual ~TAO_Notify_StructuredPushConsumer (); 00046 00047 /// Push <event> to this consumer. 00048 // virtual void push_i (const TAO_Notify_Event* event); 00049 00050 /// Push <event> to this consumer. 00051 virtual void push (const CORBA::Any& event); 00052 00053 /// Push <event> to this consumer. 00054 virtual void push (const CosNotification::StructuredEvent& event); 00055 00056 /// Push a batch of events to this consumer. 00057 virtual void push (const CosNotification::EventBatch& event); 00058 00059 /// Retrieve the ior of this peer 00060 virtual ACE_CString get_ior (void) const; 00061 00062 /// on reconnect we need to move events from the old consumer 00063 /// to the new one 00064 virtual void reconnect_from_consumer ( 00065 TAO_Notify_Consumer* old_consumer); 00066 00067 00068 protected: 00069 00070 virtual CORBA::Object_ptr get_consumer (void); 00071 00072 /// The Consumer 00073 CosNotifyComm::StructuredPushConsumer_var push_consumer_; 00074 00075 private: 00076 /// Release 00077 virtual void release (void); 00078 00079 /// Connection valid flag 00080 int connection_valid; 00081 }; 00082 00083 TAO_END_VERSIONED_NAMESPACE_DECL 00084 00085 #include /**/ "ace/post.h" 00086 #endif /* TAO_Notify_STRUCTUREDPUSHCONSUMER_H */