1 #include "Messenger_i.h"
2 #include "ace/Thread.h"
5 // Implementation skeleton constructor
6 Messenger_i::Messenger_i(CORBA::ORB_ptr orb
)
8 CORBA::Object_var obj
= orb
->resolve_initial_references("RTCurrent");
9 rt_current_
= RTCORBA::Current::_narrow(obj
.in());
12 // Implementation skeleton destructor
13 Messenger_i::~Messenger_i()
18 Messenger_i::send_message (const char* user_name
,
22 CORBA::Short priority
= rt_current_
->the_priority();
24 ACE_hthread_t current
;
25 ACE_Thread::self (current
);
28 std::cout
<< "Message from: " << user_name
<< std::endl
29 << "Subject: " << subject
<< std::endl
30 << "CORBA Priority: " << priority
<< std::endl
;
31 if (ACE_Thread::getprio (current
, native_priority
) != -1) {
32 std::cout
<< "Native Priority: " << native_priority
<< std::endl
;
34 std::cout
<< "Message: " << message
<< std::endl
<< std::endl
;