Skip navigation.

CORBA Programming Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


Tobj::FactoryFinder::find_factories_by_id

Synopsis

Obtains a sequence of one or more factory object references.

C++ Mapping

Java Mapping

public org.omg.CORBA.Object[]
find_factories_by_id( java.lang.String factory_id)
throws
org.omg.CosLifeCycle.NoFactory,
com.beasys.Tobj.CannotProceed,
com.beasys.Tobj.RegistrarNotAvailable;

Parameter

factory_id

A NULL-terminated string that contains a value that is used to identify the registered factory object to be found.

The value of the factory_id parameter is used as the value of the id field of a NameComponent that has a kind field with the value "FactoryInterface" when comparing against registered references for factory objects.

Exceptions

CORBA::BAD_PARAM

Indicates that the value of an input parameter has an inappropriate value or is invalid. Of particular importance, the exception is raised if no value or a NULL value for the parameter factory_key is specified.

CosLifeCycle::NoFactory

Indicates that there are no factories registered that match the information in the factory_key parameter.

Indicates that the FactoryFinder or NameManager encountered an internal error while attempting to locate a reference for a factory object.

Error information is written to the user log.

Indicates that the FactoryFinder could not communicate with the NameManager.

Error information is written to the user log.

Description

The find_factories_by_id method is called by an application to obtain a sequence of one or more factory object references. The method is passed a NULL-terminated string that contains the identifier of the factory to be located. If more than one factory object is registered with the specified ID, the FactoryFinder will return a list of object references for the matching registered factory objects.

The find_factories_by_id method behaves the same as the find_factory operation that was passed a key that contains a single NameComponent with an id field that contains the same value as the factory_id parameter and a kind field that contains the value "FactoryInterface".

The registered identifier for a factory is considered equal to the value of the factory_id parameter if the result of constructing a CosLifeCycle::Key structure containing a single NameComponent that has the factory_id parameter as the value of the id field and the value "FactoryInterface" as the value of the kind field. The values must match exactly in all respects (case, location, etc.).

Return Values

An unbounded sequence of references to factory objects that match the information specified as the value of the factory_key parameter. In C++, the method returns a sequence of object references of type CosLifeCycle::Factory. In Java, the method returns an unbounded array of object references of type org.omg.CORBA.Object.

If the operation raises an exception, the return value is invalid and does not need to be released by the caller.

 

Skip navigation bar  Back to Top Previous Next