org.nanocontainer.deployer
Interface Deployer

All Known Implementing Classes:
NanoContainerDeployer

public interface Deployer

A deployer provides a method of loading some sort of "archive" with a soft-configuration system. The archive can be compressed zips, remote urls, or standard file folders.

It uses Apache Commons VFS for a unified resource model, but the actual format of the 'archive' will depend on the implementation of the deployer. See NanoContainerDeployer for the default file format used.

Typically, the archive is deployed in its own unique VFS-based classloader to provide independence of these archives. For those following development of the PicoContainer world, a deployer can be considered a bit of a mini-microcontainer.

Version:
$Revision: 2947 $
Author:
Aslak Hellesøy, Michael Rimov

Method Summary
 org.picocontainer.defaults.ObjectReference deploy(org.apache.commons.vfs.FileObject applicationFolder, java.lang.ClassLoader parentClassLoader, org.picocontainer.defaults.ObjectReference parentContainerRef)
          Deprecated. Since NanoContainer 1.2 (3/15/06). Use the version of this method with an assembly scope instead and pass in a null argument instead.
 org.picocontainer.defaults.ObjectReference deploy(org.apache.commons.vfs.FileObject applicationFolder, java.lang.ClassLoader parentClassLoader, org.picocontainer.defaults.ObjectReference parentContainerRef, java.lang.Object assemblyScope)
          Deploys some sort of application folder.
 

Method Detail

deploy

org.picocontainer.defaults.ObjectReference deploy(org.apache.commons.vfs.FileObject applicationFolder,
                                                  java.lang.ClassLoader parentClassLoader,
                                                  org.picocontainer.defaults.ObjectReference parentContainerRef)
                                                  throws org.apache.commons.vfs.FileSystemException,
                                                         java.lang.ClassNotFoundException
Deprecated. Since NanoContainer 1.2 (3/15/06). Use the version of this method with an assembly scope instead and pass in a null argument instead.

Deploys some sort of application folder. As far as NanoContainer deployment goes, there is a null assembly scope associated with this method.

Parameters:
applicationFolder - FileObject the base class of the 'archive'. By archive, the format depends on the deployer instance, and it may even apply to things such remote URLs. Must use Apache VFS
parentClassLoader - The parent classloader to attach this container to.
parentContainerRef - ObjectReference the parent container object reference.
Returns:
ObjectReference a new object reference that container the new container.
Throws:
org.apache.commons.vfs.FileSystemException - upon VFS-based errors.
java.lang.ClassNotFoundException - upon class instantiation error while running the composition script.

deploy

org.picocontainer.defaults.ObjectReference deploy(org.apache.commons.vfs.FileObject applicationFolder,
                                                  java.lang.ClassLoader parentClassLoader,
                                                  org.picocontainer.defaults.ObjectReference parentContainerRef,
                                                  java.lang.Object assemblyScope)
                                                  throws org.apache.commons.vfs.FileSystemException,
                                                         java.lang.ClassNotFoundException
Deploys some sort of application folder. As far as NanoContainer deployment goes, there is a null assembly scope associated with this method, and

Parameters:
applicationFolder - FileObject the base class of the 'archive'. By archive, the format depends on the deployer instance, and it may even apply to things such remote URLs. Must use Apache VFS
parentClassLoader - The parent classloader to attach this container to.
parentContainerRef - ObjectReference the parent container object reference.
assemblyScope - the assembly scope to use. This can be any object desired, (null is allowed) and when coupled with things like NanoWAR, it allows conditional assembly of different components in the script.
Returns:
ObjectReference a new object reference that container the new container.
Throws:
org.apache.commons.vfs.FileSystemException - upon VFS-based errors.
java.lang.ClassNotFoundException - upon class instantiation error while running the composition script.


Copyright © 2003-2010 Codehaus. All Rights Reserved.