public class ResourceHandler extends Object implements HttpHandler
Modifier and Type | Class and Description |
---|---|
static class |
ResourceHandler.Builder |
Constructor and Description |
---|
ResourceHandler()
Deprecated.
|
ResourceHandler(ResourceManager resourceSupplier) |
ResourceHandler(ResourceManager resourceManager,
HttpHandler next) |
ResourceHandler(ResourceSupplier resourceSupplier) |
ResourceHandler(ResourceSupplier resourceManager,
HttpHandler next) |
public ResourceHandler(ResourceManager resourceSupplier)
public ResourceHandler(ResourceManager resourceManager, HttpHandler next)
public ResourceHandler(ResourceSupplier resourceSupplier)
public ResourceHandler(ResourceSupplier resourceManager, HttpHandler next)
@Deprecated public ResourceHandler()
ResourceHandler(ResourceManager)
instead.public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public boolean isDirectoryListingEnabled()
public ResourceHandler setDirectoryListingEnabled(boolean directoryListingEnabled)
public ResourceHandler addWelcomeFiles(String... files)
public ResourceHandler setWelcomeFiles(String... files)
public MimeMappings getMimeMappings()
public ResourceHandler setMimeMappings(MimeMappings mimeMappings)
public Predicate getCachable()
public ResourceHandler setCachable(Predicate cachable)
public Predicate getAllowed()
public ResourceHandler setAllowed(Predicate allowed)
public ResourceSupplier getResourceSupplier()
public ResourceHandler setResourceSupplier(ResourceSupplier resourceSupplier)
public ResourceManager getResourceManager()
public ResourceHandler setResourceManager(ResourceManager resourceManager)
public Integer getCacheTime()
public ResourceHandler setCacheTime(Integer cacheTime)
public ContentEncodedResourceManager getContentEncodedResourceManager()
public ResourceHandler setContentEncodedResourceManager(ContentEncodedResourceManager contentEncodedResourceManager)
public boolean isCanonicalizePaths()
public void setCanonicalizePaths(boolean canonicalizePaths)
CanonicalPathHandler
is not installed in
the handler chain then is may be possible to perform a directory traversal attack. If you set this to false make
sure you have some kind of check in place to control the path.canonicalizePaths
- If paths should be canonicalizedCopyright © 2019 JBoss by Red Hat. All rights reserved.