diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.cpp | 64 |
1 files changed, 46 insertions, 18 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.cpp index d26302a2cee..07701320013 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Any/PushConsumer.cpp @@ -2,17 +2,14 @@ #include "PushConsumer.h" -#if ! defined (__ACE_INLINE__) -#include "PushConsumer.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (Notify, - TAO_Notify_PushConsumer, +ACE_RCSID (Notify, + TAO_Notify_PushConsumer, "$Id$") #include "ace/Refcounted_Auto_Ptr.h" #include "orbsvcs/CosEventCommC.h" #include "../Event.h" +#include "../Properties.h" TAO_Notify_PushConsumer::TAO_Notify_PushConsumer (TAO_Notify_ProxySupplier* proxy) :TAO_Notify_Consumer (proxy) @@ -48,18 +45,6 @@ TAO_Notify_PushConsumer::release (void) } void -TAO_Notify_PushConsumer::push_i (const TAO_Notify_Event* event ACE_ENV_ARG_DECL) -{ - event->push (this ACE_ENV_ARG_PARAMETER); -} - -void -TAO_Notify_PushConsumer::push_i (const TAO_Notify_Event_var& event ACE_ENV_ARG_DECL) -{ - event->push (this ACE_ENV_ARG_PARAMETER); -} - -void TAO_Notify_PushConsumer::push (const CORBA::Any& payload ACE_ENV_ARG_DECL) { this->push_consumer_->push (payload ACE_ENV_ARG_PARAMETER); @@ -74,3 +59,46 @@ TAO_Notify_PushConsumer::push (const CosNotification::StructuredEvent& event ACE this->push_consumer_->push (any ACE_ENV_ARG_PARAMETER); } + +/// Push a batch of events to this consumer. +void +TAO_Notify_PushConsumer::push (const CosNotification::EventBatch& event ACE_ENV_ARG_DECL_NOT_USED) +{ + ACE_ASSERT(false); + ACE_UNUSED_ARG (event); + // TODO exception? +} + + + +bool +TAO_Notify_PushConsumer::get_ior (ACE_CString & iorstr) const +{ + bool result = false; + CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb(); + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY + { + CORBA::String_var ior = orb->object_to_string(this->push_consumer_.in() ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + iorstr = static_cast<const char *> (ior.in ()); + result = true; + } + ACE_CATCHANY + { + ACE_ASSERT(0); + } + ACE_ENDTRY; + return result; +} + +void +TAO_Notify_PushConsumer::reconnect_from_consumer (TAO_Notify_Consumer* old_consumer + ACE_ENV_ARG_DECL) +{ + TAO_Notify_PushConsumer* tmp = dynamic_cast<TAO_Notify_PushConsumer*> (old_consumer); + ACE_ASSERT(tmp != 0); + this->init(tmp->push_consumer_.in() ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + this->schedule_timer(false); +} |