Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » embedded » [javadoc | source]
org.jboss.embedded
public class: DeploymentGroup [javadoc | source]
java.lang.Object
   org.jboss.embedded.DeploymentGroup

Direct Known Subclasses:
    DeploymentScanner

comment
Field Summary
protected  MainDeployer mainDeployer     
protected  Kernel kernel     
Method from org.jboss.embedded.DeploymentGroup Summary:
add,   add,   addBaseResource,   addClasspath,   addClasspath,   addDirectory,   addDirectoryByResource,   addFileByResource,   addMultipleResources,   addResource,   addResourceBase,   addResourceBase,   addResourceBases,   addUrls,   addVirtualFiles,   getClassPaths,   getClassPaths,   getDeployerDirUrls,   getDeployerDirUrlsFromResource,   getDeploymentUnits,   getDeployments,   getDirFromResource,   getVirtualFile,   process,   setClassLoader,   setFilter,   setKernel,   setMainDeployer,   undeploy
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.embedded.DeploymentGroup Detail:
 public  void add(VirtualFile vf) throws DeploymentException 
    Schedule a VirtualFile to be deployed
 public  void add(URL url) throws DeploymentException 
    schedules a URL to be deployed
 protected  void addBaseResource(URL url,
    String baseResource) throws DeploymentException 
 public  void addClasspath() throws DeploymentException 
    Scan all paths/jars in Java CLasspath (found with java.class.path System Property) schedule these jars to be deployed
 public  void addClasspath(String paths) throws DeploymentException 
    Scan Java Classpath (found with java.class.path) for a specified list of files you want to deploy The files listed should be only the filename. Do not put relative or absolute paths in filenames. i.e. "myejbs.jar, my-beans.xml"
 public  void addDirectory(URL directory,
    boolean recurse) throws DeploymentException, IOException 
 public  void addDirectoryByResource(String resource,
    boolean recurse) throws DeploymentException, IOException 
    Searches for a directory as described in the getDirFromResource() method of this class. schedules all possible files in directory to be deployed
 public  void addFileByResource(String resource) throws DeploymentException, IOException 
    Searches for a file based on the location of an existing classloader resource as described in the getDirFromResource() method of this class. schedules this particular file for deployment
 public  void addMultipleResources(String resource) throws DeploymentException, IOException 
    Search for resources using the group's configured classloader if no classloader, then Thread.currentThread().getContextClassLoader() is used. classLoader.getResources(String resource) Schedule the resource to be deployed.
 public  void addResource(String resource) throws DeploymentException, NullPointerException 
    Search for the resource using the group's configured classloader if no classloader, then Thread.currentThread().getContextClassLoader() is used. classLoader.getResource(String resource) Schedule the resource to be deployed.
 public  void addResourceBase(String baseResource) throws DeploymentException 
    Deploy the classpath directory or .jar file a classloader resource is located in. i.e. classpath is "/home/wburke/lib/tutorial.jar" tutorial.jar has "META-INF/persistence.xml" resource within it. addResourceBase("META-INF/persistence.xml") will try and deploy tutorial.jar
 public  void addResourceBase(Class baseResource) throws DeploymentException 
    Find the .class file resource of provided class Return a URL pointing to the classpath the resource is located in. i.e. classpath is "/home/wburke/lib/tutorial.jar" tutorial.jar has "META-INF/persistence.xml" resource within it. addResourceBase("META-INF/persistence.xml") will try and deploy tutorial.jar
 public  void addResourceBases(String baseResource) throws DeploymentException 
    Deploy the classpath directories or .jar files a classloader resource is located in. ClassLoader.getResources() is used to find the base resources. i.e. classpath is "/home/wburke/lib/tutorial.jar:/home/wburke/lib/pu.jar" tutorial.jar and pu.jar has "META-INF/persistence.xml" resource within it. addResourceBases("META-INF/persistence.xml") will try and deploy tutorial.jar and pu.jar because the both have the META-INF/persistence.xml resource within them.
 public  void addUrls(List urls) throws DeploymentException 
    schedules a list of urls to be deployed
 public  void addVirtualFiles(List vfs) throws DeploymentException 
    schedules a list of virtual files to be deployed
 public static List getClassPaths() throws DeploymentException 
 public static List getClassPaths(String paths) throws DeploymentException 
 public static List getDeployerDirUrls(VirtualFileFilter filter,
    URL url,
    boolean recurse) throws DeploymentException, IOException 
 public static List getDeployerDirUrlsFromResource(VirtualFileFilter filter,
    ClassLoader loader,
    String resource,
    boolean recurse) throws DeploymentException, IOException 
 public List getDeploymentUnits() 
    Get the deployment units
 public List getDeployments() 
 public static URL getDirFromResource(ClassLoader loader,
    String resource) 
    Find the directory that contains a given resource.

    The '.' character can be used to specify the current directory. The '..' string can be used to specify a higher relative path

    i.e.

    getDirFromResource(loader, "org/jboss/Test.class") file://org/jboss/

    getDirFromResource(loader, "org/jboss/Test.class/..") file://org/

    getDirFromResource(loader, "org/jboss/Test.class/../acme") file://org/acme/

    getDirFromResource(loader, "org/jboss/Test.class/./embedded") file://org/jboss/embedded/

 public static VirtualFile getVirtualFile(URL url) throws DeploymentException 
 public  void process() throws DeploymentException 
    Ask the mainDeployer to process the set of files you added to the group this will also check the processing
 public  void setClassLoader(ClassLoader classLoader) 
 public  void setFilter(VirtualFileFilter filter) 
    File filter that will be used when scanning a directory
 public  void setKernel(Kernel kernel) 
 public  void setMainDeployer(MainDeployer mainDeployer) 
 public  void undeploy() throws DeploymentException 
    Ask the mainDeployer to undeploy the set of files in the group