KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nanocontainer > deployer > Deployer


1 package org.nanocontainer.deployer;
2
3 import org.apache.commons.vfs.FileObject;
4 import org.apache.commons.vfs.FileSystemException;
5 import org.picocontainer.defaults.ObjectReference;
6
7 /**
8  * A deployer provides a method of loading some sort of "archive" with a soft-configuration
9  * system. The archive can be compressed zips, remote urls, or standard file folders.
10  * <p>It uses Apache Commons VFS for a unified resource model, but the actual
11  * format of the 'archive' will depend on the implementation of the deployer.
12  * See {@link org.nanocontainer.deployer.NanoContainerDeployer} for the default file format used.</p>
13  * <p>Typically, the archive is deployed in its own unique VFS-based classloader to
14  * provide independence of these archives. For those following development
15  * of the PicoContainer world, a deployer can be considered a bit of a mini-microcontainer.</p>
16  * @author Aslak Helles&oslash;y
17  * @author Michael Rimov
18  * @version $Revision: 2947 $
19  */

20 public interface Deployer {
21
22
23     /**
24      * Deploys some sort of application folder. As far as NanoContainer deployment
25      * goes, there is a null assembly scope associated with this method.
26      * @param applicationFolder FileObject the base class of the 'archive'. By
27      * archive, the format depends on the deployer instance, and it may even
28      * apply to things such remote URLs. Must use Apache VFS
29      * @param parentClassLoader The parent classloader to attach this container to.
30      * @param parentContainerRef ObjectReference the parent container object reference.
31      * @return ObjectReference a new object reference that container the new
32      * container.
33      * @throws FileSystemException upon VFS-based errors.
34      * @throws ClassNotFoundException upon class instantiation error while running
35      * the composition script.
36      * @deprecated Since NanoContainer 1.2 (3/15/06). Use the version of this
37      * method with an assembly scope instead and pass in a null argument instead.
38      */

39     ObjectReference deploy(FileObject applicationFolder, ClassLoader JavaDoc parentClassLoader, ObjectReference parentContainerRef) throws FileSystemException, ClassNotFoundException JavaDoc;
40
41
42     /**
43      * Deploys some sort of application folder. As far as NanoContainer deployment
44      * goes, there is a null assembly scope associated with this method, and
45      * @param applicationFolder FileObject the base class of the 'archive'. By
46      * archive, the format depends on the deployer instance, and it may even
47      * apply to things such remote URLs. Must use Apache VFS
48      * @param parentClassLoader The parent classloader to attach this container to.
49      * @param parentContainerRef ObjectReference the parent container object reference.
50      * @param assemblyScope the assembly scope to use. This can be any object desired,
51      * (null is allowed) and when coupled with things like NanoWAR, it allows conditional assembly
52      * of different components in the script.
53      * @return ObjectReference a new object reference that container the new
54      * container.
55      * @throws FileSystemException upon VFS-based errors.
56      * @throws ClassNotFoundException upon class instantiation error while running
57      * the composition script.
58      */

59     ObjectReference deploy(FileObject applicationFolder, ClassLoader JavaDoc parentClassLoader, ObjectReference parentContainerRef, Object JavaDoc assemblyScope) throws FileSystemException, ClassNotFoundException JavaDoc;
60 }
61
Popular Tags