summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp53
1 files changed, 22 insertions, 31 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp
index cd7587bfacd..5d309383a26 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ProxyConsumer.cpp
@@ -1,34 +1,31 @@
// $Id$
-#include "orbsvcs/Notify/ProxyConsumer.h"
+#include "ProxyConsumer.h"
#if ! defined (__ACE_INLINE__)
-#include "orbsvcs/Notify/ProxyConsumer.inl"
+#include "ProxyConsumer.inl"
#endif /* __ACE_INLINE__ */
-ACE_RCSID(Notify, TAO_Notify_ProxyConsumer, "$Id$")
+ACE_RCSID(RT_Notify, TAO_Notify_ProxyConsumer, "$Id$")
#include "tao/debug.h"
#include "ace/Atomic_Op.h"
-#include "orbsvcs/Notify/Supplier.h"
-#include "orbsvcs/Notify/AdminProperties.h"
-#include "orbsvcs/Notify/Property.h"
-#include "orbsvcs/Notify/Proxy.h"
-#include "orbsvcs/Notify/Event_Manager.h"
-#include "orbsvcs/Notify/Method_Request_Lookup.h"
-#include "orbsvcs/Notify/Worker_Task.h"
-#include "orbsvcs/Notify/Properties.h"
-#include "orbsvcs/Notify/SupplierAdmin.h"
-#include "orbsvcs/Notify/EventChannel.h"
-#include "orbsvcs/Notify/Routing_Slip.h"
-
+#include "Supplier.h"
+#include "AdminProperties.h"
+#include "Property.h"
+#include "Proxy.h"
+#include "Event_Manager.h"
+#include "Method_Request_Lookup.h"
+#include "Worker_Task.h"
+#include "Properties.h"
+#include "SupplierAdmin.h"
+#include "EventChannel.h"
+#include "Routing_Slip.h"
//#define DEBUG_LEVEL 10
#ifndef DEBUG_LEVEL
# define DEBUG_LEVEL TAO_debug_level
#endif //DEBUG_LEVEL
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
TAO_Notify_ProxyConsumer::TAO_Notify_ProxyConsumer (void)
: supplier_admin_ (0)
{
@@ -50,7 +47,6 @@ TAO_Notify_ProxyConsumer::init (TAO_Notify::Topology_Parent* topology_parent ACE
ACE_ASSERT( this->supplier_admin_.get() == 0 );
TAO_Notify_Proxy::initialize (topology_parent ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
this->supplier_admin_.reset (dynamic_cast<TAO_Notify_SupplierAdmin *>(topology_parent));
ACE_ASSERT (this->supplier_admin_.get() != 0);
@@ -87,15 +83,15 @@ TAO_Notify_ProxyConsumer::connect (TAO_Notify_Supplier *supplier ACE_ENV_ARG_DEC
// if supplier is set and reconnect not allowed we get out.
if (this->is_connected () && TAO_Notify_PROPERTIES::instance()->allow_reconnect() == false)
{
- ACE_THROW (CosEventChannelAdmin::AlreadyConnected ());
- }
+ ACE_THROW (CosEventChannelAdmin::AlreadyConnected ());
+ }
// Adopt the supplier
this->supplier_ = auto_supplier;
this->supplier_admin_->subscribed_types (this->subscribed_types_ ACE_ENV_ARG_PARAMETER); // get the parents subscribed types.
ACE_CHECK;
- }
+ }
// Inform QoS values.
ACE_ASSERT (this->supplier_.get() != 0);
@@ -117,7 +113,8 @@ TAO_Notify_ProxyConsumer::push_i (TAO_Notify_Event * event ACE_ENV_ARG_DECL)
{
if (this->supports_reliable_events ())
{
- TAO_Notify_Event::Ptr pevent(event->queueable_copy(ACE_ENV_SINGLE_ARG_PARAMETER));
+ TAO_Notify_Event::Ptr pevent (
+ event->queueable_copy (ACE_ENV_SINGLE_ARG_PARAMETER) );
ACE_CHECK;
TAO_Notify::Routing_Slip_Ptr routing_slip =
TAO_Notify::Routing_Slip::create (pevent ACE_ENV_ARG_PARAMETER);
@@ -181,7 +178,6 @@ TAO_Notify_ProxyConsumer::shutdown (ACE_ENV_SINGLE_ARG_DECL)
if (this->supplier_.get() != 0)
{
this->supplier_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (1);
}
return 0;
}
@@ -189,16 +185,11 @@ TAO_Notify_ProxyConsumer::shutdown (ACE_ENV_SINGLE_ARG_DECL)
void
TAO_Notify_ProxyConsumer::destroy (ACE_ENV_SINGLE_ARG_DECL)
{
- int result = this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- if ( result == 1)
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
return;
- this->supplier_admin_->remove (this ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- // Do not reset this->supplier_.
- // It is not safe to delete the non-refcounted supplier here.
+ this->supplier_admin_->remove (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
}
-
-TAO_END_VERSIONED_NAMESPACE_DECL