When the zookeeper instance is constructed, it asynchronously establishes a connection. The Watcher that is passed in needs to process an event that the connection has been created before methods can use it (like the init() call immediately after the constructor is called).
When the zookeeper instance is constructed, it asynchronously establishes a connection. The Watcher that is passed in needs to process an event that the connection has been created before methods can use it (like the init() call immediately after the constructor is called).