Interface RangeAwareResource
- All Superinterfaces:
Resource
- All Known Implementing Classes:
CachedResource,FileResource,PathResource,URLResource
A resource implementation that
- Author:
- Stuart Douglas
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIt is possible that some resources managers may only support range requests on a subset of their resources,voidserveRangeAsync(io.undertow.httpcore.OutputChannel outputStream, HttpServerExchange exchange, long start, long end) Serve the resource, and call the provided callback when complete.voidserveRangeBlocking(OutputStream outputStream, HttpServerExchange exchange, long start, long end) Serve the resource, and call the provided callback when complete.Methods inherited from interface io.undertow.server.handlers.resource.Resource
getCacheKey, getContentLength, getContentType, getETag, getFile, getFilePath, getLastModified, getLastModifiedString, getName, getPath, getResourceManagerRoot, getResourceManagerRootPath, getUrl, isDirectory, list, serveAsync, serveBlocking
-
Method Details
-
serveRangeBlocking
void serveRangeBlocking(OutputStream outputStream, HttpServerExchange exchange, long start, long end) throws IOException Serve the resource, and call the provided callback when complete.- Parameters:
outputStream- The sender to use.exchange- The exchange- Throws:
IOException
-
serveRangeAsync
void serveRangeAsync(io.undertow.httpcore.OutputChannel outputStream, HttpServerExchange exchange, long start, long end) Serve the resource, and call the provided callback when complete.- Parameters:
outputStream- The sender to use.exchange- The exchange
-
isRangeSupported
boolean isRangeSupported()It is possible that some resources managers may only support range requests on a subset of their resources,- Returns:
trueif this resource supports range requests
-