Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / tests / Bug_3647_Regression / Backend_Impl.cpp
blob10e4128d235bdcaaf9426af4b20d758ec14b0bad
1 // -*- C++ -*-
2 #include "Backend_Impl.h"
3 #include "ace/OS_NS_unistd.h"
5 Bug_3647_Regression::Backend_Impl::
6 Backend_Impl(CORBA::ORB_ptr orb, bool verbose)
7 : POA_Bug_3647_Regression::Backend()
8 , orb_(CORBA::ORB::_duplicate(orb))
9 , verbose_(verbose)
13 void Bug_3647_Regression::Backend_Impl::
14 startup_test()
16 if (verbose_)
18 ACE_DEBUG ((LM_INFO,
19 "Backend_Impl::startup_test(%P|%t) - called\n"));
23 void Bug_3647_Regression::Backend_Impl::
24 ping(Bug_3647_Regression::Payload const & p)
26 if (verbose_)
28 ACE_DEBUG ((LM_INFO,
29 "Backend_Impl::ping(%P|%t) - called, payload length = %d\n",
30 p.length()));
34 void Bug_3647_Regression::Backend_Impl::
35 freeze(CORBA::ULong seconds)
37 if (verbose_)
39 ACE_DEBUG ((LM_INFO,
40 "Backend_Impl::freeze(%P|%t) - called, sleeping for %d seconds\n",
41 seconds));
43 ACE_OS::sleep(seconds);
44 if (verbose_)
46 ACE_DEBUG ((LM_INFO,
47 "Backend_Impl::sleep(%P|%t) - finished after %d seconds\n",
48 seconds));
50 shutdown();
53 void Bug_3647_Regression::Backend_Impl::
54 shutdown()
56 if (verbose_)
58 ACE_DEBUG ((LM_INFO,
59 "Backend_Impl::shutdown(%P|%t) - called\n"));
61 orb_->shutdown (false);