TAO::PG_FactoryRegistry Class Reference

#include <PG_FactoryRegistry.h>

Collaboration diagram for TAO::PG_FactoryRegistry:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PG_FactoryRegistry (const ACE_TCHAR *name=ACE_LIB_TEXT("FactoryRegistry"))
 Constructor.
virtual ~PG_FactoryRegistry (void)
 virtual Destructor
int parse_args (int argc, ACE_TCHAR *argv[])
int init (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
void init (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa ACE_ENV_ARG_DECL)
int fini (ACE_ENV_SINGLE_ARG_DECL)
int idle (int &result ACE_ENV_ARG_DECL)
const ACE_TCHARidentity () const
::PortableGroup::FactoryRegistry_ptr reference ()
virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL)
virtual void register_factory (const char *role, const char *type_id, const PortableGroup::FactoryInfo &factory_info ACE_ENV_ARG_DECL) throw ( CORBA::SystemException , PortableGroup::MemberAlreadyPresent , PortableGroup::TypeConflict)
virtual void unregister_factory (const char *role, const PortableGroup::Location &location ACE_ENV_ARG_DECL) throw (CORBA::SystemException, PortableGroup::MemberNotFound)
virtual void unregister_factory_by_role (const char *role ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
virtual void unregister_factory_by_location (const PortableGroup::Location &location ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
virtual ::PortableGroup::FactoryInfoslist_factories_by_role (const char *role, CORBA::String_out type_id ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
virtual ::PortableGroup::FactoryInfoslist_factories_by_location (const PortableGroup::Location &location ACE_ENV_ARG_DECL) throw (CORBA::SystemException)

Private Types

typedef ACE_Null_Mutex MapMutex
typedef ACE_Hash_Map_Manager<
ACE_CString, RoleInfo *,
MapMutex
RegistryType
typedef ACE_Hash_Map_Entry<
ACE_CString, RoleInfo * > 
RegistryType_Entry
typedef ACE_Hash_Map_Iterator<
ACE_CString, RoleInfo *,
MapMutex
RegistryType_Iterator
typedef ACE_Guard< TAO_SYNCH_MUTEXInternalGuard
enum  { LIVE, DEACTIVATED, GONE }

Private Member Functions

int write_ior_file (const ACE_TCHAR *outputFile, const char *ior)

Private Attributes

ACE_TString identity_
TAO_SYNCH_MUTEX internals_
CORBA::ORB_var orb_
PortableServer::POA_var poa_
PortableServer::ObjectId_var object_id_
CORBA::Object_var this_obj_
CORBA::String_var ior_
const ACE_TCHARior_output_file_
const ACE_TCHARns_name_
CosNaming::NamingContext_var naming_context_
CosNaming::Name this_name_
int quit_on_idle_
enum TAO::PG_FactoryRegistry:: { ... }  quit_state_
int linger_
RegistryType registry_

Classes

struct  RoleInfo

Detailed Description

Implement the PortableGroup::FactoryRegistry interface Note FactoryRegistry is not part of the OMG standard. It was added as part of the TAO implementation of Fault Tolerant CORBA


Member Typedef Documentation

typedef ACE_Guard<TAO_SYNCH_MUTEX> TAO::PG_FactoryRegistry::InternalGuard [private]
 

typedef ACE_Null_Mutex TAO::PG_FactoryRegistry::MapMutex [private]
 

typedef ACE_Hash_Map_Manager<ACE_CString, RoleInfo *, MapMutex> TAO::PG_FactoryRegistry::RegistryType [private]
 

typedef ACE_Hash_Map_Entry<ACE_CString, RoleInfo *> TAO::PG_FactoryRegistry::RegistryType_Entry [private]
 

typedef ACE_Hash_Map_Iterator<ACE_CString, RoleInfo *, MapMutex> TAO::PG_FactoryRegistry::RegistryType_Iterator [private]
 


Member Enumeration Documentation

anonymous enum [private]
 

State of the quit process

Enumerator:
LIVE 
DEACTIVATED 
GONE 


Constructor & Destructor Documentation

TAO::PG_FactoryRegistry::PG_FactoryRegistry const ACE_TCHAR name = ACE_LIB_TEXT("FactoryRegistry")  ) 
 

Constructor.

TAO::PG_FactoryRegistry::~PG_FactoryRegistry void   )  [virtual]
 

virtual Destructor


Member Function Documentation

virtual void TAO::PG_FactoryRegistry::_remove_ref ACE_ENV_SINGLE_ARG_DECL   )  [virtual]
 

int TAO::PG_FactoryRegistry::fini ACE_ENV_SINGLE_ARG_DECL   ) 
 

Prepare to exit.

Returns:
zero for success; nonzero is process return code for failure.

const ACE_TCHAR * TAO::PG_FactoryRegistry::identity  )  const
 

Identify this object.

Returns:
a string to identify this object for logging/console message purposes.

int TAO::PG_FactoryRegistry::idle int &result  ACE_ENV_ARG_DECL  ) 
 

Processing to happen when the ORB's event loop is idle.

Parameters:
result is a place to return status to be returned by the process
Returns:
0 to continue. 1 to quit.

void TAO::PG_FactoryRegistry::init CORBA::ORB_ptr  orb,
PortableServer::POA_ptr poa  ACE_ENV_ARG_DECL
 

alternative init using designated poa

int TAO::PG_FactoryRegistry::init CORBA::ORB_ptr orb  ACE_ENV_ARG_DECL  ) 
 

Initialize this object.

Parameters:
orbManager our ORB -- we keep var to it.
Returns:
zero for success; nonzero is process return code for failure.

PortableGroup::FactoryInfos * TAO::PG_FactoryRegistry::list_factories_by_location const PortableGroup::Location &location  ACE_ENV_ARG_DECL  )  throw (CORBA::SystemException)
 

PortableGroup::FactoryInfos * TAO::PG_FactoryRegistry::list_factories_by_role const char *  role,
CORBA::String_out type_id  ACE_ENV_ARG_DECL
throw (CORBA::SystemException)
 

int TAO::PG_FactoryRegistry::parse_args int  argc,
ACE_TCHAR argv[]
 

Parse command line arguments.

Parameters:
argc traditional C argc
argv traditional C argv
Returns:
zero for success; nonzero is process return code for failure.

PortableGroup::FactoryRegistry_ptr TAO::PG_FactoryRegistry::reference  ) 
 

An object reference to the this object. Duplicated by the call so it may (and probably should) be assigned to a _var..

void TAO::PG_FactoryRegistry::register_factory const char *  role,
const char *  type_id,
const PortableGroup::FactoryInfo &factory_info  ACE_ENV_ARG_DECL
throw ( CORBA::SystemException , PortableGroup::MemberAlreadyPresent , PortableGroup::TypeConflict) [virtual]
 

void TAO::PG_FactoryRegistry::unregister_factory const char *  role,
const PortableGroup::Location &location  ACE_ENV_ARG_DECL
throw (CORBA::SystemException, PortableGroup::MemberNotFound) [virtual]
 

void TAO::PG_FactoryRegistry::unregister_factory_by_location const PortableGroup::Location &location  ACE_ENV_ARG_DECL  )  throw (CORBA::SystemException) [virtual]
 

void TAO::PG_FactoryRegistry::unregister_factory_by_role const char *role  ACE_ENV_ARG_DECL  )  throw (CORBA::SystemException) [virtual]
 

int TAO::PG_FactoryRegistry::write_ior_file const ACE_TCHAR outputFile,
const char *  ior
[private]
 

Write this factory's IOR to a file


Member Data Documentation

ACE_TString TAO::PG_FactoryRegistry::identity_ [private]
 

A human-readable string to distinguish this from other Notifiers.

TAO_SYNCH_MUTEX TAO::PG_FactoryRegistry::internals_ [private]
 

Protect internal state. Mutex should be locked by corba methods, or by external (public) methods before calling implementation methods. Implementation methods should assume the mutex is locked if necessary.

CORBA::String_var TAO::PG_FactoryRegistry::ior_ [private]
 

IOR of this object as assigned by poa.

const ACE_TCHAR* TAO::PG_FactoryRegistry::ior_output_file_ [private]
 

A file to which the factory's IOR should be written.

int TAO::PG_FactoryRegistry::linger_ [private]
 

CosNaming::NamingContext_var TAO::PG_FactoryRegistry::naming_context_ [private]
 

const ACE_TCHAR* TAO::PG_FactoryRegistry::ns_name_ [private]
 

A name to be used to register the factory with the name service.

PortableServer::ObjectId_var TAO::PG_FactoryRegistry::object_id_ [private]
 

The CORBA object id assigned to this object.

CORBA::ORB_var TAO::PG_FactoryRegistry::orb_ [private]
 

The orb

PortableServer::POA_var TAO::PG_FactoryRegistry::poa_ [private]
 

The POA used to activate this object.

int TAO::PG_FactoryRegistry::quit_on_idle_ [private]
 

Quit on idle flag.

enum { ... } TAO::PG_FactoryRegistry::quit_state_ [private]
 

State of the quit process

RegistryType TAO::PG_FactoryRegistry::registry_ [private]
 

CosNaming::Name TAO::PG_FactoryRegistry::this_name_ [private]
 

CORBA::Object_var TAO::PG_FactoryRegistry::this_obj_ [private]
 

This objects identity as a CORBA object.


The documentation for this class was generated from the following files:
Generated on Wed Nov 23 16:35:20 2005 for TAO_PortableGroup by  doxygen 1.4.5