summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
blob: 3f9d8c2101a2e0c73df1e16d6558e5f1638b0ef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// $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)
{
  ++count;
  if (count > 100)
    this->shutdown();
}

::CORBA::Boolean
Subscriber_impl::isAlive ()
{
  return true;
}

void Subscriber_impl::shutdown()
{
  this->orb_->shutdown (0);
}