KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nanocontainer > integrationkit > ContainerBuilder


1 /*****************************************************************************
2  * Copyright (C) NanoContainer Organization. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  * *
8  *****************************************************************************/

9 package org.nanocontainer.integrationkit;
10
11 import org.picocontainer.defaults.ObjectReference;
12
13 /**
14  * The responsibility of a ContainerBuilder is to <em>instantiate</em> and <em>compose</em> containers.
15  * (Composition means assembly (registration) and configuration (setting primitive parameters) of
16  * components).
17  *
18  * @author <a HREF="mailto:joe@thoughtworks.net">Joe Walnes</a>
19  */

20 public interface ContainerBuilder {
21
22     /**
23      * Create, assemble, init and start a new PicoContainer and store it
24      * at a given reference.
25      *
26      * @param containerRef Where to store the new container.
27      * @param parentContainerRef reference to a container that may be used as a parent to the new container (may be null).
28      * @param compositionScope Hint about the scope for composition.
29      */

30     void buildContainer(ObjectReference containerRef, ObjectReference parentContainerRef, Object JavaDoc compositionScope, boolean addChildToParent);
31
32     /**
33      * Locate a container at the given reference so it can be stopped,
34      * destroyed and removed.
35      *
36      * @param containerRef Where the container is stored.
37      */

38     void killContainer(ObjectReference containerRef);
39
40 }
41
42
Popular Tags