Class VirtualFileResource
- java.lang.Object
-
- org.wildfly.extension.undertow.deployment.VirtualFileResource
-
- All Implemented Interfaces:
io.undertow.server.handlers.resource.Resource
public class VirtualFileResource extends Object implements io.undertow.server.handlers.resource.Resource
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description VirtualFileResource(File resourceManagerRoot, org.jboss.vfs.VirtualFile file, String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCacheKey()
Long
getContentLength()
String
getContentType(io.undertow.util.MimeMappings mimeMappings)
io.undertow.util.ETag
getETag()
File
getFile()
Path
getFilePath()
Date
getLastModified()
String
getLastModifiedString()
String
getName()
String
getPath()
File
getResourceManagerRoot()
Path
getResourceManagerRootPath()
URL
getUrl()
boolean
isDirectory()
List<io.undertow.server.handlers.resource.Resource>
list()
void
serve(io.undertow.io.Sender sender, io.undertow.server.HttpServerExchange exchange, io.undertow.io.IoCallback callback)
-
-
-
Method Detail
-
getPath
public String getPath()
- Specified by:
getPath
in interfaceio.undertow.server.handlers.resource.Resource
-
getLastModified
public Date getLastModified()
- Specified by:
getLastModified
in interfaceio.undertow.server.handlers.resource.Resource
-
getLastModifiedString
public String getLastModifiedString()
- Specified by:
getLastModifiedString
in interfaceio.undertow.server.handlers.resource.Resource
-
getETag
public io.undertow.util.ETag getETag()
- Specified by:
getETag
in interfaceio.undertow.server.handlers.resource.Resource
-
getName
public String getName()
- Specified by:
getName
in interfaceio.undertow.server.handlers.resource.Resource
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectory
in interfaceio.undertow.server.handlers.resource.Resource
-
list
public List<io.undertow.server.handlers.resource.Resource> list()
- Specified by:
list
in interfaceio.undertow.server.handlers.resource.Resource
-
getContentType
public String getContentType(io.undertow.util.MimeMappings mimeMappings)
- Specified by:
getContentType
in interfaceio.undertow.server.handlers.resource.Resource
-
serve
public void serve(io.undertow.io.Sender sender, io.undertow.server.HttpServerExchange exchange, io.undertow.io.IoCallback callback)
- Specified by:
serve
in interfaceio.undertow.server.handlers.resource.Resource
-
getContentLength
public Long getContentLength()
- Specified by:
getContentLength
in interfaceio.undertow.server.handlers.resource.Resource
-
getCacheKey
public String getCacheKey()
- Specified by:
getCacheKey
in interfaceio.undertow.server.handlers.resource.Resource
-
getFile
public File getFile()
- Specified by:
getFile
in interfaceio.undertow.server.handlers.resource.Resource
-
getResourceManagerRoot
public File getResourceManagerRoot()
- Specified by:
getResourceManagerRoot
in interfaceio.undertow.server.handlers.resource.Resource
-
getUrl
public URL getUrl()
- Specified by:
getUrl
in interfaceio.undertow.server.handlers.resource.Resource
-
getResourceManagerRootPath
public Path getResourceManagerRootPath()
- Specified by:
getResourceManagerRootPath
in interfaceio.undertow.server.handlers.resource.Resource
-
getFilePath
public Path getFilePath()
- Specified by:
getFilePath
in interfaceio.undertow.server.handlers.resource.Resource
-
-