summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-03-06 15:12:41 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-03-06 15:12:41 +0000
commite858744d5c6034f84f74238c4bd65e89a21d257e (patch)
treedb828abeeef84fb8ed604d09dcc521ab220e9bef /TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
parent398338768b7eedd9abde64edea939c092245ad73 (diff)
downloadATCD-e858744d5c6034f84f74238c4bd65e89a21d257e.tar.gz
ChangeLogTag: Mon Mar 6 15:12:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tests/Bug_2417_Regression/subscriber_impl.cpp')
-rw-r--r--TAO/tests/Bug_2417_Regression/subscriber_impl.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp b/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
new file mode 100644
index 00000000000..61f25e23349
--- /dev/null
+++ b/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
@@ -0,0 +1,45 @@
+// $Id$
+
+#include "subscriber_impl.h"
+#include "ace/OS_NS_stdio.h"
+
+Subscriber_impl::Subscriber_impl(CORBA::ORB_ptr orb)
+: orb_ (CORBA::ORB::_duplicate (orb))
+, count(0)
+{
+}
+
+Subscriber_impl::~Subscriber_impl()
+{
+}
+
+void
+Subscriber_impl::onData (
+ ::CORBA::Double
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException
+ ))
+{
+ ++count;
+ if (count > 100)
+ shutdown();
+}
+
+::CORBA::Boolean
+Subscriber_impl::isAlive (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException
+ ))
+{
+ return true;
+}
+
+void Subscriber_impl::shutdown()
+{
+ this->orb_->shutdown (0);
+}
+