summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/Notify/ThreadPool/ORB_Objects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/Notify/ThreadPool/ORB_Objects.cpp')
-rw-r--r--TAO/orbsvcs/examples/Notify/ThreadPool/ORB_Objects.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/TAO/orbsvcs/examples/Notify/ThreadPool/ORB_Objects.cpp b/TAO/orbsvcs/examples/Notify/ThreadPool/ORB_Objects.cpp
new file mode 100644
index 00000000000..420ece6b765
--- /dev/null
+++ b/TAO/orbsvcs/examples/Notify/ThreadPool/ORB_Objects.cpp
@@ -0,0 +1,55 @@
+// $Id$
+
+#include "ORB_Objects.h"
+
+ACE_RCSID (Notify, TAO_Notify_ORB_Objects, "$Id$")
+
+TAO_Notify_ORB_Objects::TAO_Notify_ORB_Objects (void)
+{
+}
+
+void
+TAO_Notify_ORB_Objects::init (CORBA::ORB_var& orb)
+{
+ this->orb_ = orb;
+
+ CORBA::Object_var object = this->orb_->resolve_initial_references("RootPOA");
+
+ this->root_poa_ = PortableServer::POA::_narrow (object.in ());
+
+ // Resolve the RTORB.
+ object = this->orb_->resolve_initial_references ("RTORB");
+
+ this->rt_orb_ = RTCORBA::RTORB::_narrow (object.in ());
+
+ // Resolve the Current
+ object = this->orb_->resolve_initial_references ("RTCurrent");
+
+ this->current_ = RTCORBA::Current::_narrow (object.in ());
+
+ // Resolve the Naming service
+ object = this->orb_->resolve_initial_references ("NameService");
+
+ this->naming_ = CosNaming::NamingContextExt::_narrow (object.in ());
+}
+
+TAO_Notify_ORB_Objects::~TAO_Notify_ORB_Objects ()
+{
+}
+
+CosNotifyChannelAdmin::EventChannelFactory_ptr
+TAO_Notify_ORB_Objects::notify_factory (void)
+{
+ CosNotifyChannelAdmin::EventChannelFactory_var ecf;
+
+ // Look for the Notification Service
+ CosNaming::Name name (1);
+ name.length (1);
+ name[0].id = CORBA::string_dup ("NotifyEventChannelFactory");
+
+ CORBA::Object_var object = this->naming_->resolve (name);
+
+ ecf = CosNotifyChannelAdmin::EventChannelFactory::_narrow (object.in());
+
+ return ecf._retn ();
+}