Class MountedPathResourceFactory
java.lang.Object
org.eclipse.jetty.util.resource.MountedPathResourceFactory
- All Implemented Interfaces:
ResourceFactory
A ResourceFactory for mounted FileSystems.
Example, for the "jar" scheme, this would use the JDK built-in ZipFileSystemProvider to load JAR files
as a FileSystem suitable for PathResource.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ResourceFactory
ResourceFactory.Closeable, ResourceFactory.LifeCycle -
Field Summary
Fields inherited from interface ResourceFactory
LOG -
Constructor Summary
ConstructorsConstructorDescriptionMountedPathResourceFactory(FileSystem fileSystem) Pre-initialize aMountedPathResourceFactorywith a known FileSystem that must always be used. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ResourceFactory
asResource, newClassLoaderResource, newClassLoaderResource, newClassPathResource, newJarFileResource, newMemoryResource, newResource, newResource, newResource, newResource, newSystemResource, split, split, split, split
-
Constructor Details
-
MountedPathResourceFactory
public MountedPathResourceFactory() -
MountedPathResourceFactory
Pre-initialize aMountedPathResourceFactorywith a known FileSystem that must always be used.- Parameters:
fileSystem- if not null, use the providedFileSystemwhen calls tonewResource(URI)is used. if null, then the JDKFileSystems.newFileSystem(URI, Map)API is used for allnewResource(URI)calls.
-
-
Method Details
-
newResource
Description copied from interface:ResourceFactoryConstruct a resource from a uri.- Specified by:
newResourcein interfaceResourceFactory- Parameters:
uri- A URI.- Returns:
- A Resource object.
-