The add/removeListener methods are on the ZooKeeperConnection class.