public class ZookeeperGroupSupport extends org.apache.camel.support.ServiceSupport implements org.apache.camel.CamelContextAware, Callable<org.apache.curator.framework.CuratorFramework>, org.apache.curator.framework.state.ConnectionStateListener
Constructor and Description |
---|
ZookeeperGroupSupport() |
Modifier and Type | Method and Description |
---|---|
org.apache.curator.framework.CuratorFramework |
call() |
Group<CamelNodeState> |
createGroup(String path) |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
org.apache.curator.framework.CuratorFramework |
getCurator() |
int |
getMaximumConnectionTimeout() |
String |
getZooKeeperPassword() |
String |
getZooKeeperUrl() |
protected void |
registerAsListener() |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setCurator(org.apache.curator.framework.CuratorFramework curator)
To use a custom configured CuratorFramework as connection to zookeeper ensemble.
|
void |
setMaximumConnectionTimeout(int maximumConnectionTimeout)
Timeout in millis to use when connecting to the zookeeper ensemble
|
void |
setZooKeeperPassword(String zooKeeperPassword)
The password to use when connecting to the zookeeper ensemble
|
void |
setZooKeeperUrl(String zooKeeperUrl)
The url for the zookeeper ensemble
|
void |
stateChanged(org.apache.curator.framework.CuratorFramework client,
org.apache.curator.framework.state.ConnectionState newState) |
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.CamelContextAware
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext
in interface org.apache.camel.CamelContextAware
public org.apache.curator.framework.CuratorFramework getCurator()
public Group<CamelNodeState> createGroup(String path)
public void setCurator(org.apache.curator.framework.CuratorFramework curator)
public int getMaximumConnectionTimeout()
public void setMaximumConnectionTimeout(int maximumConnectionTimeout)
public String getZooKeeperUrl()
public void setZooKeeperUrl(String zooKeeperUrl)
public String getZooKeeperPassword()
public void setZooKeeperPassword(String zooKeeperPassword)
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.ServiceSupport
Exception
public org.apache.curator.framework.CuratorFramework call() throws Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.ServiceSupport
Exception
public void stateChanged(org.apache.curator.framework.CuratorFramework client, org.apache.curator.framework.state.ConnectionState newState)
stateChanged
in interface org.apache.curator.framework.state.ConnectionStateListener
protected void registerAsListener()
Apache Camel