TAO_RTEvent 4.0.0
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TAO_EC_Object_Deactivator Class Reference

Utility for deactivating servants from POA. More...

#include <EC_Lifetime_Utils.h>

Collaboration diagram for TAO_EC_Object_Deactivator:
Collaboration graph
[legend]

Public Member Functions

 TAO_EC_Object_Deactivator ()
 
 TAO_EC_Object_Deactivator (PortableServer::POA_ptr poa, PortableServer::ObjectId const &id)
 
 ~TAO_EC_Object_Deactivator ()
 
void set_values (PortableServer::POA_ptr poa, PortableServer::ObjectId const &id)
 
void set_values (TAO_EC_Object_Deactivator &deactivator)
 Take on the state of deactivator. deactivator loses its state.
 
void allow_deactivation ()
 
void disallow_deactivation ()
 
void deactivate ()
 
PortableServer::POA_var poa () const
 Accessor for the POA used in deactivation.
 

Private Member Functions

 TAO_EC_Object_Deactivator (const TAO_EC_Object_Deactivator &rhs)
 Disallow.
 
TAO_EC_Object_Deactivatoroperator= (const TAO_EC_Object_Deactivator &rhs)
 

Private Attributes

PortableServer::POA_var poa_
 POA from which the object will be deactivated.
 
PortableServer::ObjectId id_
 ObjectId of the object to be deactivated.
 
int deactivate_
 

Detailed Description

Utility for deactivating servants from POA.

Maintains state necessary to deactivate a servant from POA. Can be told to deactivate a servant explicitly or can do so automagically, in its destructor.

Constructor & Destructor Documentation

◆ TAO_EC_Object_Deactivator() [1/3]

TAO_EC_Object_Deactivator::TAO_EC_Object_Deactivator ( )

Default constructor. Deactivation info can be supplied later through set_values ().

◆ TAO_EC_Object_Deactivator() [2/3]

TAO_EC_Object_Deactivator::TAO_EC_Object_Deactivator ( PortableServer::POA_ptr poa,
PortableServer::ObjectId const & id )

Constructor. Set id which will be deactivated from @ poa in the deactivator's destructor, unless deactivate () or disallow_deactivation () are invoked before the destruction.

◆ ~TAO_EC_Object_Deactivator()

TAO_EC_Object_Deactivator::~TAO_EC_Object_Deactivator ( )

Destructor. Deactivates id_ from poa_ if those values have been set, and neither deactivate() nor disallow_deactivation() have been invoked.

◆ TAO_EC_Object_Deactivator() [3/3]

TAO_EC_Object_Deactivator::TAO_EC_Object_Deactivator ( const TAO_EC_Object_Deactivator & rhs)
private

Disallow.

Member Function Documentation

◆ allow_deactivation()

void TAO_EC_Object_Deactivator::allow_deactivation ( )

Explicitly enable deactivation to happen in destructor or when deactivate() is called.

◆ deactivate()

void TAO_EC_Object_Deactivator::deactivate ( )

Perform deactivation now if <poa_> and <id_> values have been set, and deactivation hasn't happened yet nor has it been explicitly disallowed. CORBA exceptions occurring during deactivation are not propagated. Deactivation will NOT happen in the destructor.

◆ disallow_deactivation()

void TAO_EC_Object_Deactivator::disallow_deactivation ( )

Explicitly disable deactivation from happening in destructor or when deactivate() is called.

◆ operator=()

TAO_EC_Object_Deactivator & TAO_EC_Object_Deactivator::operator= ( const TAO_EC_Object_Deactivator & rhs)
private

◆ poa()

PortableServer::POA_var TAO_EC_Object_Deactivator::poa ( ) const

Accessor for the POA used in deactivation.

◆ set_values() [1/2]

void TAO_EC_Object_Deactivator::set_values ( PortableServer::POA_ptr poa,
PortableServer::ObjectId const & id )

Set <id> which will be deactivated from <poa> in the deactivator's destructor, unless deactivate () or disallow_deactivation () are invoked before the destruction.

◆ set_values() [2/2]

void TAO_EC_Object_Deactivator::set_values ( TAO_EC_Object_Deactivator & deactivator)

Take on the state of deactivator. deactivator loses its state.

Member Data Documentation

◆ deactivate_

int TAO_EC_Object_Deactivator::deactivate_
private

Flag indicating whether deactivation will be attempted. The flag is set to false if <poa_> and <id_> haven't been set yet, or if deactivation already happened, or if disallow_deactivation () method is invoked.

◆ id_

PortableServer::ObjectId TAO_EC_Object_Deactivator::id_
private

ObjectId of the object to be deactivated.

◆ poa_

PortableServer::POA_var TAO_EC_Object_Deactivator::poa_
private

POA from which the object will be deactivated.


The documentation for this class was generated from the following files: