io.vertx.rxjava.ext.web.handler

## Class StaticHandler

- java.lang.Object
- - io.vertx.rxjava.ext.web.handler.StaticHandler

- All Implemented Interfaces:
    Handler<RoutingContext>

      public class StaticHandler
      extends Object
      implements Handler<RoutingContext>

  A handler for serving static resources from the file system or classpath.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StaticHandler(StaticHandler delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static StaticHandler` | `create()` Create a handler using defaults
    `static StaticHandler` | `create(String root)` Create a handler, specifying web-root
    `Object` | `getDelegate()`
    `void` | `handle(RoutingContext arg0)` Something has happened, so handle it.
    `static StaticHandler` | `newInstance(StaticHandler arg)`
    `StaticHandler` | `setAllowRootFileSystemAccess(boolean allowRootFileSystemAccess)` Enable/Disable access to the root of the filesystem
    `StaticHandler` | `setAlwaysAsyncFS(boolean alwaysAsyncFS)` Set whether async filesystem access should always be used
    `StaticHandler` | `setCacheEntryTimeout(long timeout)` Set the server cache entry timeout when caching is enabled
    `StaticHandler` | `setCachingEnabled(boolean enabled)` Set whether cache header handling is enabled
    `StaticHandler` | `setDirectoryListing(boolean directoryListing)` Set whether directory listing is enabled
    `StaticHandler` | `setDirectoryTemplate(String directoryTemplate)` Set the directory template to be used when directory listing
    `StaticHandler` | `setEnableFSTuning(boolean enableFSTuning)` Set whether async/sync filesystem tuning should enabled
    `StaticHandler` | `setEnableRangeSupport(boolean enableRangeSupport)` Set whether range requests (resumable downloads; media streaming) should be enabled.
    `StaticHandler` | `setFilesReadOnly(boolean readOnly)` Set whether files are read-only and will never change
    `StaticHandler` | `setIncludeHidden(boolean includeHidden)` Set whether hidden files should be served
    `StaticHandler` | `setIndexPage(String indexPage)` Set the index page
    `StaticHandler` | `setMaxAgeSeconds(long maxAgeSeconds)` Set value for max age in caching headers
    `StaticHandler` | `setMaxAvgServeTimeNs(long maxAvgServeTimeNanoSeconds)` Set the max serve time in ns, above which serves are considered slow
    `StaticHandler` | `setMaxCacheSize(int maxCacheSize)` Set the max cache size, when caching is enabled
    `StaticHandler` | `setWebRoot(String webRoot)` Set the web root

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StaticHandler

          public StaticHandler(StaticHandler delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

    - #### handle

          public void handle(RoutingContext arg0)

      Description copied from interface: `Handler`
      Something has happened, so handle it.
      Specified by:
        `handle` in interface `Handler<RoutingContext>`
      Parameters:
        `arg0` - the event to handle

    - #### create

          public static StaticHandler create()

      Create a handler using defaults
      Returns:
        the handler

    - #### create

          public static StaticHandler create(String root)

      Create a handler, specifying web-root
      Parameters:
        `root` - the web-root
      Returns:
        the handler

    - #### setAllowRootFileSystemAccess

          public StaticHandler setAllowRootFileSystemAccess(boolean allowRootFileSystemAccess)

      Enable/Disable access to the root of the filesystem
      Parameters:
        `allowRootFileSystemAccess` - whether root access is allowed
      Returns:
        a reference to this, so the API can be used fluently

    - #### setWebRoot

          public StaticHandler setWebRoot(String webRoot)

      Set the web root
      Parameters:
        `webRoot` - the web root
      Returns:
        a reference to this, so the API can be used fluently

    - #### setFilesReadOnly

          public StaticHandler setFilesReadOnly(boolean readOnly)

      Set whether files are read-only and will never change
      Parameters:
        `readOnly` - whether files are read-only
      Returns:
        a reference to this, so the API can be used fluently

    - #### setMaxAgeSeconds

          public StaticHandler setMaxAgeSeconds(long maxAgeSeconds)

      Set value for max age in caching headers
      Parameters:
        `maxAgeSeconds` - maximum time for browser to cache, in seconds
      Returns:
        a reference to this, so the API can be used fluently

    - #### setCachingEnabled

          public StaticHandler setCachingEnabled(boolean enabled)

      Set whether cache header handling is enabled
      Parameters:
        `enabled` - true if enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setDirectoryListing

          public StaticHandler setDirectoryListing(boolean directoryListing)

      Set whether directory listing is enabled
      Parameters:
        `directoryListing` - true if enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setIncludeHidden

          public StaticHandler setIncludeHidden(boolean includeHidden)

      Set whether hidden files should be served
      Parameters:
        `includeHidden` - true if hidden files should be served
      Returns:
        a reference to this, so the API can be used fluently

    - #### setCacheEntryTimeout

          public StaticHandler setCacheEntryTimeout(long timeout)

      Set the server cache entry timeout when caching is enabled
      Parameters:
        `timeout` - the timeout, in ms
      Returns:
        a reference to this, so the API can be used fluently

    - #### setIndexPage

          public StaticHandler setIndexPage(String indexPage)

      Set the index page
      Parameters:
        `indexPage` - the index page
      Returns:
        a reference to this, so the API can be used fluently

    - #### setMaxCacheSize

          public StaticHandler setMaxCacheSize(int maxCacheSize)

      Set the max cache size, when caching is enabled
      Parameters:
        `maxCacheSize` - the max cache size
      Returns:
        a reference to this, so the API can be used fluently

    - #### setAlwaysAsyncFS

          public StaticHandler setAlwaysAsyncFS(boolean alwaysAsyncFS)

      Set whether async filesystem access should always be used
      Parameters:
        `alwaysAsyncFS` - true for always async FS access
      Returns:
        a reference to this, so the API can be used fluently

    - #### setEnableFSTuning

          public StaticHandler setEnableFSTuning(boolean enableFSTuning)

      Set whether async/sync filesystem tuning should enabled
      Parameters:
        `enableFSTuning` - true to enabled FS tuning
      Returns:
        a reference to this, so the API can be used fluently

    - #### setMaxAvgServeTimeNs

          public StaticHandler setMaxAvgServeTimeNs(long maxAvgServeTimeNanoSeconds)

      Set the max serve time in ns, above which serves are considered slow
      Parameters:
        `maxAvgServeTimeNanoSeconds` - max serve time, in ns
      Returns:
        a reference to this, so the API can be used fluently

    - #### setDirectoryTemplate

          public StaticHandler setDirectoryTemplate(String directoryTemplate)

      Set the directory template to be used when directory listing
      Parameters:
        `directoryTemplate` - the directory template
      Returns:
        a reference to this, so the API can be used fluently

    - #### setEnableRangeSupport

          public StaticHandler setEnableRangeSupport(boolean enableRangeSupport)

      Set whether range requests (resumable downloads; media streaming) should be enabled.
      Parameters:
        `enableRangeSupport` - true to enable range support
      Returns:
        a reference to this, so the API can be used fluently

    - #### newInstance

          public static StaticHandler newInstance(StaticHandler arg)

Copyright © 2016. All rights reserved.