All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface java.naming.spi.ObjectFactory

public interface ObjectFactory
The JNDI framework allows for object implementations to be loaded in dynamically via "object factories." For example, when looking up a printer bound in the name space, if the print service binds printer names to References, the printer Reference could be used to create a printer object, so that the caller of lookup can directly operate on the printer object after the lookup. An ObjectFactory is responsible for creating objects of a specific type. In the above example, you may have a PrinterObjectFactory for creating Printer objects. Each object factory must export the ObjectFactory interface.


Method Index

 o getObjectInstance(Object, Properties)
Creates an object using the location or reference information specified.

Methods

 o getObjectInstance
 public abstract Object getObjectInstance(Object obj,
                                          Properties environment) throws Exception
Creates an object using the location or reference information specified. Special requirements of this object are supplied using 'environment'. An example of such an environment property is user identity information.

Parameters:
obj - The object containing location or reference information that can be used in creating an object.
environment - Environment properties that are used in creating the object.
Returns:
The object created.

All Packages  Class Hierarchy  This Package  Previous  Next  Index