public interface Resource
Modifier and Type | Method and Description |
---|---|
String | getCacheKey() |
Long | getContentLength() |
String | getContentType(MimeMappings mimeMappings) Return the resources content type. |
ETag | getETag() |
File | getFile() |
Path | getFilePath() |
Date | getLastModified() |
String | getLastModifiedString() |
String | getName() |
String | getPath() |
File | getResourceManagerRoot() Returns the resource manager root. |
Path | getResourceManagerRootPath() Returns the resource manager root. |
URL | getUrl() |
boolean | isDirectory() |
List<Resource> | list() |
void | serve(Sender sender, HttpServerExchange exchange, IoCallback completionCallback) Serve the resource, and call the provided callback when complete. |
String getPath()
Date getLastModified()
String getLastModifiedString()
ETag getETag()
String getName()
boolean isDirectory()
true
if this resource represents a directoryString getContentType(MimeMappings mimeMappings)
void serve(Sender sender, HttpServerExchange exchange, IoCallback completionCallback)
sender
- The sender to use.exchange
- The exchangeLong getContentLength()
String getCacheKey()
File getFile()
Path getFilePath()
File getResourceManagerRoot()
Path getResourceManagerRootPath()
URL getUrl()
Copyright © 2015 JBoss by Red Hat. All rights reserved.