2.20.6. ZooKeeper Watcher Interface

public interface Watcher {

    abstract public void process (WatchedEvent event);

    public interface Event {
        public enum EventType {
            None (-1),
            NodeCreated (1),
            NodeDeleted (2),
            NodeDataChanged (3),
            NodeChildrenChanged (4);

            ...
        }
    }
}


public class WatchedEvent {
    ...

    public KeeperState getState () { ... }
    public EventType getType () { ... }
    public String getPath () { ... }
}