Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

ServantFactory Class Reference

#include <ServantFactory.h>

Inheritance diagram for ServantFactory:

ServantFactory_Activator ServantFactory_Locator ServantFactory_Simple List of all members.

Detailed Description

Base class of for all Servant Factory types.

All derivations of ServantFactory ultimately derive from this class. It declares the base contract of operations and exceptions. This class is responsible for provisioning Servants as required and creating the appropriate type of ORB


Public Member Functions

 ServantFactory (std::string the_name)
 ServantFactory (const char *the_name)
virtual void build (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa)=0 throw (ServantBuildException)
PortableServer::POA_ptr local_poa_nc ()
virtual const std::string poa_name_string () const
virtual const char * poa_name () const
void setNsServantIdMap (ConfMap &_n)

Protected Member Functions

void local_poa (PortableServer::POA_ptr poa)
const PortableServer::POA_ptr parent_poa_nc ()
void parent_poa (PortableServer::POA_ptr poa)
const CORBA::ORB_ptr local_orb_nc ()
void local_orb (CORBA::ORB_ptr orb)

Protected Attributes

ConfMap nsServantIdMap


Constructor & Destructor Documentation

ServantFactory::ServantFactory std::string  the_name  )  [explicit]
 

ctor

A ServantFactory must have a name

Parameters:
the_name of this POA

ServantFactory::ServantFactory const char *  the_name  )  [explicit]
 

ctor

A ServantFactory must have a name

Parameters:
the_name to use as the POA name


Member Function Documentation

virtual void ServantFactory::build CORBA::ORB_ptr  orb,
PortableServer::POA_ptr  poa
throw (ServantBuildException) [pure virtual]
 

Triggers POA and Servant creation

Kicks off the chain of events that results in the creation of a POA with the appropriate policy list and the provision of Servants. This is a pure virtual function and is implemented at the level where the POA model is understood.

Parameters:
orb - _ptr to the ORB. If you need to keep it in your subclass, be sure to make a copy and hold it in a _var
poa - _ptr to the RootPOA. OrbInit passes the RootPOA into this operation. If you need to keep a reference in your subclass, be sure to make a copy and hold it in a _var
Exceptions:
ServantBuildException 
Precondition:
POA and ORB instances have been created
Postcondition:
POA has been created and Servants have been provisioned

Implemented in ServantFactory_Activator, ServantFactory_Locator, and ServantFactory_Simple.

void ServantFactory::local_orb CORBA::ORB_ptr  orb  )  [protected]
 

Set this Factory's orb

Parameters:
orb - This Factory's reference to the system ORB
Postcondition:
_orb = _duplicate(orb)

const CORBA::ORB_ptr ServantFactory::local_orb_nc  )  [protected]
 

Access the factory's ORB

Operation does not return a copy; the caller should not deallocate

Returns:
_orb as ORB_ptr (DO NOT DEALLOCATE)

void ServantFactory::local_poa PortableServer::POA_ptr  poa  )  [protected]
 

Set the local POA instance

Parameters:
poa as POA_ptr
Postcondition:
_poa = _duplicate(poa)

PortableServer::POA_ptr ServantFactory::local_poa_nc  ) 
 

Obtain a reference to the POA local to this factory.

Non-copying version; caller should NOT deallocate

Returns:
local_poa as POA_ptr (DO NOT DEALLOCATE)

void ServantFactory::parent_poa PortableServer::POA_ptr  poa  )  [protected]
 

Set this Factory's parent POA

Parameters:
poa -- A _ptr to this Factory's parent POA

const PortableServer::POA_ptr ServantFactory::parent_poa_nc  )  [protected]
 

Access the POA that is the parent of the local POA

Operation does not return a copy; the caller should not deallocate

Returns:
parent_poa as POA_ptr (DO NOT DEALLOCATE)

virtual const char* ServantFactory::poa_name  )  const [inline, virtual]
 

Obtain the name of the local POA

Returns the name of the POA local to this factory

Returns:
name as const char*
Note:
The caller is responsible for the memory

virtual const std::string ServantFactory::poa_name_string  )  const [inline, virtual]
 

Obtain the name of the local POA

Returns the name of the POA local to this factory

Returns:
name as std::string

void ServantFactory::setNsServantIdMap ConfMap _n  ) 
 

Set the configuration map

Parameters:
_n - The configuration map


Member Data Documentation

ConfMap ServantFactory::nsServantIdMap [protected]
 

Author:
gg
Date:
March, 04
The nsServantIdMap is used to store command line variables and values in an association array. All command line arguments prefixed with -BP will be put into the map.


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