TAO_PortableGroup  2.0.8
Public Member Functions
PortableGroup::FactoryRegistry Interface Reference

import "PortableGroup.idl";

List of all members.

Public Member Functions

void register_factory (in RoleName role, in _TypeId type_id, in FactoryInfo factory_info) raises (MemberAlreadyPresent, TypeConflict)
void unregister_factory (in RoleName role, in Location the_location) raises (MemberNotFound)
void unregister_factory_by_role (in RoleName role)
void unregister_factory_by_location (in Location the_location)
FactoryInfos list_factories_by_role (in RoleName role, out _TypeId type_id)
FactoryInfos list_factories_by_location (in Location the_location)

Detailed Description

Interface to allow generic factories for replicas to register themselves. Factories are distinguished by the role to be played by the created-object (role) and the location at which they create the object (FactoryInfo.the_location)

Because this is an extension to the FT CORBA specification applications that wish to adhere to the specification as written should use the type id as the role name when interacting with the FactoryRegistry.


Member Function Documentation

FactoryInfos PortableGroup::FactoryRegistry::list_factories_by_location ( in Location  the_location)

List all the factories that create a objects at a given location. If no factories are registered for this location, an empty list is returned. This is not an error.

Parameters:
the_locationwhere the factories create objects.
FactoryInfos PortableGroup::FactoryRegistry::list_factories_by_role ( in RoleName  role,
out _TypeId  type_id 
)

List all the factories that create objects that fill a given role If the role is unknown, an empty list is returned. This is not an error.

Parameters:
rolethe type of object the factories create.
type_idwhat type of object is created to fill this role.
void PortableGroup::FactoryRegistry::register_factory ( in RoleName  role,
in _TypeId  type_id,
in FactoryInfo  factory_info 
) raises (MemberAlreadyPresent, TypeConflict)

register a factory to create objects of the given type at the location given in the FactoryInfo.

Parameters:
rolethe role the object-to-be-created plays.
type_idtype id of the object-to-be-created.
factory_infoinformation about the factory including its location.
Exceptions:
MemberAlreadyPresentif there is already a factory for this type of object at this location.
TypeConflictif the specified type_id is different from the type_id previously registered for this role.
void PortableGroup::FactoryRegistry::unregister_factory ( in RoleName  role,
in Location  the_location 
) raises (MemberNotFound)

Remove the registration of a factory.

Parameters:
rolethe role played by the object formerly created by this factory.
the_locationwhere the factory formerly created objects.
Exceptions:
MemberNotFoundif no factory is available for the given role at this location.
void PortableGroup::FactoryRegistry::unregister_factory_by_location ( in Location  the_location)

Remove the registration of all factories that create objects at a particular location. If the location is unknown the registry is unchanged. This is not an error.

Parameters:
the_locationwhere the factories formerly created objects.
void PortableGroup::FactoryRegistry::unregister_factory_by_role ( in RoleName  role)

Remove the registration of all factories that create a particular type of object. If no factories exist for the given type, the registry is unchanged. This is not an error.

Parameters:
rolethe role played by the object formerly created by this factory.

The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines