1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.ldap.server.schema.bootstrap;
18
19
20 import javax.naming.NamingException;
21
22
23 /***
24 * A schema object producer which uses a callback to announce object creation
25 * rather than completely returning objects in bulk. This way registries can
26 * be populated while the producer is doing is creating schema objects.
27 *
28 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
29 * @version $Rev: 264732 $
30 */
31 public interface BootstrapProducer
32 {
33 /***
34 * Gets the type of producer this is.
35 *
36 * @return the type of the BootstrapProducer as a enum
37 */
38 ProducerTypeEnum getType();
39
40 /***
41 * Produces schema objects announcing each one after creation via the
42 * callback before continuing on to create more objects.
43 *
44 * @param registries the registry set used by this producer
45 * @param cb the producer's callback
46 * @throws NamingException callbacks often operate upon registries and can
47 * throw these exceptions so we must throw this as well since
48 * implementations will have to call the callback methods
49 */
50 void produce( BootstrapRegistries registries, ProducerCallback cb )
51 throws NamingException;
52 }