SequencePushConsumer.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 /**
00003  *  @file SequencePushConsumer.h
00004  *
00005  *  $Id: SequencePushConsumer.h 76589 2007-01-25 18:04:11Z elliott_c $
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);
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 
00058   virtual bool dispatch_from_queue (
00059     Request_Queue & requests,
00060     ACE_Guard <TAO_SYNCH_MUTEX> & ace_mon);
00061 
00062 
00063   /// Push <event> to this consumer.
00064   virtual void push (const CORBA::Any& event);
00065 
00066   // Push event.
00067   virtual void push (const CosNotification::StructuredEvent & event);
00068 
00069   /// Push a batch of events to this consumer.
00070   virtual void push (const CosNotification::EventBatch& event);
00071 
00072   /// Retrieve the ior of this peer
00073   virtual ACE_CString get_ior (void) const;
00074 
00075   /// on reconnect we need to move events from the old consumer
00076   /// to the new one
00077   virtual void reconnect_from_consumer (TAO_Notify_Consumer* old_consumer);
00078 
00079 protected:
00080 
00081   /// The Consumer
00082   CosNotifyComm::SequencePushConsumer_var push_consumer_;
00083 
00084 private:
00085   /// TAO_Notify_Destroy_Callback methods.
00086   virtual void release (void);
00087 };
00088 
00089 TAO_END_VERSIONED_NAMESPACE_DECL
00090 
00091 #include /**/ "ace/post.h"
00092 #endif /* TAO_Notify_SEQUENCEPUSHCONSUMER_H */

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