summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/ImR/Advanced/Messenger_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/ImR/Advanced/Messenger_i.cpp')
-rw-r--r--TAO/orbsvcs/examples/ImR/Advanced/Messenger_i.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/TAO/orbsvcs/examples/ImR/Advanced/Messenger_i.cpp b/TAO/orbsvcs/examples/ImR/Advanced/Messenger_i.cpp
new file mode 100644
index 00000000000..c38e3e84944
--- /dev/null
+++ b/TAO/orbsvcs/examples/ImR/Advanced/Messenger_i.cpp
@@ -0,0 +1,41 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#include "Messenger_i.h"
+
+#include <ace/streams.h>
+
+Messenger_i::Messenger_i (CORBA::ORB_ptr orb, long instance)
+: instance_(instance)
+, orb_(CORBA::ORB::_duplicate(orb))
+, isHit_(false)
+{
+}
+
+Messenger_i::~Messenger_i (void)
+{
+}
+
+bool Messenger_i::acknowledgeHit()
+{
+ bool isHit = isHit_;
+ isHit_ = false;
+ return isHit;
+}
+
+CORBA::Long Messenger_i::send_message (CORBA::Long thread,
+ CORBA::Long iter,
+ CORBA::Long obj,
+ CORBA::Long req)
+{
+ cout << "* Invoked: (" << instance_ << "." << thread << "." << iter
+ << "." << obj << "." << req << ")" << endl;
+ isHit_ = true;
+ return instance_;
+}
+
+void Messenger_i::shutdownOrb ()
+{
+ orb_->shutdown(0);
+}