00001 /* -*- C++ -*- */ 00002 /** 00003 * @file StructuredPushConsumer.h 00004 * 00005 * StructuredPushConsumer.h,v 1.15 2006/03/15 21:29:10 jtc Exp 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 /// Constuctor 00039 TAO_Notify_StructuredPushConsumer (TAO_Notify_ProxySupplier* proxy); 00040 00041 /// Init the Consumer 00042 void init (CosNotifyComm::StructuredPushConsumer_ptr push_consumer ACE_ENV_ARG_DECL); 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 ACE_ENV_ARG_DECL); 00049 00050 /// Push <event> to this consumer. 00051 virtual void push (const CORBA::Any& event ACE_ENV_ARG_DECL); 00052 00053 /// Push <event> to this consumer. 00054 virtual void push (const CosNotification::StructuredEvent& event ACE_ENV_ARG_DECL); 00055 00056 /// Push a batch of events to this consumer. 00057 virtual void push (const CosNotification::EventBatch& event ACE_ENV_ARG_DECL); 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 ACE_ENV_ARG_DECL); 00067 00068 00069 protected: 00070 /// The Consumer 00071 CosNotifyComm::StructuredPushConsumer_var push_consumer_; 00072 00073 private: 00074 /// Release 00075 virtual void release (void); 00076 }; 00077 00078 TAO_END_VERSIONED_NAMESPACE_DECL 00079 00080 #include /**/ "ace/post.h" 00081 #endif /* TAO_Notify_STRUCTUREDPUSHCONSUMER_H */