Package org.spincast.plugins.undertow
Class SpincastResourceHandlerDefault
java.lang.Object
io.undertow.server.handlers.resource.ResourceHandler
org.spincast.plugins.undertow.SpincastResourceHandlerDefault
- All Implemented Interfaces:
io.undertow.server.HttpHandler,SpincastResourceHandler
public class SpincastResourceHandlerDefault
extends io.undertow.server.handlers.resource.ResourceHandler
implements SpincastResourceHandler
Spincast's custom ResourceHandler for Undertow.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.undertow.server.handlers.resource.ResourceHandler
io.undertow.server.handlers.resource.ResourceHandler.Builder -
Constructor Summary
ConstructorsConstructorDescriptionSpincastResourceHandlerDefault(io.undertow.server.handlers.resource.ResourceManager resourceManager, org.spincast.core.routing.StaticResource<?> staticResource, io.undertow.server.HttpHandler next, org.spincast.core.utils.SpincastUtils spincastUtils, org.spincast.core.config.SpincastConfig spincastConfig, org.spincast.plugins.routing.utils.SpincastRoutingUtils spincastRoutingUtils) SpincastResourceHandlerDefault(io.undertow.server.handlers.resource.ResourceManager resourceManager, org.spincast.core.routing.StaticResource<?> staticResource, org.spincast.core.utils.SpincastUtils spincastUtils, org.spincast.core.config.SpincastConfig spincastConfig, org.spincast.plugins.routing.utils.SpincastRoutingUtils spincastRoutingUtils) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCacheHeaders(io.undertow.server.HttpServerExchange exchange) Adds cache headers if required.protected voidaddContentTypeHeader(io.undertow.server.HttpServerExchange exchange) protected io.undertow.server.HttpHandlergetNext()protected org.spincast.core.config.SpincastConfigprotected org.spincast.plugins.routing.utils.SpincastRoutingUtilsprotected org.spincast.core.utils.SpincastUtilsprotected org.spincast.core.routing.StaticResource<?>voidhandleRequest(io.undertow.server.HttpServerExchange exchange) io.undertow.server.handlers.resource.ResourceHandlersetCacheTime(Integer cacheTime) Methods inherited from class io.undertow.server.handlers.resource.ResourceHandler
addWelcomeFiles, getAllowed, getCachable, getCacheTime, getContentEncodedResourceManager, getMimeMappings, getResourceManager, getResourceSupplier, isCanonicalizePaths, isDirectoryListingEnabled, setAllowed, setCachable, setCanonicalizePaths, setContentEncodedResourceManager, setDirectoryListingEnabled, setMimeMappings, setResourceManager, setResourceSupplier, setWelcomeFiles
-
Constructor Details
-
SpincastResourceHandlerDefault
public SpincastResourceHandlerDefault(io.undertow.server.handlers.resource.ResourceManager resourceManager, org.spincast.core.routing.StaticResource<?> staticResource, org.spincast.core.utils.SpincastUtils spincastUtils, org.spincast.core.config.SpincastConfig spincastConfig, org.spincast.plugins.routing.utils.SpincastRoutingUtils spincastRoutingUtils) -
SpincastResourceHandlerDefault
public SpincastResourceHandlerDefault(io.undertow.server.handlers.resource.ResourceManager resourceManager, org.spincast.core.routing.StaticResource<?> staticResource, io.undertow.server.HttpHandler next, org.spincast.core.utils.SpincastUtils spincastUtils, org.spincast.core.config.SpincastConfig spincastConfig, org.spincast.plugins.routing.utils.SpincastRoutingUtils spincastRoutingUtils)
-
-
Method Details
-
getNext
protected io.undertow.server.HttpHandler getNext() -
getSpincastUtils
protected org.spincast.core.utils.SpincastUtils getSpincastUtils() -
getSpincastConfig
protected org.spincast.core.config.SpincastConfig getSpincastConfig() -
getStaticResource
protected org.spincast.core.routing.StaticResource<?> getStaticResource() -
getSpincastRoutingUtils
protected org.spincast.plugins.routing.utils.SpincastRoutingUtils getSpincastRoutingUtils() -
setCacheTime
- Overrides:
setCacheTimein classio.undertow.server.handlers.resource.ResourceHandler
-
handleRequest
- Specified by:
handleRequestin interfaceio.undertow.server.HttpHandler- Overrides:
handleRequestin classio.undertow.server.handlers.resource.ResourceHandler- Throws:
Exception
-
addContentTypeHeader
protected void addContentTypeHeader(io.undertow.server.HttpServerExchange exchange) -
addCacheHeaders
protected void addCacheHeaders(io.undertow.server.HttpServerExchange exchange) Adds cache headers if required.
-