org.jboss.classloading.spi.vfs.dependency
Class VFSClassLoaderPolicyModule

java.lang.Object
  extended by org.jboss.classloading.spi.helpers.NameAndVersionSupport
      extended by org.jboss.classloading.spi.dependency.Module
          extended by org.jboss.classloading.spi.dependency.helpers.ClassLoadingMetaDataModule
              extended by org.jboss.classloading.spi.dependency.policy.ClassLoaderPolicyModule
                  extended by org.jboss.classloading.spi.vfs.dependency.VFSClassLoaderPolicyModule
All Implemented Interfaces:
Serializable, Cloneable, org.jboss.kernel.spi.dependency.KernelControllerContextAware

public class VFSClassLoaderPolicyModule
extends ClassLoaderPolicyModule
implements org.jboss.kernel.spi.dependency.KernelControllerContextAware

VFSClassLoaderPolicyModule.

Version:
$Revision: 1.1 $
Author:
Adrian Brock
See Also:
Serialized Form

Constructor Summary
VFSClassLoaderPolicyModule(VFSClassLoaderFactory classLoadingMetaData, String contextName)
          Create a new VFSClassLoaderPolicyModule.
 
Method Summary
protected  List<Capability> determineCapabilities()
          Determine the capabilities
protected  VFSClassLoaderPolicy determinePolicy()
          Determine the classloader policy
protected  org.jboss.virtual.VirtualFile[] determineVFSRoots()
          Get the virtual file roots
protected  VFSClassLoaderFactory getClassLoadingMetaData()
          Get the classloading metadata
 VFSClassLoaderPolicy getPolicy()
          Get the policy
 List<String> getRoots()
          Get the roots.
protected  org.jboss.virtual.VirtualFile getVirtualFile(URI uri)
          Get virtual file for uri.
 void reset()
          Reset the module
 void setKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext context)
           
 void setRoots(List<String> roots)
          Set the roots.
 void unsetKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext context)
           
 void visit(ResourceVisitor visitor, ResourceFilter filter, ResourceFilter recurseFilter, URL... urls)
          Visit the resources in this module using the given filter(s)

Typically the filter is used to determine which types of files to visit, e.g.

 
Methods inherited from class org.jboss.classloading.spi.dependency.policy.ClassLoaderPolicyModule
createLazyDelegateLoader, getClassLoader, getClassLoaderForClass, getDelegateLoader, registerClassLoaderPolicy, registerClassLoaderPolicy, registerClassLoaderPolicy, removeClassLoader
 
Methods inherited from class org.jboss.classloading.spi.dependency.helpers.ClassLoadingMetaDataModule
determineRequirements, getDomainName, getExcluded, getExcludedExport, getExportAll, getIncluded, getParentDomainName, isBlackListable, isCacheable, isImportAll, isJ2seClassLoadingCompliance
 
Methods inherited from class org.jboss.classloading.spi.dependency.Module
addDelegates, addIDependOn, createDependencies, defaultCapabilities, determinePackageNames, equals, getCapabilities, getClassLoaderState, getContextName, getControllerContext, getDelegates, getDeterminedDomainName, getDeterminedParentDomainName, getDeterminedParentPolicy, getDynamicClassRoot, getModuleForClass, getPackageNames, getRequirementDependencyItems, getRequirements, getResource, getResources, isValid, loadClass, registerModuleClassLoader, release, removeDependencies, removeIDependOn, resolveModule, setControllerContext, unregisterModuleClassLoader, visit, visit
 
Methods inherited from class org.jboss.classloading.spi.helpers.NameAndVersionSupport
clone, getName, getTheVersion, getVersion, hashCode, setName, setTheVersion, setVersion, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VFSClassLoaderPolicyModule

public VFSClassLoaderPolicyModule(VFSClassLoaderFactory classLoadingMetaData,
                                  String contextName)
Create a new VFSClassLoaderPolicyModule.

Parameters:
classLoadingMetaData - the classloading metadata
contextName - the context name
Method Detail

getRoots

public List<String> getRoots()
Get the roots.

Returns:
the roots.

setRoots

public void setRoots(List<String> roots)
Set the roots.

Parameters:
roots - the roots.

determineCapabilities

protected List<Capability> determineCapabilities()
Description copied from class: Module
Determine the capabilities

Overrides:
determineCapabilities in class ClassLoadingMetaDataModule
Returns:
the capabilities

setKernelControllerContext

public void setKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext context)
                                throws Exception
Specified by:
setKernelControllerContext in interface org.jboss.kernel.spi.dependency.KernelControllerContextAware
Throws:
Exception

unsetKernelControllerContext

public void unsetKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext context)
                                  throws Exception
Specified by:
unsetKernelControllerContext in interface org.jboss.kernel.spi.dependency.KernelControllerContextAware
Throws:
Exception

getClassLoadingMetaData

protected VFSClassLoaderFactory getClassLoadingMetaData()
Description copied from class: ClassLoadingMetaDataModule
Get the classloading metadata

Overrides:
getClassLoadingMetaData in class ClassLoadingMetaDataModule
Returns:
the metadata

determineVFSRoots

protected org.jboss.virtual.VirtualFile[] determineVFSRoots()
Get the virtual file roots

Returns:
the roots

getVirtualFile

protected org.jboss.virtual.VirtualFile getVirtualFile(URI uri)
                                                throws Exception
Get virtual file for uri.

Parameters:
uri - the uri
Returns:
virtual file for uri
Throws:
Exception - for any error

getPolicy

public VFSClassLoaderPolicy getPolicy()
Description copied from class: ClassLoaderPolicyModule
Get the policy

Overrides:
getPolicy in class ClassLoaderPolicyModule
Returns:
the policy

determinePolicy

protected VFSClassLoaderPolicy determinePolicy()
Description copied from class: ClassLoaderPolicyModule
Determine the classloader policy

Specified by:
determinePolicy in class ClassLoaderPolicyModule
Returns:
the policy

reset

public void reset()
Description copied from class: Module
Reset the module

Overrides:
reset in class ClassLoaderPolicyModule

visit

public void visit(ResourceVisitor visitor,
                  ResourceFilter filter,
                  ResourceFilter recurseFilter,
                  URL... urls)
Description copied from class: Module
Visit the resources in this module using the given filter(s)

Typically the filter is used to determine which types of files to visit, e.g. .class files. While the recurseFilter determines which jars/directories to recurse into.

Overrides:
visit in class Module
Parameters:
visitor - the visitor
filter - the filter
recurseFilter - the recursion filter (null means recurse into everything)
urls - the urls we should visit


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.