summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
blob: 07b5da4e9a2fad43bbad2fc35f8fd6809a3567db (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
34
35
36
37
// $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)
		shutdown();
}

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

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