TAO_Notify_Method_Request_Queueable Class Reference

Interface for NS method Requests. More...

#include <Method_Request.h>

Inheritance diagram for TAO_Notify_Method_Request_Queueable:

Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_Method_Request_Queueable:

Collaboration graph
[legend]
List of all members.

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_Queueablecopy ()
void init (const TAO_Notify_Event *event)

Detailed Description

Interface for NS method Requests.

Definition at line 57 of file Method_Request.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
PRIORITY_BASE 

Definition at line 62 of file Method_Request.h.

00062 {PRIORITY_BASE = 32768};


Constructor & Destructor Documentation

TAO_Notify_Method_Request_Queueable::TAO_Notify_Method_Request_Queueable  ) 
 

Definition at line 23 of file Method_Request.cpp.

00024 {
00025 }

TAO_Notify_Method_Request_Queueable::TAO_Notify_Method_Request_Queueable const TAO_Notify_Event event  ) 
 

Definition at line 27 of file Method_Request.cpp.

References init().

00028 {
00029   this->init (event);
00030 }


Member Function Documentation

TAO_Notify_Method_Request_Queueable * TAO_Notify_Method_Request_Queueable::copy  )  [virtual]
 

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 }

void TAO_Notify_Method_Request_Queueable::init const TAO_Notify_Event event  ) 
 

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 }


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:32:24 2006 for TAO_CosNotification by doxygen 1.3.6