Interface for NS method Requests. More...
#include <Method_Request.h>


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) |
| void | init (const TAO_Notify_Event *event) |
| const ACE_Time_Value & | creation_time (void) const |
| The creation time of the event to which this request corresponds. | |
Private Attributes | |
| ACE_Time_Value | time_ |
Interface for NS method Requests.
Definition at line 57 of file Method_Request.h.
| anonymous enum |
| TAO_Notify_Method_Request_Queueable::TAO_Notify_Method_Request_Queueable | ( | ) |
Definition at line 23 of file Method_Request.cpp.
{
}
| TAO_Notify_Method_Request_Queueable::TAO_Notify_Method_Request_Queueable | ( | const TAO_Notify_Event * | event | ) |
Definition at line 27 of file Method_Request.cpp.
{
this->init (event);
}
| TAO_Notify_Method_Request_Queueable * TAO_Notify_Method_Request_Queueable::copy | ( | void | ) | [virtual] |
Implements TAO_Notify_Method_Request.
Reimplemented in TAO_Notify_Method_Request_Shutdown.
Definition at line 18 of file Method_Request.cpp.
{
return this;
}
| const ACE_Time_Value & TAO_Notify_Method_Request_Queueable::creation_time | ( | void | ) | const |
The creation time of the event to which this request corresponds.
Definition at line 65 of file Method_Request.cpp.
{
return this->time_;
}
| void TAO_Notify_Method_Request_Queueable::init | ( | const TAO_Notify_Event * | event | ) |
Definition at line 33 of file Method_Request.cpp.
{
ACE_ASSERT( event != 0 );
// Set the parameters that affect queuing in the message queue.
// The ACE_Message_Block priorities go from 0 (lowest) to ULONG_MAX
// (highest), while the Notification Events go from -32767 (lowest,
// even though CORBA::Short goes to -32768) to 32767 (highest).
// Convert to CORBA::Long to preserve the sign. Conversion to
// unsigned long will happen automatically and we do not have to worry
// about losing the number in the addition since priority () returns a
// CORBA::Short.
this->msg_priority ((CORBA::Long)event->priority ().value () + PRIORITY_BASE);
// The deadline time for the message block is absolute, while the
// timeout for the event is relative to the time it was received.
// So, we do a little conversion and set it on the message block (us)
const TAO_Notify_Property_Time& timeout = event->timeout ();
if (timeout.is_valid () && timeout != 0)
{
ACE_Time_Value deadline;
ORBSVCS_Time::TimeT_to_Time_Value(deadline, timeout.value());
deadline += ACE_OS::gettimeofday ();
this->msg_deadline_time (deadline);
}
this->time_ = event->creation_time ();
}
Definition at line 74 of file Method_Request.h.
1.7.0