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

    Constructors
    Constructor
    Description
    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)
     
    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 Type
    Method
    Description
    protected void
    addCacheHeaders(io.undertow.server.HttpServerExchange exchange)
    Adds cache headers if required.
    protected void
    addContentTypeHeader(io.undertow.server.HttpServerExchange exchange)
     
    protected io.undertow.server.HttpHandler
     
    protected org.spincast.core.config.SpincastConfig
     
    protected org.spincast.plugins.routing.utils.SpincastRoutingUtils
     
    protected org.spincast.core.utils.SpincastUtils
     
    protected org.spincast.core.routing.StaticResource<?>
     
    void
    handleRequest(io.undertow.server.HttpServerExchange exchange)
     
    io.undertow.server.handlers.resource.ResourceHandler
    setCacheTime(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public io.undertow.server.handlers.resource.ResourceHandler setCacheTime(Integer cacheTime)
      Overrides:
      setCacheTime in class io.undertow.server.handlers.resource.ResourceHandler
    • handleRequest

      public void handleRequest(io.undertow.server.HttpServerExchange exchange) throws Exception
      Specified by:
      handleRequest in interface io.undertow.server.HttpHandler
      Overrides:
      handleRequest in class io.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.