summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h66
1 files changed, 22 insertions, 44 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h
index 6cbe894caa3..76ff5d049ed 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h
@@ -13,7 +13,7 @@
#define TAO_Notify_SEQUENCEPUSHCONSUMER_H
#include /**/ "ace/pre.h"
-#include "../notify_export.h"
+#include "../notify_serv_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@@ -38,7 +38,8 @@ class TAO_Notify_Timer;
* @brief
*
*/
-class TAO_Notify_Serv_Export TAO_Notify_SequencePushConsumer : public ACE_Event_Handler, public TAO_Notify_Consumer
+class TAO_Notify_Serv_Export TAO_Notify_SequencePushConsumer
+ : public TAO_Notify_Consumer
{
public:
/// Constuctor
@@ -50,16 +51,21 @@ public:
/// Init the Consumer
void init (CosNotifyComm::SequencePushConsumer_ptr push_consumer, TAO_Notify_AdminProperties_var& admin_properties ACE_ENV_ARG_DECL);
- /// Shutdown the consumer
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL);
+ void set_consumer (CosNotifyComm::SequencePushConsumer_ptr push_consumer);
/// TAO_Notify_Destroy_Callback methods.
virtual void release (void);
- /// Push <event> to this consumer.
- virtual void push_i (const TAO_Notify_Event* event ACE_ENV_ARG_DECL);
+ /// Add request to a queue if necessary.
+ /// for Sequence it's always necessary.
+ virtual bool enqueue_if_necessary(
+ TAO_Notify_Method_Request_Event * request
+ ACE_ENV_ARG_DECL);
+
+ virtual bool dispatch_from_queue (
+ Request_Queue & requests,
+ ACE_Guard <TAO_SYNCH_MUTEX> & ace_mon);
- virtual void push_i (const TAO_Notify_Event_var& event ACE_ENV_ARG_DECL);
/// Push <event> to this consumer.
virtual void push (const CORBA::Any& event ACE_ENV_ARG_DECL);
@@ -67,51 +73,23 @@ public:
// Push event.
virtual void push (const CosNotification::StructuredEvent & event ACE_ENV_ARG_DECL);
- /// Push <event> to this consumer.
- virtual void push (const CosNotification::EventBatch& event);
-
- /// Override, Peer::qos_changed
- virtual void qos_changed (const TAO_Notify_QoSProperties& qos_properties);
-
-protected:
- /// When the pacing interval is used, handle_timeout () is called by
- /// the reactor.
- virtual int handle_timeout (const ACE_Time_Value& current_time,
- const void* act = 0);
-
- /// Schedule timer
- void schedule_timer (void);
+ /// Push a batch of events to this consumer.
+ virtual void push (const CosNotification::EventBatch& event ACE_ENV_ARG_DECL);
- /// Cancel timer
- void cancel_timer (void);
+ /// Retrieve the ior of this peer
+ virtual bool get_ior (ACE_CString & iorstr) const;
- ///= Protected Data Members
+ /// on reconnect we need to move events from the old consumer
+ /// to the new one
+ virtual void reconnect_from_consumer (TAO_Notify_Consumer* old_consumer
+ ACE_ENV_ARG_DECL);
- /// The Pacing Interval
- ACE_Time_Value pacing_interval_;
-
- /// Timer Id.
- long timer_id_;
+protected:
/// The Consumer
CosNotifyComm::SequencePushConsumer_var push_consumer_;
- /// The Message queue.
- TAO_Notify_Message_Queue msg_queue_;
-
- /// The Buffering Strategy
- TAO_Notify_Batch_Buffering_Strategy* buffering_strategy_;
-
- /// Max. batch size.
- TAO_Notify_Property_Long max_batch_size_;
-
- /// The Timer Manager that we use.
- TAO_Notify_Timer* timer_;
};
-#if defined (__ACE_INLINE__)
-#include "SequencePushConsumer.inl"
-#endif /* __ACE_INLINE__ */
-
#include /**/ "ace/post.h"
#endif /* TAO_Notify_SEQUENCEPUSHCONSUMER_H */