1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.ldap.server.jndi;
18
19
20 import javax.naming.spi.DirObjectFactory;
21
22
23 /***
24 * A specialized ObjectFactory that is optimized for our server-side JNDI
25 * provider. This factory reports the Class of objects that it is creates as
26 * well as the objectClass corresponding to that Class. This makes it easier
27 * for the server side provider to lookup the respective factory rather than
28 * attempt several others within the list of object factories in the order of
29 * greatest specificity. JNDI SPI methods are inefficient since they are
30 * designed to try all object factories to produce the object. Our provider
31 * looks up the most specific object factory based on this additional
32 * information. This makes a huge difference when the number of ObjectFactory
33 * instances is large.
34 * <p/>
35 * Eventually, it is highly feasible for generated schemas, to also include
36 * state and object factories for various objectClasses, or domain objects.
37 * This means the number of factories will increase. By associating object and
38 * state factories with their respective objectClasses and Classes we can
39 * integrate these DAOs into the schema subsystem making factory lookups
40 * extremely fast and efficient without costing the user too much to create and
41 * store objects within the directory. At the end of the day the directory
42 * becomes a hierarchical object store where lookup, bind and rebind are the
43 * only operations besides search to access and store objects. That's pretty
44 * PHAT!
45 *
46 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
47 * @version $Rev: 264732 $
48 */
49 public interface ServerDirObjectFactory extends DirObjectFactory
50 {
51 /***
52 * Gets either the OID for the objectClass or the human readable name for
53 * the objectClass this DirStateFactory is associated with. Note
54 * that associating this factory with an objectClass automatically
55 * associates this DirObjectFactory with all descendents of the objectClass.
56 *
57 * @return the OID or human readable name of the objectClass associated with this ObjectFactory
58 */
59 String getObjectClassId();
60
61 /***
62 * Gets the Class instance associated with this ObjectFactory. Objects to
63 * be created by this ObjectFactory will be of this type, a subclass of
64 * this type, or implement this type if it is an interface.
65 *
66 * @return the Class associated with this factory.
67 */
68 Class getAssociatedClass();
69 }