#include <Method_Request.h>
Inheritance diagram for TAO_Notify_Method_Request_Queueable:
Public Types | |
enum | { PRIORITY_BASE = 32768 } |
Public Member Functions | |
TAO_Notify_Method_Request_Queueable () | |
TAO_Notify_Method_Request_Queueable (const TAO_Notify_Event *event) | |
virtual TAO_Notify_Method_Request_Queueable * | copy () |
void | init (const TAO_Notify_Event *event) |
Definition at line 57 of file Method_Request.h.
|
Definition at line 62 of file Method_Request.h.
00062 {PRIORITY_BASE = 32768}; |
|
Definition at line 23 of file Method_Request.cpp.
00024 { 00025 } |
|
Definition at line 27 of file Method_Request.cpp. References init().
00028 { 00029 this->init (event); 00030 } |
|
Implements TAO_Notify_Method_Request. Reimplemented in TAO_Notify_Method_Request_Shutdown. Definition at line 18 of file Method_Request.cpp.
00019 { 00020 return this; 00021 } |
|
Definition at line 33 of file Method_Request.cpp. References ACE_ASSERT, ACE_OS::gettimeofday(), TAO_Notify_PropertyBase_T< TYPE >::is_valid(), ACE_Message_Block::msg_deadline_time(), ACE_Message_Block::msg_priority(), TAO_Notify_Event::priority(), PRIORITY_BASE, TAO_Notify_Property_Time, TAO_Notify_Event::timeout(), and TAO_Notify_PropertyBase_T< TYPE >::value(). Referenced by TAO_Notify_Method_Request_Queueable().
00034 { 00035 ACE_ASSERT( event != 0 ); 00036 // Set the parameters that affect queuing in the message queue. 00037 // The ACE_Message_Block priorities go from 0 (lowest) to ULONG_MAX 00038 // (highest), while the Notification Events go from -32767 (lowest, 00039 // even though CORBA::Short goes to -32768) to 32767 (highest). 00040 00041 // Convert to CORBA::Long to preserve the sign. Conversion to 00042 // unsigned long will happen automatically and we do not have to worry 00043 // about losing the number in the addition since priority () returns a 00044 // CORBA::Short. 00045 this->msg_priority ((CORBA::Long)event->priority ().value () + PRIORITY_BASE); 00046 00047 // The deadline time for the message block is absolute, while the 00048 // timeout for the event is relative to the time it was received. 00049 // So, we do a little conversion and set it on the message block (us) 00050 00051 const TAO_Notify_Property_Time& timeout = event->timeout (); 00052 00053 if (timeout.is_valid () && timeout != 0) 00054 { 00055 ACE_Time_Value deadline; 00056 ORBSVCS_Time::TimeT_to_Time_Value(deadline, timeout.value()); 00057 deadline += ACE_OS::gettimeofday (); 00058 this->msg_deadline_time (deadline); 00059 } 00060 } |