Public Types | Public Member Functions | Private Attributes

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_Queueable
copy (void)
void init (const TAO_Notify_Event *event)
const ACE_Time_Valuecreation_time (void) const
 The creation time of the event to which this request corresponds.

Private Attributes

ACE_Time_Value time_

Detailed Description

Interface for NS method Requests.

Definition at line 57 of file Method_Request.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
PRIORITY_BASE 

Definition at line 62 of file Method_Request.h.

{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.

{
}

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);
}


Member Function Documentation

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 ();
}


Member Data Documentation

Definition at line 74 of file Method_Request.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines