org.redkale.net.http

## 类 WebSocketServlet

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

-     public abstract class WebSocketServlet
      extends HttpServlet

  >      当WebSocketServlet接收一个TCP连接后，进行协议判断，如果成功就会创建一个WebSocket。

  >                                         WebSocketServlet
  >                                                 |
  >                                                 |
  >                                         WebSocketEngine
  >                                         /             \
  >                                      /                  \
  >                                   /                       \
  >                          WebSocketGroup1            WebSocketGroup2
  >                             /        \                /        \
  >                           /           \             /           \
  >                    WebSocket1     WebSocket2   WebSocket3    WebSocket4

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

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static int` | `DEFAILT_LIVEINTERVAL`
    `protected WebSocketEngine` | `engine`
    `protected java.util.logging.Logger` | `logger`
    `protected WebSocketNode` | `node`
    `static java.lang.String` | `WEBPARAM__LIVEINTERVAL`
    `protected boolean` | `wsbinary`

  - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 抽象方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected abstract WebSocket` | `createWebSocket()`
    `void` | `execute(HttpRequest request, HttpResponse response)`
    `java.lang.String` | `name()`
    `void` | `postDestroy(HttpContext context, AnyValue conf)`
    `void` | `preInit(HttpContext context, AnyValue conf)`

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

      `equals, hashCode`

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

      `destroy, init`

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

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

- - ### 字段详细资料

    - #### WEBPARAM__LIVEINTERVAL

          public static final java.lang.String WEBPARAM__LIVEINTERVAL

      另请参阅:
        常量字段值

    - #### DEFAILT_LIVEINTERVAL

          public static final int DEFAILT_LIVEINTERVAL

      另请参阅:
        常量字段值

    - #### logger

          protected final java.util.logging.Logger logger

    - #### wsbinary

          protected final boolean wsbinary

    - #### node

          protected WebSocketNode node

    - #### engine

          protected WebSocketEngine engine

  - ### 构造器详细资料

    - #### WebSocketServlet

          public WebSocketServlet()

  - ### 方法详细资料

    - #### preInit

          public final void preInit(HttpContext context,
                                    AnyValue conf)

    - #### postDestroy

          public final void postDestroy(HttpContext context,
                                        AnyValue conf)

    - #### name

          public java.lang.String name()

    - #### execute

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

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

    - #### createWebSocket

          protected abstract WebSocket createWebSocket()