summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp
diff options
context:
space:
mode:
authorjohn_c <john_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-11-19 22:14:54 +0000
committerjohn_c <john_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-11-19 22:14:54 +0000
commitadaaf3a4108d172f5fe517da3836e5625f819759 (patch)
treeeede6298a1baa4cbfe0b8d96d1c3e5efa0b767e3 /TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp
parentff8a8def6d0c5e3fae7b3512bb7e80ab82697783 (diff)
downloadATCD-adaaf3a4108d172f5fe517da3836e5625f819759.tar.gz
Thu Nov 18 12:39:59 2004 Ciju John <john_c@ociweb.com>
Fri Oct 29 10:53:56 2004 Dale Wilson <wilson_d@ociweb.com> Wed Oct 27 11:59:01 2004 Dale Wilson <wilson_d@ociweb.com> Mon Oct 25 20:41:00 2004 Dale Wilson <wilson_d@ociweb.com> Mon Oct 25 14:51:09 2004 Dale Wilson <wilson_d@ociweb.com> Wed Oct 20 11:38:11 2004 Dale Wilson <wilson_d@ociweb.com> Tue Oct 19 10:43:28 2004 Dale Wilson <wilson_d@ociweb.com> Mon Oct 18 15:21:49 2004 Dale Wilson <wilson_d@ociweb.com> Mon Oct 18 10:29:48 2004 Dale Wilson <wilson_d@ociweb.com> Mon Oct 18 10:11:47 2004 Dale Wilson <wilson_d@ociweb.com> Tue Oct 12 14:10:43 2004 Dale Wilson <wilson_d@ociweb.com> Mon Oct 11 14:39:15 2004 Dale Wilson <wilson_d@ociweb.com> Thu Oct 7 09:40:51 2004 Dale Wilson <wilson_d@ociweb.com> Mon Oct 18 13:02:11 2004 Dale Wilson <wilson_d@ociweb.com> ed Oct 13 15:44:58 2004 Dale Wilson <wilson_d@ociweb.com>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp56
1 files changed, 43 insertions, 13 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp
index aecb8951e81..0b93c980ee3 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp
@@ -10,8 +10,7 @@ ACE_RCSID (Notify, TAO_Notify_ProxyPushConsumer, "$Id$")
#include "tao/debug.h"
#include "../AdminProperties.h"
-#include "../Method_Request_Lookup.h"
-#include "../Worker_Task.h"
+#include "../Properties.h"
#include "AnyEvent.h"
#include "PushSupplier.h"
@@ -43,13 +42,6 @@ TAO_Notify_ProxyPushConsumer::MyType (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
}
void
-TAO_Notify_ProxyPushConsumer::push (TAO_Notify_Event_var &/*event*/)
-{
- // This should never be called.
- ACE_ASSERT (1);
-}
-
-void
TAO_Notify_ProxyPushConsumer::push (const CORBA::Any& any ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
@@ -67,10 +59,7 @@ TAO_Notify_ProxyPushConsumer::push (const CORBA::Any& any ACE_ENV_ARG_DECL)
}
TAO_Notify_AnyEvent_No_Copy event (any);
-
- TAO_Notify_Method_Request_Lookup_No_Copy request (&event, this);
-
- this->worker_task ()->execute (request ACE_ENV_ARG_PARAMETER);
+ this->push_i (&event ACE_ENV_ARG_PARAMETER);
}
void
@@ -90,6 +79,8 @@ TAO_Notify_ProxyPushConsumer::connect_any_push_supplier (CosEventComm::PushSuppl
ACE_CHECK;
this->connect (supplier ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->self_change (ACE_ENV_SINGLE_ARG_PARAMETER);
}
void TAO_Notify_ProxyPushConsumer::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
@@ -98,4 +89,43 @@ void TAO_Notify_ProxyPushConsumer::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_
))
{
this->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ this->self_change (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+const char *
+TAO_Notify_ProxyPushConsumer::get_proxy_type_name (void) const
+{
+ return "proxy_push_consumer";
+}
+
+void
+TAO_Notify_ProxyPushConsumer::load_attrs (const TAO_Notify::NVPList& attrs)
+{
+ SuperClass::load_attrs(attrs);
+ ACE_CString ior;
+ if (attrs.load("PeerIOR", ior) && ior.length() > 0)
+ {
+ CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb();
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
+ {
+ CORBA::Object_var obj = orb->string_to_object(ior.c_str() ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ CosNotifyComm::PushSupplier_var ps =
+ CosNotifyComm::PushSupplier::_unchecked_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ // minor hack: suppress generating subscription updates during reload.
+ bool save_updates = this->updates_off_;
+ this->updates_off_ = true;
+ this->connect_any_push_supplier(ps.in() ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ this->updates_off_ = save_updates;
+ }
+ ACE_CATCHANY
+ {
+ ACE_ASSERT(0);
+ }
+ ACE_ENDTRY;
+ }
}