Class ServletResource
- java.lang.Object
-
- org.wildfly.extension.undertow.deployment.ServletResource
-
- All Implemented Interfaces:
io.undertow.server.handlers.resource.RangeAwareResource,io.undertow.server.handlers.resource.Resource
public class ServletResource extends Object implements io.undertow.server.handlers.resource.Resource, io.undertow.server.handlers.resource.RangeAwareResource
Resource implementation that wraps an underlying resource, and overrides the list() method to take overlays into account.- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description ServletResource(ServletResourceManager resourceManager, io.undertow.server.handlers.resource.Resource underlying)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCacheKey()LonggetContentLength()StringgetContentType(io.undertow.util.MimeMappings mimeMappings)io.undertow.util.ETaggetETag()FilegetFile()PathgetFilePath()DategetLastModified()StringgetLastModifiedString()StringgetName()StringgetPath()FilegetResourceManagerRoot()PathgetResourceManagerRootPath()URLgetUrl()booleanisDirectory()booleanisRangeSupported()List<io.undertow.server.handlers.resource.Resource>list()voidserve(io.undertow.io.Sender sender, io.undertow.server.HttpServerExchange exchange, io.undertow.io.IoCallback completionCallback)voidserveRange(io.undertow.io.Sender sender, io.undertow.server.HttpServerExchange exchange, long start, long end, io.undertow.io.IoCallback completionCallback)
-
-
-
Constructor Detail
-
ServletResource
public ServletResource(ServletResourceManager resourceManager, io.undertow.server.handlers.resource.Resource underlying)
-
-
Method Detail
-
getPath
public String getPath()
- Specified by:
getPathin interfaceio.undertow.server.handlers.resource.Resource
-
getLastModified
public Date getLastModified()
- Specified by:
getLastModifiedin interfaceio.undertow.server.handlers.resource.Resource
-
getLastModifiedString
public String getLastModifiedString()
- Specified by:
getLastModifiedStringin interfaceio.undertow.server.handlers.resource.Resource
-
getETag
public io.undertow.util.ETag getETag()
- Specified by:
getETagin interfaceio.undertow.server.handlers.resource.Resource
-
getName
public String getName()
- Specified by:
getNamein interfaceio.undertow.server.handlers.resource.Resource
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectoryin interfaceio.undertow.server.handlers.resource.Resource
-
list
public List<io.undertow.server.handlers.resource.Resource> list()
- Specified by:
listin interfaceio.undertow.server.handlers.resource.Resource
-
getContentType
public String getContentType(io.undertow.util.MimeMappings mimeMappings)
- Specified by:
getContentTypein interfaceio.undertow.server.handlers.resource.Resource
-
serve
public void serve(io.undertow.io.Sender sender, io.undertow.server.HttpServerExchange exchange, io.undertow.io.IoCallback completionCallback)- Specified by:
servein interfaceio.undertow.server.handlers.resource.Resource
-
getContentLength
public Long getContentLength()
- Specified by:
getContentLengthin interfaceio.undertow.server.handlers.resource.Resource
-
getCacheKey
public String getCacheKey()
- Specified by:
getCacheKeyin interfaceio.undertow.server.handlers.resource.Resource
-
getFile
public File getFile()
- Specified by:
getFilein interfaceio.undertow.server.handlers.resource.Resource
-
getResourceManagerRoot
public File getResourceManagerRoot()
- Specified by:
getResourceManagerRootin interfaceio.undertow.server.handlers.resource.Resource
-
getUrl
public URL getUrl()
- Specified by:
getUrlin interfaceio.undertow.server.handlers.resource.Resource
-
getResourceManagerRootPath
public Path getResourceManagerRootPath()
- Specified by:
getResourceManagerRootPathin interfaceio.undertow.server.handlers.resource.Resource
-
getFilePath
public Path getFilePath()
- Specified by:
getFilePathin interfaceio.undertow.server.handlers.resource.Resource
-
serveRange
public void serveRange(io.undertow.io.Sender sender, io.undertow.server.HttpServerExchange exchange, long start, long end, io.undertow.io.IoCallback completionCallback)- Specified by:
serveRangein interfaceio.undertow.server.handlers.resource.RangeAwareResource
-
isRangeSupported
public boolean isRangeSupported()
- Specified by:
isRangeSupportedin interfaceio.undertow.server.handlers.resource.RangeAwareResource
-
-