org.redkale.net.http

## 类 HttpServer

- java.lang.Object
- - org.redkale.net.Server<java.lang.String,HttpContext,HttpRequest,HttpResponse,HttpServlet>
  - - org.redkale.net.http.HttpServer

-     public final class HttpServer
      extends Server<java.lang.String,HttpContext,HttpRequest,HttpResponse,HttpServlet>

  详情见: https://redkale.org

- - ### 字段概要

    - ### 从类继承的字段 org.redkale.net.Server

      `address, backlog, bufferCapacity, bufferPoolSize, charset, config, context, executor, logger, maxbody, name, prepare, protocol, readTimeoutSecond, RESNAME_SERVER_ROOT, responsePoolSize, serverChannel, serverStartTime, threads, watch, writeTimeoutSecond`

  - ### 构造器概要

    构造器
    构造器和说明
    `HttpServer()`
    `HttpServer(long serverStartTime, WatchFactory watch)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `HttpServer` | `addHttpServlet(HttpServlet servlet, java.lang.String... mappings)`
    `void` | `addHttpServlet(HttpServlet servlet, java.lang.String prefix, AnyValue conf, java.lang.String... mappings)`
    `HttpServer` | `addHttpServlet(java.lang.String prefix, HttpServlet servlet, java.lang.String... mappings)`
    `<S extends Service,T extends RestHttpServlet> RestHttpServlet` | `addRestServlet(java.lang.String name, java.lang.Class<S> serviceType, S service, java.lang.Class<T> baseServletClass, java.lang.String prefix)`
    `<S extends Service,T extends RestHttpServlet> RestHttpServlet` | `addRestServlet(java.lang.String name, java.lang.Class<S> serviceType, S service, java.lang.Class<T> baseServletClass, java.lang.String prefix, AnyValue conf)`
    `protected HttpContext` | `createContext()`
    `void` | `init(AnyValue config)`

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

      `addServlet, createFormat, destroy, getContext, getLogger, getName, getPrepareServlet, getProtocol, getSocketAddress, loadLib, shutdown, start`

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

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

- - ### 构造器详细资料

    - #### HttpServer

          public HttpServer()

    - #### HttpServer

          public HttpServer(long serverStartTime,
                            WatchFactory watch)

  - ### 方法详细资料

    - #### init

          public void init(AnyValue config)
                    throws java.lang.Exception

      覆盖:
        `init` 在类中 `Server<java.lang.String,HttpContext,HttpRequest,HttpResponse,HttpServlet>`
      抛出:
        `java.lang.Exception`

    - #### addHttpServlet

          public HttpServer addHttpServlet(java.lang.String prefix,
                                           HttpServlet servlet,
                                           java.lang.String... mappings)

    - #### addHttpServlet

          public HttpServer addHttpServlet(HttpServlet servlet,
                                           java.lang.String... mappings)

    - #### addHttpServlet

          public void addHttpServlet(HttpServlet servlet,
                                     java.lang.String prefix,
                                     AnyValue conf,
                                     java.lang.String... mappings)

    - #### addRestServlet

          public <S extends Service,T extends RestHttpServlet> RestHttpServlet addRestServlet(java.lang.String name,
                                                                                              java.lang.Class<S> serviceType,
                                                                                              S service,
                                                                                              java.lang.Class<T> baseServletClass,
                                                                                              java.lang.String prefix)

    - #### addRestServlet

          public <S extends Service,T extends RestHttpServlet> RestHttpServlet addRestServlet(java.lang.String name,
                                                                                              java.lang.Class<S> serviceType,
                                                                                              S service,
                                                                                              java.lang.Class<T> baseServletClass,
                                                                                              java.lang.String prefix,
                                                                                              AnyValue conf)

    - #### createContext

          protected HttpContext createContext()

      指定者:
        `createContext` 在类中 `Server<java.lang.String,HttpContext,HttpRequest,HttpResponse,HttpServlet>`