org.redkale.net

## 类 PrepareServlet<K extends java.io.Serializable,C extends Context,R extends Request<C>,P extends Response<C,R>,S extends Servlet<C,R,P>>

- java.lang.Object
- - org.redkale.net.Servlet<C,R,P>
  - - org.redkale.net.PrepareServlet<K,C,R,P,S>

- 类型参数:
    `K` - SessionID的类型
    `C` - Context的子类型
    `R` - Request的子类型
    `P` - Response的子类型
    `S` - Servlet的子类型
  直接已知子类:
    HttpPrepareServlet, SncpPrepareServlet

      public abstract class PrepareServlet<K extends java.io.Serializable,C extends Context,R extends Request<C>,P extends Response<C,R>,S extends Servlet<C,R,P>>
      extends Servlet<C,R,P>

  详情见: https://redkale.org

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected java.util.concurrent.atomic.AtomicLong` | `executeCounter`
    `protected java.util.concurrent.atomic.AtomicLong` | `illRequestCounter`
    `protected java.util.Map<K,S>` | `mappings`
    `protected java.util.Set<S>` | `servlets`

  - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 抽象方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `abstract void` | `addServlet(S servlet, java.lang.Object attachment, AnyValue conf, K... mappings)`
    `protected AnyValue` | `getServletConf(Servlet servlet)`
    `java.util.Set<S>` | `getServlets()`
    `void` | `prepare(java.nio.ByteBuffer buffer, R request, P response)`
    `protected void` | `setServletConf(Servlet servlet, AnyValue conf)`

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

      `destroy, execute, init`

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

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

- - ### 字段详细资料

    - #### executeCounter

          protected final java.util.concurrent.atomic.AtomicLong executeCounter

    - #### illRequestCounter

          protected final java.util.concurrent.atomic.AtomicLong illRequestCounter

    - #### servlets

          protected final java.util.Set<S extends Servlet<C,R,P>> servlets

    - #### mappings

          protected final java.util.Map<K extends java.io.Serializable,S extends Servlet<C,R,P>> mappings

  - ### 构造器详细资料

    - #### PrepareServlet

          public PrepareServlet()

  - ### 方法详细资料

    - #### addServlet

          public abstract void addServlet(S servlet,
                                          java.lang.Object attachment,
                                          AnyValue conf,
                                          K... mappings)

    - #### prepare

          public final void prepare(java.nio.ByteBuffer buffer,
                                    R request,
                                    P response)
                             throws java.io.IOException

      抛出:
        `java.io.IOException`

    - #### getServletConf

          protected AnyValue getServletConf(Servlet servlet)

    - #### setServletConf

          protected void setServletConf(Servlet servlet,
                                        AnyValue conf)

    - #### getServlets

          public java.util.Set<S> getServlets()