Class PathResourceManager
java.lang.Object
io.undertow.server.handlers.resource.PathResourceManager
- All Implemented Interfaces:
ResourceManager,Closeable,AutoCloseable
- Direct Known Subclasses:
FileResourceManager
Serves files from the file system.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic interface -
Field Summary
FieldsFields inherited from interface io.undertow.server.handlers.resource.ResourceManager
EMPTY_RESOURCE_MANAGER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPathResourceManager(long transferMinSize, boolean caseSensitive, boolean followLinks, boolean allowResourceChangeListeners, String... safePaths) protectedPathResourceManager(long transferMinSize, boolean caseSensitive, boolean followLinks, String... safePaths) PathResourceManager(Path base) PathResourceManager(Path base, long transferMinSize) PathResourceManager(Path base, long transferMinSize, boolean caseSensitive) PathResourceManager(Path base, long transferMinSize, boolean caseSensitive, boolean followLinks, boolean allowResourceChangeListeners, String... safePaths) PathResourceManager(Path base, long transferMinSize, boolean caseSensitive, boolean followLinks, String... safePaths) PathResourceManager(Path base, long transferMinSize, boolean followLinks, String... safePaths) -
Method Summary
Modifier and TypeMethodDescriptionstatic PathResourceManager.Builderbuilder()voidclose()protected PathResourcegetFileResource(Path file, String path, Path symlinkBase, String normalizedFile) Apply security check for case insensitive file systems.Returns a resource for the given path.long
-
Field Details
-
base
-
-
Constructor Details
-
PathResourceManager
-
PathResourceManager
-
PathResourceManager
-
PathResourceManager
-
PathResourceManager
protected PathResourceManager(long transferMinSize, boolean caseSensitive, boolean followLinks, String... safePaths) -
PathResourceManager
protected PathResourceManager(long transferMinSize, boolean caseSensitive, boolean followLinks, boolean allowResourceChangeListeners, String... safePaths) -
PathResourceManager
-
PathResourceManager
-
-
Method Details
-
getBasePath
-
setBase
-
setBase
-
getResource
Description copied from interface:ResourceManagerReturns a resource for the given path. It is the responsibility of the called to make sure that the path in Canonicalised.- Specified by:
getResourcein interfaceResourceManager- Parameters:
p- The path- Returns:
- The resource representing the path, or null if no resource was found.
-
getTransferMinSize
public long getTransferMinSize() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getFileResource
protected PathResource getFileResource(Path file, String path, Path symlinkBase, String normalizedFile) throws IOException Apply security check for case insensitive file systems.- Throws:
IOException
-
builder
-