org.apache.zookeeper
Class WatchedEvent

java.lang.Object
  extended by org.apache.zookeeper.WatchedEvent

public class WatchedEvent
extends Object

A WatchedEvent represents a change on the ZooKeeper that a Watcher is able to respond to. The WatchedEvent includes exactly what happened, the current state of the ZooKeeper, and the path of the znode that was involved in the event.


Constructor Summary
WatchedEvent(Watcher.Event.EventType eventType, Watcher.Event.KeeperState keeperState, String path)
          Create a WatchedEvent with specified type, state and path
WatchedEvent(WatcherEvent eventMessage)
          Convert a WatcherEvent sent over the wire into a full-fledged WatcherEvent
 
Method Summary
 String getPath()
           
 Watcher.Event.KeeperState getState()
           
 Watcher.Event.EventType getType()
           
 WatcherEvent getWrapper()
          Convert WatchedEvent to type that can be sent over network
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WatchedEvent

public WatchedEvent(Watcher.Event.EventType eventType,
                    Watcher.Event.KeeperState keeperState,
                    String path)
Create a WatchedEvent with specified type, state and path


WatchedEvent

public WatchedEvent(WatcherEvent eventMessage)
Convert a WatcherEvent sent over the wire into a full-fledged WatcherEvent

Method Detail

getState

public Watcher.Event.KeeperState getState()

getType

public Watcher.Event.EventType getType()

getPath

public String getPath()

toString

public String toString()
Overrides:
toString in class Object

getWrapper

public WatcherEvent getWrapper()
Convert WatchedEvent to type that can be sent over network



Copyright © 2011 The Apache Software Foundation