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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
// -*- C++ -*-
// $Id$
#include "Backend_Impl.h"
#include "ace/OS_NS_unistd.h"
Bug_3647_Regression::Backend_Impl::
Backend_Impl(CORBA::ORB_ptr orb, bool verbose)
: POA_Bug_3647_Regression::Backend()
, orb_(CORBA::ORB::_duplicate(orb))
, verbose_(verbose)
{
}
Bug_3647_Regression::Backend_Impl::
~Backend_Impl()
{
}
void Bug_3647_Regression::Backend_Impl::
startup_test()
{
if (verbose_)
{
ACE_DEBUG ((LM_INFO,
"Backend_Impl::startup_test(%P|%t) - called\n"));
}
}
void Bug_3647_Regression::Backend_Impl::
ping(Bug_3647_Regression::Payload const & p)
{
if (verbose_)
{
ACE_DEBUG ((LM_INFO,
"Backend_Impl::ping(%P|%t) - called, payload length = %d\n",
p.length()));
}
}
void Bug_3647_Regression::Backend_Impl::
freeze(CORBA::ULong seconds)
{
if (verbose_)
{
ACE_DEBUG ((LM_INFO,
"Backend_Impl::freeze(%P|%t) - called, sleeping for %d seconds\n",
seconds));
}
ACE_OS::sleep(seconds);
if (verbose_)
{
ACE_DEBUG ((LM_INFO,
"Backend_Impl::sleep(%P|%t) - finished after %d seconds\n",
seconds));
}
shutdown();
}
void Bug_3647_Regression::Backend_Impl::
shutdown()
{
if (verbose_)
{
ACE_DEBUG ((LM_INFO,
"Backend_Impl::shutdown(%P|%t) - called\n"));
}
orb_->shutdown (false);
}
|