Public Member Functions | Private Attributes

TAO::Portable_Server::POA_Guard Class Reference

POA_Guard. More...

#include <POA_Guard.h>

Collaboration diagram for TAO::Portable_Server::POA_Guard:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 POA_Guard (::TAO_Root_POA &poa, bool check_for_destruction=true)

Private Attributes

ACE_Guard< ACE_Lockguard_

Detailed Description

POA_Guard.

POA_Guard

Definition at line 40 of file POA_Guard.h.


Constructor & Destructor Documentation

TAO::Portable_Server::POA_Guard::POA_Guard ( ::TAO_Root_POA poa,
bool  check_for_destruction = true 
)

Definition at line 18 of file POA_Guard.cpp.

      : guard_ (poa.lock ())
    {
      if (!this->guard_.locked ())
        throw
          CORBA::INTERNAL (
            CORBA::SystemException::_tao_minor_code (
              TAO_GUARD_FAILURE,
              0),
            CORBA::COMPLETED_NO);

      // Check if a non-servant upcall is in progress.  If a non-servant
      // upcall is in progress, wait for it to complete.  Unless of
      // course, the thread making the non-servant upcall is this thread.
      poa.object_adapter ().wait_for_non_servant_upcalls_to_complete ();

      if (check_for_destruction && poa.cleanup_in_progress ())
        throw
          CORBA::BAD_INV_ORDER (
            CORBA::SystemException::_tao_minor_code (
              TAO_POA_BEING_DESTROYED,
              0),
            CORBA::COMPLETED_NO);
    }


Member Data Documentation

ACE_Guard<ACE_Lock> TAO::Portable_Server::POA_Guard::guard_ [private]

Definition at line 46 of file POA_Guard.h.


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