ObjectFactory
Interface ObjectFactory
- All Known Subinterfaces:
- DirObjectFactory
public interface ObjectFactory
This interface represents a factory for creating an object.
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.
An object factory must implement the ObjectFactory
interface. In addition