org.apache.camel.component.zookeeper
Class ConnectionHolder

java.lang.Object
  extended by org.apache.camel.component.zookeeper.ConnectionHolder
All Implemented Interfaces:
org.apache.zookeeper.Watcher

public class ConnectionHolder
extends Object
implements org.apache.zookeeper.Watcher

ConnectionHolder watches for Connection based events from ZooKeeper and can be used to block until a connection has been established.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher
org.apache.zookeeper.Watcher.Event
 
Constructor Summary
ConnectionHolder(ZooKeeperConfiguration configuration)
           
 
Method Summary
 void awaitConnection()
           
 void closeConnection()
           
 org.apache.zookeeper.ZooKeeper getZooKeeper()
           
 boolean isConnected()
           
 void process(org.apache.zookeeper.WatchedEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionHolder

public ConnectionHolder(ZooKeeperConfiguration configuration)
Method Detail

getZooKeeper

public org.apache.zookeeper.ZooKeeper getZooKeeper()

isConnected

public boolean isConnected()

awaitConnection

public void awaitConnection()

process

public void process(org.apache.zookeeper.WatchedEvent event)
Specified by:
process in interface org.apache.zookeeper.Watcher

closeConnection

public void closeConnection()


Apache Camel