org.redkale.net.http

## 类 HttpResourceServlet

- java.lang.Object
- - org.redkale.net.Servlet<HttpContext,HttpRequest,HttpResponse>
  - - org.redkale.net.http.HttpServlet
    - - org.redkale.net.http.HttpResourceServlet

-     public final class HttpResourceServlet
      extends HttpServlet

  详情见: http://www.redkale.org

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `protected class` | `HttpResourceServlet.WatchThread`

  - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected java.util.concurrent.atomic.LongAdder` | `cachedLength`
    `protected long` | `cachelengthmax`
    `protected long` | `cachelimit`
    `protected java.util.concurrent.ConcurrentHashMap<java.lang.String,org.redkale.net.http.HttpResourceServlet.FileEntry>` | `files`
    `protected java.util.concurrent.ConcurrentHashMap<java.nio.file.WatchKey,java.nio.file.Path>` | `keymaps`
    `protected java.util.AbstractMap.SimpleEntry<java.util.regex.Pattern,java.lang.String>[]` | `locationRewrites`
    `protected java.util.function.Predicate<java.lang.String>` | `ranges`
    `protected java.io.File` | `root`
    `protected HttpResourceServlet.WatchThread` | `watchThread`

  - ### 构造器概要

    构造器
    构造器和说明
    `HttpResourceServlet()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `destroy(HttpContext context, AnyValue config)`
    `void` | `execute(HttpRequest request, HttpResponse response)`
    `void` | `init(HttpContext context, AnyValue config)`

    - ### 从类继承的方法 org.redkale.net.http.HttpServlet

      `equals, hashCode`

    - ### 从类继承的方法 java.lang.Object

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

- - ### 字段详细资料

    - #### cachelimit

          protected long cachelimit

    - #### cachedLength

          protected final java.util.concurrent.atomic.LongAdder cachedLength

    - #### cachelengthmax

          protected long cachelengthmax

    - #### root

          protected java.io.File root

    - #### files

          protected final java.util.concurrent.ConcurrentHashMap<java.lang.String,org.redkale.net.http.HttpResourceServlet.FileEntry> files

    - #### keymaps

          protected final java.util.concurrent.ConcurrentHashMap<java.nio.file.WatchKey,java.nio.file.Path> keymaps

    - #### locationRewrites

          protected java.util.AbstractMap.SimpleEntry<java.util.regex.Pattern,java.lang.String>[] locationRewrites

    - #### watchThread

          protected HttpResourceServlet.WatchThread watchThread

    - #### ranges

          protected java.util.function.Predicate<java.lang.String> ranges

  - ### 构造器详细资料

    - #### HttpResourceServlet

          public HttpResourceServlet()

  - ### 方法详细资料

    - #### init

          public void init(HttpContext context,
                           AnyValue config)

      覆盖:
        `init` 在类中 `Servlet<HttpContext,HttpRequest,HttpResponse>`

    - #### destroy

          public void destroy(HttpContext context,
                              AnyValue config)

      覆盖:
        `destroy` 在类中 `Servlet<HttpContext,HttpRequest,HttpResponse>`

    - #### execute

          public void execute(HttpRequest request,
                              HttpResponse response)
                       throws java.io.IOException

      指定者:
        `execute` 在类中 `Servlet<HttpContext,HttpRequest,HttpResponse>`
      抛出:
        `java.io.IOException`