summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/ImplRepo/kill_server/Test_i.cpp
blob: b8b27e8c9a68afd97d506fd629c317b508f32b30 (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
/* -*- C++ -*-  */

#include "Test_i.h"
#include "Terminator.h"
#include "ace/OS_NS_unistd.h"

Test_i::Test_i (CORBA::Short server_num,
                Terminator &terminator,
                PortableServer::POA_ptr pa,
                PortableServer::POA_ptr pb)
  : mgr_a (pa->the_POAManager ()),
    mgr_b (pb->the_POAManager ()),
    server_num_ (server_num),
    terminator_ (terminator)
{
}

Test_i::~Test_i ()
{
  ACE_Message_Block *mb = 0;
  ACE_NEW (mb,
           ACE_Message_Block(0,
                             ACE_Message_Block::MB_HANGUP));
  terminator_.putq (mb);
  terminator_.wait ();
}

CORBA::Short
Test_i::get_server_num ()
{
  return this->server_num_;
}