1 #include "AMI_Buffering.h"
3 AMI_Buffering::AMI_Buffering (CORBA::ORB_ptr orb
,
4 Test::AMI_Buffering_Admin_ptr admin
)
5 : orb_ (CORBA::ORB::_duplicate (orb
)),
6 admin_ (Test::AMI_Buffering_Admin::_duplicate (admin
)),
13 AMI_Buffering::Nest_Guard::Nest_Guard (AMI_Buffering
&a
)
17 if (target_
.nest_
> target_
.max_nest_
)
18 target_
.max_nest_
= target_
.nest_
;
21 AMI_Buffering::Nest_Guard::~Nest_Guard ()
27 AMI_Buffering::receive_data (const Test::Payload
&the_payload
)
31 AMI_Buffering::Nest_Guard
ng(*this);
32 this->admin_
->request_received (the_payload
.length ());
34 catch (const CORBA::Exception
&)
36 ACE_DEBUG ((LM_DEBUG
,"(%P|%t) DEBUG: AMI_Buffering::receive_data"));
43 AMI_Buffering::flush ()
48 AMI_Buffering::sync ()
50 this->admin_
->flush ();
54 AMI_Buffering::shutdown ()
56 this->must_shutdown_
= true;
61 AMI_Buffering::try_shutdown()
63 if (!this->must_shutdown_
|| this->nest_
> 0)
65 if (this->max_nest_
> 1)
66 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) max nesting level: %d\n", max_nest_
));
67 this->admin_
->shutdown();
69 this->orb_
->shutdown (false);