summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_1383_Regression/simple_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Bug_1383_Regression/simple_i.cpp')
-rw-r--r--TAO/tests/Bug_1383_Regression/simple_i.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/TAO/tests/Bug_1383_Regression/simple_i.cpp b/TAO/tests/Bug_1383_Regression/simple_i.cpp
new file mode 100644
index 00000000000..fb3b868ca90
--- /dev/null
+++ b/TAO/tests/Bug_1383_Regression/simple_i.cpp
@@ -0,0 +1,31 @@
+// $Id$
+
+#include "simple_i.h"
+#include "tao/ORB_Core.h"
+#include "ace/Reactor.h"
+
+Simple_i::Simple_i(CORBA::ORB_ptr orb)
+ : m_orb(orb->_duplicate(orb))
+{
+}
+
+void Simple_i::registerCallee(Callee_ptr value)
+{
+ ACE_DEBUG ((LM_DEBUG, "registerCallee invoked\n"));
+ // retain a reference so we can callback later
+ m_callee = value->_duplicate(value);
+
+ // register a callback with the reactor so we can invoke the
+ // callback method
+ m_orb->orb_core()->reactor()->schedule_timer(this, 0, ACE_Time_Value(5));
+}
+
+int Simple_i::handle_timeout(
+ const ACE_Time_Value &,
+ const void *
+ )
+{
+ ACE_DEBUG ((LM_DEBUG, "timer expired\n"));
+ m_callee->callback("got timeout");
+ return 0;
+}