Public Member Functions | Protected Member Functions | Private Attributes

TAO::CSD::TP_Custom_Request Class Reference

Base class for "queue-able" Custom (non-CORBA) requests. More...

#include <CSD_TP_Custom_Request.h>

Inheritance diagram for TAO::CSD::TP_Custom_Request:
Inheritance graph
[legend]
Collaboration diagram for TAO::CSD::TP_Custom_Request:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~TP_Custom_Request ()
 Virtual Destructor.

Protected Member Functions

 TP_Custom_Request (TP_Custom_Request_Operation *op, TP_Servant_State *servant_state)
 Constructor.
void execute_op ()
void cancel_op ()

Private Attributes

TP_Custom_Request_Operation_Handle op_

Detailed Description

Base class for "queue-able" Custom (non-CORBA) requests.

TBD - Add description

Definition at line 47 of file CSD_TP_Custom_Request.h.


Constructor & Destructor Documentation

TAO::CSD::TP_Custom_Request::~TP_Custom_Request (  )  [virtual]

Virtual Destructor.

Definition at line 15 of file CSD_TP_Custom_Request.cpp.

{
}

TAO::CSD::TP_Custom_Request::TP_Custom_Request ( TP_Custom_Request_Operation op,
TP_Servant_State servant_state 
) [protected]

Constructor.

Definition at line 9 of file CSD_TP_Custom_Request.inl.

  : TP_Request(op->servant(),servant_state),
    op_(op, false)
{
}


Member Function Documentation

void TAO::CSD::TP_Custom_Request::cancel_op (  )  [protected]

Definition at line 40 of file CSD_TP_Custom_Request.inl.

{
  this->op_->cancel();

  // See comments in the execute_op() method.
  this->op_ = 0;
}

void TAO::CSD::TP_Custom_Request::execute_op (  )  [protected]

Definition at line 19 of file CSD_TP_Custom_Request.inl.

{
  this->op_->execute();

  // Now drop the reference to the custom operation object.
  // This is necessary so that custom operation objects can be created
  // on the stack for synchronous custom requests.  If we do not do this,
  // then there is a race condition which could result in the stack-created
  // custom operation object having a reference count of 2 when it falls
  // out of scope (and destructs).  Our op_ data member would be the one
  // that held the other reference, and when our op_ data member destructs,
  // it attempts to perform a _remove_ref() on the underlying operation
  // object - which has already been destructed!  Thus, we reset the op_
  // data member here to the 'nil' state - causing the _remove_ref() to
  // be performed now.
  this->op_ = 0;
}


Member Data Documentation

TP_Custom_Request_Operation_Handle TAO::CSD::TP_Custom_Request::op_ [private]

Definition at line 67 of file CSD_TP_Custom_Request.h.


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