3 // ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******
4 // TAO and the TAO IDL Compiler have been developed by the Center for
5 // Distributed Object Computing at Washington University, St. Louis.
7 // Information about TAO is available at:
8 // http://www.dre.vanderbilt.edu/~schmidt/TAO.html
10 #include "Messenger_i.h"
11 #include "Terminator.h"
15 // Implementation skeleton constructor
16 Messenger_i::Messenger_i (CORBA::ORB_ptr orb
, Terminator
&terminator
)
17 : orb_ (CORBA::ORB::_duplicate (orb
))
19 , terminator_ (terminator
)
23 // Implementation skeleton destructor
24 Messenger_i::~Messenger_i (void)
28 CORBA::Boolean
Messenger_i::send_message (
29 const char * user_name
,
33 std::cout
<< "Message count: " << message_count_
++ << std::endl
;
34 std::cout
<< "Message from: " << user_name
<< std::endl
35 << "Subject: " << subject
<< std::endl
36 << "Message: " << message
<< std::endl
;
41 Messenger_i::abort (CORBA::Short delay_secs
)
43 ACE_Message_Block
*mb
= 0;
44 ACE_NEW(mb
, ACE_Message_Block(2));
45 ACE_OS::sprintf(mb
->wr_ptr (), "%d", delay_secs
);
50 Messenger_i::shutdown (void)
52 this->orb_
->shutdown (0);