summaryrefslogtreecommitdiff
path: root/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.cpp
blob: 6646e95283cf497baab43b2e2020e8c60a7a7001 (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
38
39
40
41
42
43
44
#include "Receiver_i.h"

ACE_RCSID(Oneways_Invoking_Twoways, Receiver_i, "$Id$")

Receiver_i::Receiver_i (CORBA::ORB_ptr orb,
                        Test::Sender_ptr sender,
                        CORBA::ULong iter)
  : no_calls_ (0),
    orb_ (CORBA::ORB::_duplicate (orb)),
    sender_ (Test::Sender::_duplicate (sender)),
    iteration_ (iter)
{
}

Receiver_i::~Receiver_i (void)
{
}



CORBA::Long
Receiver_i::receive_call (void)
{
  ACE_DEBUG ((LM_DEBUG,
              "(%P|%t)  Doing a ping...\n"));

  this->sender_->ping ();

  return this->no_calls_++;
}

CORBA::Long
Receiver_i::get_call_count ( /**/)
{
  return this->iteration_;
}

void
Receiver_i::shutdown (void)
{
  ACE_DEBUG ((LM_DEBUG,
              "(%P|%t) About to invoke shudown...\n"));
  this->orb_->shutdown (0);
}