Class VFSResourceLoader

java.lang.Object
org.jboss.modules.AbstractResourceLoader
org.jboss.as.server.deployment.module.VFSResourceLoader
All Implemented Interfaces:
AutoCloseable, org.jboss.modules.IterableResourceLoader, org.jboss.modules.ResourceLoader

public class VFSResourceLoader extends org.jboss.modules.AbstractResourceLoader implements org.jboss.modules.IterableResourceLoader
Resource loader capable of loading resources from VFS archives.
Author:
John Bailey, Thomas.Diesler@jboss.com
  • Constructor Details

    • VFSResourceLoader

      public VFSResourceLoader(String rootName, org.jboss.vfs.VirtualFile root) throws IOException
      Construct new instance.
      Parameters:
      rootName - The module root name
      root - The root virtual file
      Throws:
      IOException - if the manifest could not be read or the root URL is invalid
    • VFSResourceLoader

      public VFSResourceLoader(String rootName, org.jboss.vfs.VirtualFile root, boolean usePhysicalCodeSource) throws IOException
      Construct new instance.
      Parameters:
      rootName - The module root name
      root - The root virtual file
      usePhysicalCodeSource - true to use the physical root URL for code sources, false to use the VFS URL
      Throws:
      IOException - if the manifest could not be read or the root URL is invalid
  • Method Details

    • isMultiRelease

      public boolean isMultiRelease()
      Determine if this resource root is a multi-release root.
      Returns:
      true if it is a multi-release root, false otherwise
    • getClassSpec

      public org.jboss.modules.ClassSpec getClassSpec(String name) throws IOException
      Specified by:
      getClassSpec in interface org.jboss.modules.ResourceLoader
      Overrides:
      getClassSpec in class org.jboss.modules.AbstractResourceLoader
      Throws:
      IOException
    • getPackageSpec

      public org.jboss.modules.PackageSpec getPackageSpec(String name) throws IOException
      Specified by:
      getPackageSpec in interface org.jboss.modules.ResourceLoader
      Overrides:
      getPackageSpec in class org.jboss.modules.AbstractResourceLoader
      Throws:
      IOException
    • getLibrary

      public String getLibrary(String name)
      Specified by:
      getLibrary in interface org.jboss.modules.ResourceLoader
      Overrides:
      getLibrary in class org.jboss.modules.AbstractResourceLoader
    • getRootName

      public String getRootName()
      Specified by:
      getRootName in interface org.jboss.modules.ResourceLoader
      Overrides:
      getRootName in class org.jboss.modules.AbstractResourceLoader
    • getExportFilter

      public org.jboss.modules.filter.PathFilter getExportFilter()
    • getResource

      public org.jboss.modules.Resource getResource(String name)
      Specified by:
      getResource in interface org.jboss.modules.ResourceLoader
      Overrides:
      getResource in class org.jboss.modules.AbstractResourceLoader
    • getPaths

      public Collection<String> getPaths()
      Specified by:
      getPaths in interface org.jboss.modules.ResourceLoader
      Overrides:
      getPaths in class org.jboss.modules.AbstractResourceLoader
    • iterateResources

      public Iterator<org.jboss.modules.Resource> iterateResources(String startPath, boolean recursive)
      Specified by:
      iterateResources in interface org.jboss.modules.IterableResourceLoader