TAO_PortableServer  3.0.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
TAO_Object_Adapter Class Reference

Defines the Object Adapter abstraction. More...

#include <Object_Adapter.h>

Inheritance diagram for TAO_Object_Adapter:
Inheritance graph
[legend]
Collaboration diagram for TAO_Object_Adapter:
Collaboration graph
[legend]

Classes

class  Active_Hint_Strategy
 This class uses active demux hint for POA active hint strategy. More...
 
class  Hint_Strategy
 Base class for POA active hint strategy. More...
 
class  iteratable_poa_name
 This class allows iteration over a folded poa name. More...
 
class  No_Hint_Strategy
 This class doesn't use any hints for POA active hint strategy. More...
 
class  poa_name_iterator
 Iterator for a folded poa name. More...
 

Public Types

typedef PortableServer::ObjectId poa_name
 
typedef PortableServer::ObjectId_var poa_name_var
 
typedef PortableServer::ObjectId_out poa_name_out
 

Public Member Functions

 TAO_Object_Adapter (const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters, TAO_ORB_Core &orb_core)
 Constructor. More...
 
 ~TAO_Object_Adapter ()
 Destructor. More...
 
int dispatch_servant (const TAO::ObjectKey &key, TAO_ServerRequest &req, CORBA::Object_out forward_to)
 
int locate_servant (const TAO::ObjectKey &key)
 
TAO_SERVANT_LOCATION find_servant (const TAO::ObjectKey &key, PortableServer::Servant &servant)
 
int find_poa (const poa_name &system_name, CORBA::Boolean activate_it, CORBA::Boolean root, const TAO::Portable_Server::Temporary_Creation_Time &poa_creation_time, TAO_Root_POA *&poa)
 
int bind_poa (const poa_name &folded_name, TAO_Root_POA *poa, poa_name_out system_name)
 
int unbind_poa (TAO_Root_POA *poa, const poa_name &folded_name, const poa_name &system_name)
 
int activate_poa (const poa_name &folded_name, TAO_Root_POA *&poa)
 
ACE_Locklock ()
 
TAO_SYNCH_MUTEXthread_lock ()
 
ACE_Reverse_Lock< ACE_Lock > & reverse_lock ()
 
TAO_Root_POAroot_poa () const
 Access the root poa. More...
 
TAO_ORB_Coreorb_core () const
 Access to ORB Core. More...
 
void wait_for_non_servant_upcalls_to_complete ()
 Wait for non-servant upcalls to complete. More...
 
void wait_for_non_servant_upcalls_to_complete_no_throw ()
 Non-exception throwing version. More...
 
TAO_Policy_Validatorvalidator ()
 Return the validator. More...
 
TAO_POA_Policy_Setdefault_poa_policies ()
 Return the set of default policies. More...
 
void servant_dispatcher (TAO_Servant_Dispatcher *dispatcher)
 
void init_default_policies (TAO_POA_Policy_Set &policies)
 Initialize the default set of POA policies. More...
 
virtual void open ()
 
virtual void close (int wait_for_completion)
 
virtual void check_close (int wait_for_completion)
 
virtual int priority () const
 
virtual int dispatch (TAO::ObjectKey &key, TAO_ServerRequest &request, CORBA::Object_out forward_to)
 
virtual const char * name () const
 
virtual CORBA::Object_ptr root ()
 
virtual CORBA::Object_ptr create_collocated_object (TAO_Stub *, const TAO_MProfile &)
 
virtual CORBA::Long initialize_collocated_object (TAO_Stub *)
 
TAO::Portable_Server::Non_Servant_Upcallnon_servant_upcall_in_progress () const
 
- Public Member Functions inherited from TAO_Adapter
virtual ~TAO_Adapter ()
 

Static Public Member Functions

static CORBA::ULong transient_poa_name_size ()
 

Protected Types

typedef ACE_Map< poa_name, TAO_Root_POA * > transient_poa_map
 Base class of the id map. More...
 
typedef ACE_Hash_Map_Manager_Ex_Adapter< poa_name, TAO_Root_POA *, TAO_ObjectId_Hash, ACE_Equal_To< poa_name >, TAO_Incremental_Key_Generatortransient_poa_hash_map
 Id hash map. More...
 
typedef ACE_Map_Manager_Adapter< poa_name, TAO_Root_POA *, TAO_Incremental_Key_Generatortransient_poa_linear_map
 Id linear map. More...
 
typedef ACE_Active_Map_Manager_Adapter< poa_name, TAO_Root_POA *, TAO_Ignore_Original_Key_Adaptertransient_poa_active_map
 Id active map. More...
 
typedef ACE_Map< poa_name, TAO_Root_POA * > persistent_poa_name_map
 Base class of the name map. More...
 
typedef ACE_Hash_Map_Manager_Ex_Adapter< poa_name, TAO_Root_POA *, TAO_ObjectId_Hash, ACE_Equal_To< PortableServer::ObjectId >, ACE_Noop_Key_Generator< poa_name > > persistent_poa_name_hash_map
 Id hash map. More...
 
typedef ACE_Map_Manager_Adapter< poa_name, TAO_Root_POA *, ACE_Noop_Key_Generator< poa_name > > persistent_poa_name_linear_map
 Id linear map. More...
 

Protected Member Functions

int locate_servant_i (const TAO::ObjectKey &key)
 
TAO_SERVANT_LOCATION find_servant_i (const TAO::ObjectKey &key, PortableServer::Servant &servant)
 
void dispatch_servant_i (const TAO::ObjectKey &key, TAO_ServerRequest &req, void *context)
 
void locate_poa (const TAO::ObjectKey &key, PortableServer::ObjectId &id, TAO_Root_POA *&poa)
 
int find_transient_poa (const poa_name &system_name, CORBA::Boolean root, const TAO::Portable_Server::Temporary_Creation_Time &poa_creation_time, TAO_Root_POA *&poa)
 
int find_persistent_poa (const poa_name &system_name, TAO_Root_POA *&poa)
 
int bind_transient_poa (TAO_Root_POA *poa, poa_name_out system_name)
 
int bind_persistent_poa (const poa_name &folded_name, TAO_Root_POA *poa, poa_name_out system_name)
 
int unbind_transient_poa (const poa_name &system_name)
 
int unbind_persistent_poa (const poa_name &folded_name, const poa_name &system_name)
 
virtual void do_dispatch (TAO_ServerRequest &req, TAO::Portable_Server::Servant_Upcall &upcall)
 

Static Protected Member Functions

static ACE_Lockcreate_lock (TAO_SYNCH_MUTEX &thread_lock)
 
static void set_transient_poa_name_size (const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters)
 

Protected Attributes

Hint_Strategyhint_strategy_
 
TAO_Servant_Dispatcherservant_dispatcher_
 Strategy for dispatching a request to a servant. More...
 
persistent_poa_name_mappersistent_poa_name_map_
 Persistent POA map. More...
 
transient_poa_maptransient_poa_map_
 Transient POA map. More...
 
TAO_ORB_Coreorb_core_
 
TAO_SYNCH_MUTEX thread_lock_
 
ACE_Locklock_
 
ACE_Reverse_Lock< ACE_Lockreverse_lock_
 

Static Protected Attributes

static CORBA::ULong transient_poa_name_size_ = 0
 

Private Member Functions

TAO_ServantBaseget_collocated_servant (const TAO_MProfile &mp)
 Helper method to get collocated servant. More...
 

Static Private Member Functions

static void release_poa_manager_factory (TAO_POAManager_Factory *factory)
 

Private Attributes

TAO_SYNCH_CONDITION non_servant_upcall_condition_
 Condition variable for waiting on non-servant upcalls to end. More...
 
TAO::Portable_Server::Non_Servant_Upcallnon_servant_upcall_in_progress_
 
unsigned int non_servant_upcall_nesting_level_
 Current nesting level of non_servant_upcalls. More...
 
ACE_thread_t non_servant_upcall_thread_
 Id of thread making the non-servant upcall. More...
 
TAO_Root_POAroot_
 The Root POA. More...
 
TAO_POAManager_Factorypoa_manager_factory_
 The POAManager factory. More...
 
TAO_POA_Default_Policy_Validator default_validator_
 
TAO_POA_Policy_Set default_poa_policies_
 

Friends

class TAO_Root_POA
 
class Active_Hint_Strategy
 
class No_Hint_Strategy
 
class TAO::Portable_Server::Non_Servant_Upcall
 
class TAO::Portable_Server::Servant_Upcall
 

Additional Inherited Members

- Public Attributes inherited from TAO_Adapter
 DS_OK
 
 DS_FAILED
 
 DS_MISMATCHED_KEY
 
 DS_FORWARD
 
 DS_DEFERRED_FORWARD
 

Detailed Description

Defines the Object Adapter abstraction.

This class will be used as a facade for the POAs in a server

Member Typedef Documentation

◆ persistent_poa_name_hash_map

Id hash map.

◆ persistent_poa_name_linear_map

Id linear map.

◆ persistent_poa_name_map

Base class of the name map.

◆ poa_name

◆ poa_name_out

◆ poa_name_var

◆ transient_poa_active_map

Id active map.

◆ transient_poa_hash_map

Id hash map.

◆ transient_poa_linear_map

Id linear map.

◆ transient_poa_map

Base class of the id map.

Constructor & Destructor Documentation

◆ TAO_Object_Adapter()

TAO_Object_Adapter::TAO_Object_Adapter ( const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters creation_parameters,
TAO_ORB_Core orb_core 
)

Constructor.

◆ ~TAO_Object_Adapter()

TAO_Object_Adapter::~TAO_Object_Adapter ( )

Destructor.

Member Function Documentation

◆ activate_poa()

int TAO_Object_Adapter::activate_poa ( const poa_name folded_name,
TAO_Root_POA *&  poa 
)

◆ bind_persistent_poa()

int TAO_Object_Adapter::bind_persistent_poa ( const poa_name folded_name,
TAO_Root_POA poa,
poa_name_out  system_name 
)
protected

◆ bind_poa()

int TAO_Object_Adapter::bind_poa ( const poa_name folded_name,
TAO_Root_POA poa,
poa_name_out  system_name 
)

◆ bind_transient_poa()

int TAO_Object_Adapter::bind_transient_poa ( TAO_Root_POA poa,
poa_name_out  system_name 
)
protected

◆ check_close()

void TAO_Object_Adapter::check_close ( int  wait_for_completion)
virtual

Implements TAO_Adapter.

◆ close()

void TAO_Object_Adapter::close ( int  wait_for_completion)
virtual

Implements TAO_Adapter.

◆ create_collocated_object()

CORBA::Object_ptr TAO_Object_Adapter::create_collocated_object ( TAO_Stub stub,
const TAO_MProfile mp 
)
virtual

Implements TAO_Adapter.

◆ create_lock()

ACE_Lock * TAO_Object_Adapter::create_lock ( TAO_SYNCH_MUTEX thread_lock)
staticprotected

◆ default_poa_policies()

TAO_POA_Policy_Set & TAO_Object_Adapter::default_poa_policies ( void  )

Return the set of default policies.

◆ dispatch()

int TAO_Object_Adapter::dispatch ( TAO::ObjectKey key,
TAO_ServerRequest request,
CORBA::Object_out  forward_to 
)
virtual

Implements TAO_Adapter.

◆ dispatch_servant()

int TAO_Object_Adapter::dispatch_servant ( const TAO::ObjectKey key,
TAO_ServerRequest req,
CORBA::Object_out  forward_to 
)

◆ dispatch_servant_i()

void TAO_Object_Adapter::dispatch_servant_i ( const TAO::ObjectKey key,
TAO_ServerRequest req,
void *  context 
)
protected

◆ do_dispatch()

void TAO_Object_Adapter::do_dispatch ( TAO_ServerRequest req,
TAO::Portable_Server::Servant_Upcall upcall 
)
protectedvirtual

◆ find_persistent_poa()

int TAO_Object_Adapter::find_persistent_poa ( const poa_name system_name,
TAO_Root_POA *&  poa 
)
protected

◆ find_poa()

int TAO_Object_Adapter::find_poa ( const poa_name system_name,
CORBA::Boolean  activate_it,
CORBA::Boolean  root,
const TAO::Portable_Server::Temporary_Creation_Time poa_creation_time,
TAO_Root_POA *&  poa 
)

◆ find_servant()

TAO_SERVANT_LOCATION TAO_Object_Adapter::find_servant ( const TAO::ObjectKey key,
PortableServer::Servant servant 
)

◆ find_servant_i()

TAO_SERVANT_LOCATION TAO_Object_Adapter::find_servant_i ( const TAO::ObjectKey key,
PortableServer::Servant servant 
)
protected

◆ find_transient_poa()

int TAO_Object_Adapter::find_transient_poa ( const poa_name system_name,
CORBA::Boolean  root,
const TAO::Portable_Server::Temporary_Creation_Time poa_creation_time,
TAO_Root_POA *&  poa 
)
protected

◆ get_collocated_servant()

TAO_ServantBase * TAO_Object_Adapter::get_collocated_servant ( const TAO_MProfile mp)
private

Helper method to get collocated servant.

◆ init_default_policies()

void TAO_Object_Adapter::init_default_policies ( TAO_POA_Policy_Set policies)

Initialize the default set of POA policies.

◆ initialize_collocated_object()

CORBA::Long TAO_Object_Adapter::initialize_collocated_object ( TAO_Stub stub)
virtual

Implements TAO_Adapter.

◆ locate_poa()

void TAO_Object_Adapter::locate_poa ( const TAO::ObjectKey key,
PortableServer::ObjectId id,
TAO_Root_POA *&  poa 
)
protected

◆ locate_servant()

int TAO_Object_Adapter::locate_servant ( const TAO::ObjectKey key)

◆ locate_servant_i()

int TAO_Object_Adapter::locate_servant_i ( const TAO::ObjectKey key)
protected

◆ lock()

ACE_Lock & TAO_Object_Adapter::lock ( void  )

◆ name()

const char * TAO_Object_Adapter::name ( ) const
virtual

Implements TAO_Adapter.

◆ non_servant_upcall_in_progress()

TAO::Portable_Server::Non_Servant_Upcall * TAO_Object_Adapter::non_servant_upcall_in_progress ( void  ) const

Pointer to the non-servant upcall in progress. If no non-servant upcall is in progress, this pointer is zero.

◆ open()

void TAO_Object_Adapter::open ( )
virtual

Implements TAO_Adapter.

◆ orb_core()

TAO_ORB_Core & TAO_Object_Adapter::orb_core ( void  ) const

Access to ORB Core.

◆ priority()

int TAO_Object_Adapter::priority ( ) const
virtual

Implements TAO_Adapter.

◆ release_poa_manager_factory()

void TAO_Object_Adapter::release_poa_manager_factory ( TAO_POAManager_Factory factory)
staticprivate

◆ reverse_lock()

ACE_Reverse_Lock< ACE_Lock > & TAO_Object_Adapter::reverse_lock ( void  )

◆ root()

CORBA::Object_ptr TAO_Object_Adapter::root ( )
virtual

Implements TAO_Adapter.

◆ root_poa()

TAO_Root_POA * TAO_Object_Adapter::root_poa ( void  ) const

Access the root poa.

◆ servant_dispatcher()

void TAO_Object_Adapter::servant_dispatcher ( TAO_Servant_Dispatcher dispatcher)

Set the servant dispatcher method. Ownership is transferred to this Object Adapter. Note: This should only be called at initialization.

◆ set_transient_poa_name_size()

void TAO_Object_Adapter::set_transient_poa_name_size ( const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters creation_parameters)
staticprotected

◆ thread_lock()

TAO_SYNCH_MUTEX & TAO_Object_Adapter::thread_lock ( void  )

◆ transient_poa_name_size()

CORBA::ULong TAO_Object_Adapter::transient_poa_name_size ( )
static

◆ unbind_persistent_poa()

int TAO_Object_Adapter::unbind_persistent_poa ( const poa_name folded_name,
const poa_name system_name 
)
protected

◆ unbind_poa()

int TAO_Object_Adapter::unbind_poa ( TAO_Root_POA poa,
const poa_name folded_name,
const poa_name system_name 
)

◆ unbind_transient_poa()

int TAO_Object_Adapter::unbind_transient_poa ( const poa_name system_name)
protected

◆ validator()

TAO_Policy_Validator & TAO_Object_Adapter::validator ( void  )

Return the validator.

◆ wait_for_non_servant_upcalls_to_complete()

void TAO_Object_Adapter::wait_for_non_servant_upcalls_to_complete ( )

Wait for non-servant upcalls to complete.

◆ wait_for_non_servant_upcalls_to_complete_no_throw()

void TAO_Object_Adapter::wait_for_non_servant_upcalls_to_complete_no_throw ( )

Non-exception throwing version.

Friends And Related Function Documentation

◆ Active_Hint_Strategy

friend class Active_Hint_Strategy
friend

◆ No_Hint_Strategy

friend class No_Hint_Strategy
friend

◆ TAO::Portable_Server::Non_Servant_Upcall

◆ TAO::Portable_Server::Servant_Upcall

◆ TAO_Root_POA

friend class TAO_Root_POA
friend

Member Data Documentation

◆ default_poa_policies_

TAO_POA_Policy_Set TAO_Object_Adapter::default_poa_policies_
private

Save a list of default policies that should be included in every POA (unless overridden).

◆ default_validator_

TAO_POA_Default_Policy_Validator TAO_Object_Adapter::default_validator_
private

The default validator and the beginning of the chain of policy validators.

◆ hint_strategy_

Hint_Strategy* TAO_Object_Adapter::hint_strategy_
protected

◆ lock_

ACE_Lock* TAO_Object_Adapter::lock_
protected

◆ non_servant_upcall_condition_

TAO_SYNCH_CONDITION TAO_Object_Adapter::non_servant_upcall_condition_
private

Condition variable for waiting on non-servant upcalls to end.

◆ non_servant_upcall_in_progress_

TAO::Portable_Server::Non_Servant_Upcall* TAO_Object_Adapter::non_servant_upcall_in_progress_
private

Pointer to the non-servant upcall in progress. If no non-servant upcall is in progress, this pointer is zero.

◆ non_servant_upcall_nesting_level_

unsigned int TAO_Object_Adapter::non_servant_upcall_nesting_level_
private

Current nesting level of non_servant_upcalls.

◆ non_servant_upcall_thread_

ACE_thread_t TAO_Object_Adapter::non_servant_upcall_thread_
private

Id of thread making the non-servant upcall.

◆ orb_core_

TAO_ORB_Core& TAO_Object_Adapter::orb_core_
protected

◆ persistent_poa_name_map_

persistent_poa_name_map* TAO_Object_Adapter::persistent_poa_name_map_
protected

Persistent POA map.

◆ poa_manager_factory_

TAO_POAManager_Factory* TAO_Object_Adapter::poa_manager_factory_
private

The POAManager factory.

◆ reverse_lock_

ACE_Reverse_Lock<ACE_Lock> TAO_Object_Adapter::reverse_lock_
protected

◆ root_

TAO_Root_POA* TAO_Object_Adapter::root_
private

The Root POA.

◆ servant_dispatcher_

TAO_Servant_Dispatcher* TAO_Object_Adapter::servant_dispatcher_
protected

Strategy for dispatching a request to a servant.

◆ thread_lock_

TAO_SYNCH_MUTEX TAO_Object_Adapter::thread_lock_
protected

◆ transient_poa_map_

transient_poa_map* TAO_Object_Adapter::transient_poa_map_
protected

Transient POA map.

◆ transient_poa_name_size_

CORBA::ULong TAO_Object_Adapter::transient_poa_name_size_ = 0
staticprotected

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