客户端注册 Watcher 实现

  • (1) 调用getData()/getChildren()/exist()三个 API,传入 Watcher 对象
  • (2) 标记请求 request,封装 Watcher 到 WatchRegistration
  • (3) 封装成 Packet 对象,发服务端发送 request
  • (4) 收到服务端响应后,将 Watcher 注册到 ZKWatcherManager 中进行管理
  • (5) 请求返回,完成注册。