## 类的使用
org.redkale.watch.WatchFactory

- 使用WatchFactory的程序包
  程序包 | 说明
  --- | ---
  org.redkale.boot | 提供RedKale服务器的启动、初始化和加载功能
  org.redkale.net | 网络TCP/UDP基础服务包
  org.redkale.net.http | HTTP协议包,提供HTTP协议服务器
  org.redkale.net.sncp | SNCP协议包,提供SNCP协议服务器
  org.redkale.watch | 提供RedKale服务的监控、动态部署、数据收集功能

- - ### org.redkale.boot中WatchFactory的使用

    返回WatchFactory的org.redkale.boot中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `WatchFactory` | Application.`getWatchFactory()`

  - ### org.redkale.net中WatchFactory的使用

    声明为WatchFactory的org.redkale.net中的字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected WatchFactory` | Context.`watch`
    `protected WatchFactory` | Server.`watch`
    `protected WatchFactory` | Transport.`watch`

    参数类型为WatchFactory的org.redkale.net中的构造器
    构造器和说明
    `Context(long serverStartTime, java.util.logging.Logger logger, java.util.concurrent.ExecutorService executor, int bufferCapacity, ObjectPool<java.nio.ByteBuffer> bufferPool, ObjectPool<Response> responsePool, int maxbody, java.nio.charset.Charset charset, java.net.InetSocketAddress address, PrepareServlet prepare, WatchFactory watch, int readTimeoutSecond, int writeTimeoutSecond)`
    `Server(long serverStartTime, java.lang.String protocol, PrepareServlet servlet, WatchFactory watch)`
    `Transport(java.lang.String name, java.lang.String protocol, WatchFactory watch, ObjectPool<java.nio.ByteBuffer> transportBufferPool, java.nio.channels.AsynchronousChannelGroup transportChannelGroup, java.net.InetSocketAddress clientAddress, java.util.Collection<java.net.InetSocketAddress> addresses)`
    `Transport(java.lang.String name, WatchFactory watch, ObjectPool<java.nio.ByteBuffer> transportBufferPool, java.nio.channels.AsynchronousChannelGroup transportChannelGroup, java.net.InetSocketAddress clientAddress, java.util.Collection<java.net.InetSocketAddress> addresses)`

  - ### org.redkale.net.http中WatchFactory的使用

    返回WatchFactory的org.redkale.net.http中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected WatchFactory` | HttpContext.`getWatchFactory()`

    参数类型为WatchFactory的org.redkale.net.http中的构造器
    构造器和说明
    `HttpContext(long serverStartTime, java.util.logging.Logger logger, java.util.concurrent.ExecutorService executor, int bufferCapacity, ObjectPool<java.nio.ByteBuffer> bufferPool, ObjectPool<Response> responsePool, int maxbody, java.nio.charset.Charset charset, java.net.InetSocketAddress address, PrepareServlet prepare, WatchFactory watch, int readTimeoutSecond, int writeTimeoutSecond)`
    `HttpServer(long serverStartTime, WatchFactory watch)`

  - ### org.redkale.net.sncp中WatchFactory的使用

    参数类型为WatchFactory的org.redkale.net.sncp中的构造器
    构造器和说明
    `SncpContext(long serverStartTime, java.util.logging.Logger logger, java.util.concurrent.ExecutorService executor, int bufferCapacity, ObjectPool<java.nio.ByteBuffer> bufferPool, ObjectPool<Response> responsePool, int maxbody, java.nio.charset.Charset charset, java.net.InetSocketAddress address, PrepareServlet prepare, WatchFactory watch, int readTimeoutSecond, int writeTimeoutSecond)`
    `SncpServer(long serverStartTime, WatchFactory watch)`

  - ### org.redkale.watch中WatchFactory的使用

    返回WatchFactory的org.redkale.watch中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `WatchFactory` | WatchFactory.`createChild()`
    `static WatchFactory` | WatchFactory.`root()`