org.apache.directory.server.core.jndi
Interface ServerDirObjectFactory

All Superinterfaces:
javax.naming.spi.DirObjectFactory, javax.naming.spi.ObjectFactory

public interface ServerDirObjectFactory
extends javax.naming.spi.DirObjectFactory

A specialized ObjectFactory that is optimized for our server-side JNDI provider. This factory reports the Class of objects that it is creates as well as the objectClass corresponding to that Class. This makes it easier for the server side provider to lookup the respective factory rather than attempt several others within the list of object factories in the order of greatest specificity. JNDI SPI methods are inefficient since they are designed to try all object factories to produce the object. Our provider looks up the most specific object factory based on this additional information. This makes a huge difference when the number of ObjectFactory instances is large.

Eventually, it is highly feasible for generated schemas, to also include state and object factories for various objectClasses, or domain objects. This means the number of factories will increase. By associating object and state factories with their respective objectClasses and Classes we can integrate these DAOs into the schema subsystem making factory lookups extremely fast and efficient without costing the user too much to create and store objects within the directory. At the end of the day the directory becomes a hierarchical object store where lookup, bind and rebind are the only operations besides search to access and store objects. That's pretty PHAT!

Version:
$Rev: 434579 $
Author:
Apache Directory Project

Method Summary
 java.lang.Class getAssociatedClass()
          Gets the Class instance associated with this ObjectFactory.
 java.lang.String getObjectClassId()
          Gets either the OID for the objectClass or the human readable name for the objectClass this DirStateFactory is associated with.
 
Methods inherited from interface javax.naming.spi.DirObjectFactory
getObjectInstance
 
Methods inherited from interface javax.naming.spi.ObjectFactory
getObjectInstance
 

Method Detail

getObjectClassId

java.lang.String getObjectClassId()
Gets either the OID for the objectClass or the human readable name for the objectClass this DirStateFactory is associated with. Note that associating this factory with an objectClass automatically associates this DirObjectFactory with all descendents of the objectClass.

Returns:
the OID or human readable name of the objectClass associated with this ObjectFactory

getAssociatedClass

java.lang.Class getAssociatedClass()
Gets the Class instance associated with this ObjectFactory. Objects to be created by this ObjectFactory will be of this type, a subclass of this type, or implement this type if it is an interface.

Returns:
the Class associated with this factory.


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.