Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TAO_ServantBase Class Reference

Base class for skeletons and servants. More...

#include <Servant_Base.h>

Inheritance diagram for TAO_ServantBase:

Inheritance graph
[legend]
Collaboration diagram for TAO_ServantBase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~TAO_ServantBase (void)
 Destructor.
virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Returns the default POA for this servant.
virtual CORBA::Boolean _is_a (const char *logical_type_id ACE_ENV_ARG_DECL_WITH_DEFAULTS)
 Local implementation of the CORBA::Object::_is_a method.
virtual CORBA::Boolean _non_existent (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Default _non_existent: always returns false.
virtual CORBA::InterfaceDef_ptr _get_interface (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Query the Interface Repository for the interface definition.
virtual CORBA::Object_ptr _get_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Default _get_component: always returns CORBA::Object::_nil().
virtual char * _repository_id (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Get the repository id.
virtual TAO_Stub_create_stub (ACE_ENV_SINGLE_ARG_DECL)
 This is an auxiliary method for _this() and _narrow().
virtual void _dispatch (TAO_ServerRequest &request, void *servant_upcall ACE_ENV_ARG_DECL)=0
virtual int _find (const char *opname, TAO_Skeleton &skelfunc, const unsigned int length=0)
virtual int _find (const char *opname, TAO_Collocated_Skeleton &skelfunc, TAO::Collocation_Strategy st, const unsigned int length=0)
virtual const char * _interface_repository_id (void) const =0
 Get this interface's repository id (TAO specific).
Reference Counting Operations
virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL)
 Increase reference count by one.
virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL)
virtual CORBA::ULong _refcount_value (ACE_ENV_SINGLE_ARG_DECL) const

Protected Member Functions

 TAO_ServantBase (void)
 Default constructor, only derived classes can be created.
 TAO_ServantBase (const TAO_ServantBase &)
 Copy constructor, protected so no instances can be created.
TAO_ServantBaseoperator= (const TAO_ServantBase &)
 Assignment operator.
virtual void synchronous_upcall_dispatch (TAO_ServerRequest &req, void *servant_upcall, void *derived_this ACE_ENV_ARG_DECL)
virtual void asynchronous_upcall_dispatch (TAO_ServerRequest &req, void *servant_upcall, void *derived_this ACE_ENV_ARG_DECL)

Protected Attributes

ACE_Atomic_Op< TAO_SYNCH_MUTEX,
long > 
ref_count_
 Reference counter.
TAO_Operation_Tableoptable_

Detailed Description

Base class for skeletons and servants.

The POA spec requires that all servants inherit from this class' base class.

An instance of a servant class derived from ServantBase initially has a reference count of one. Invoking _add_ref on the servant instance increases its reference count by one. Invoking _remove_ref on the servant instance decreases its reference count by one; if the resulting reference count equals zero, _remove_ref invokes delete on its this pointer in order to destroy the servant. For ORBs that operate in multi-threaded environments, the implementations of _add_ref and _remove_ref that the ServantBase class provides shall be thread-safe.

Like ServantBase supports copy construction and the default assignment operation. Copy construction always sets the reference count of the new servant instance to one. The default assignment implementation merely returns *this and does not affect the reference count.


Constructor & Destructor Documentation

TAO_ServantBase::~TAO_ServantBase void   )  [virtual]
 

Destructor.

TAO_ServantBase::TAO_ServantBase void   )  [protected]
 

Default constructor, only derived classes can be created.

TAO_ServantBase::TAO_ServantBase const TAO_ServantBase  )  [protected]
 

Copy constructor, protected so no instances can be created.


Member Function Documentation

void TAO_ServantBase::_add_ref ACE_ENV_SINGLE_ARG_DECL   )  [virtual]
 

Increase reference count by one.

Implements TAO_Abstract_ServantBase.

TAO_Stub * TAO_ServantBase::_create_stub ACE_ENV_SINGLE_ARG_DECL   )  [virtual]
 

This is an auxiliary method for _this() and _narrow().

Implements TAO_Abstract_ServantBase.

Reimplemented in TAO_Local_ServantBase.

PortableServer::POA_ptr TAO_ServantBase::_default_POA ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  [virtual]
 

Returns the default POA for this servant.

Reimplemented in POA_CORBA::Policy_tie< T >.

virtual void TAO_ServantBase::_dispatch TAO_ServerRequest request,
void *servant_upcall  ACE_ENV_ARG_DECL
[pure virtual]
 

Dispatches a request to the object: find the operation, cast the type to the most derived type, demarshall all the parameters from the request and finally invokes the operation, storing the results and out parameters (if any) or the exceptions thrown into request.

Implements TAO_Abstract_ServantBase.

Implemented in TAO_Local_ServantBase, and POA_CORBA::Policy.

int TAO_ServantBase::_find const char *  opname,
TAO_Collocated_Skeleton skelfunc,
TAO::Collocation_Strategy  st,
const unsigned int  length = 0
[virtual]
 

Implements TAO_Abstract_ServantBase.

int TAO_ServantBase::_find const char *  opname,
TAO_Skeleton skelfunc,
const unsigned int  length = 0
[virtual]
 

Please see documentation in tao/Abstract_Servant_Base.h for details.

Implements TAO_Abstract_ServantBase.

virtual CORBA::Object_ptr TAO_ServantBase::_get_component ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  [virtual]
 

Default _get_component: always returns CORBA::Object::_nil().

Implements TAO_Abstract_ServantBase.

CORBA::InterfaceDef_ptr TAO_ServantBase::_get_interface ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  [virtual]
 

Query the Interface Repository for the interface definition.

Implements TAO_Abstract_ServantBase.

virtual const char* TAO_ServantBase::_interface_repository_id void   )  const [pure virtual]
 

Get this interface's repository id (TAO specific).

Implements TAO_Abstract_ServantBase.

Implemented in POA_CORBA::Policy.

CORBA::Boolean TAO_ServantBase::_is_a const char *logical_type_id  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  [virtual]
 

Local implementation of the CORBA::Object::_is_a method.

Implements TAO_Abstract_ServantBase.

Reimplemented in POA_CORBA::Policy.

virtual CORBA::Boolean TAO_ServantBase::_non_existent ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  [virtual]
 

Default _non_existent: always returns false.

Implements TAO_Abstract_ServantBase.

CORBA::ULong TAO_ServantBase::_refcount_value ACE_ENV_SINGLE_ARG_DECL   )  const [virtual]
 

Returns the current reference count value.

Implements TAO_Abstract_ServantBase.

void TAO_ServantBase::_remove_ref ACE_ENV_SINGLE_ARG_DECL   )  [virtual]
 

Decreases reference count by one; if the resulting reference count equals zero, _remove_ref invokes delete on its this pointer in order to destroy the servant.

Implements TAO_Abstract_ServantBase.

virtual char* TAO_ServantBase::_repository_id ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  [virtual]
 

Get the repository id.

Implements TAO_Abstract_ServantBase.

void TAO_ServantBase::asynchronous_upcall_dispatch TAO_ServerRequest req,
void *  servant_upcall,
void *derived_this  ACE_ENV_ARG_DECL
[protected, virtual]
 

TAO_ServantBase & TAO_ServantBase::operator= const TAO_ServantBase  )  [protected]
 

Assignment operator.

void TAO_ServantBase::synchronous_upcall_dispatch TAO_ServerRequest req,
void *  servant_upcall,
void *derived_this  ACE_ENV_ARG_DECL
[protected, virtual]
 

Implements TAO_Abstract_ServantBase.


Member Data Documentation

TAO_Operation_Table* TAO_ServantBase::optable_ [protected]
 

The operation table for this servant. It is initialized by the most derived class.

ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> TAO_ServantBase::ref_count_ [protected]
 

Reference counter.


The documentation for this class was generated from the following files:
Generated on Sat Aug 6 03:23:38 2005 for TAO_PortableServer by  doxygen 1.3.9.1