SequencePushConsumer.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 /**
00003  *  @file SequencePushConsumer.h
00004  *
00005  *  SequencePushConsumer.h,v 1.17 2006/03/15 21:29:09 jtc Exp
00006  *
00007  *  @author Pradeep Gore <pradeep@oomworks.com>
00008  *
00009  *
00010  */
00011 
00012 #ifndef TAO_Notify_SEQUENCEPUSHCONSUMER_H
00013 #define TAO_Notify_SEQUENCEPUSHCONSUMER_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 "ace/Event_Handler.h"
00023 #include "orbsvcs/Notify/Event.h"
00024 #include "orbsvcs/Notify/Property.h"
00025 #include "orbsvcs/Notify/Property_T.h"
00026 #include "orbsvcs/Notify/Consumer.h"
00027 #include "orbsvcs/Notify/AdminProperties.h"
00028 #include "ace/Null_Condition.h"
00029 
00030 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00031 
00032 class TAO_Notify_ProxySupplier;
00033 class TAO_Notify_QoSProperties;
00034 class TAO_Notify_Timer;
00035 
00036 /**
00037  * @class TAO_Notify_SequencePushConsumer
00038  *
00039  * @brief
00040  *
00041  */
00042 class TAO_Notify_Serv_Export TAO_Notify_SequencePushConsumer
00043   : public TAO_Notify_Consumer
00044 {
00045 public:
00046   TAO_Notify_SequencePushConsumer (TAO_Notify_ProxySupplier* proxy);
00047 
00048   virtual ~TAO_Notify_SequencePushConsumer ();
00049 
00050   /// Init the Consumer
00051   void init (CosNotifyComm::SequencePushConsumer_ptr push_consumer ACE_ENV_ARG_DECL);
00052 
00053   /// Add request to a queue if necessary.
00054   /// for Sequence it's always necessary.
00055   virtual bool enqueue_if_necessary(
00056     TAO_Notify_Method_Request_Event * request
00057     ACE_ENV_ARG_DECL);
00058 
00059   virtual bool dispatch_from_queue (
00060     Request_Queue & requests,
00061     ACE_Guard <TAO_SYNCH_MUTEX> & ace_mon);
00062 
00063 
00064   /// Push <event> to this consumer.
00065   virtual void push (const CORBA::Any& event ACE_ENV_ARG_DECL);
00066 
00067   // Push event.
00068   virtual void push (const CosNotification::StructuredEvent & event ACE_ENV_ARG_DECL);
00069 
00070   /// Push a batch of events to this consumer.
00071   virtual void push (const CosNotification::EventBatch& event ACE_ENV_ARG_DECL);
00072 
00073   /// Retrieve the ior of this peer
00074   virtual ACE_CString get_ior (void) const;
00075 
00076   /// on reconnect we need to move events from the old consumer
00077   /// to the new one
00078   virtual void reconnect_from_consumer (TAO_Notify_Consumer* old_consumer
00079     ACE_ENV_ARG_DECL);
00080 
00081 protected:
00082 
00083   /// The Consumer
00084   CosNotifyComm::SequencePushConsumer_var push_consumer_;
00085 
00086 private:
00087   /// TAO_Notify_Destroy_Callback methods.
00088   virtual void release (void);
00089 };
00090 
00091 TAO_END_VERSIONED_NAMESPACE_DECL
00092 
00093 #include /**/ "ace/post.h"
00094 #endif /* TAO_Notify_SEQUENCEPUSHCONSUMER_H */

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