Class ZookeeperGroupSupport

  • All Implemented Interfaces:
    AutoCloseable, Callable<org.apache.curator.framework.CuratorFramework>, org.apache.camel.CamelContextAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService, org.apache.curator.framework.state.ConnectionStateListener
    Direct Known Subclasses:
    ZookeeperGroupListenerSupport

    public class ZookeeperGroupSupport
    extends org.apache.camel.support.service.ServiceSupport
    implements org.apache.camel.CamelContextAware, Callable<org.apache.curator.framework.CuratorFramework>, org.apache.curator.framework.state.ConnectionStateListener
    • Constructor Detail

      • ZookeeperGroupSupport

        public ZookeeperGroupSupport()
    • Method Detail

      • getCamelContext

        public org.apache.camel.CamelContext getCamelContext()
        Specified by:
        getCamelContext in interface org.apache.camel.CamelContextAware
      • setCamelContext

        public void setCamelContext​(org.apache.camel.CamelContext camelContext)
        Specified by:
        setCamelContext in interface org.apache.camel.CamelContextAware
      • getCurator

        public org.apache.curator.framework.CuratorFramework getCurator()
      • setCurator

        public void setCurator​(org.apache.curator.framework.CuratorFramework curator)
        To use a custom configured CuratorFramework as connection to zookeeper ensemble.
      • getMaximumConnectionTimeout

        public int getMaximumConnectionTimeout()
      • setMaximumConnectionTimeout

        public void setMaximumConnectionTimeout​(int maximumConnectionTimeout)
        Timeout in millis to use when connecting to the zookeeper ensemble
      • getZooKeeperUrl

        public String getZooKeeperUrl()
      • setZooKeeperUrl

        public void setZooKeeperUrl​(String zooKeeperUrl)
        The url for the zookeeper ensemble
      • getZooKeeperPassword

        public String getZooKeeperPassword()
      • setZooKeeperPassword

        public void setZooKeeperPassword​(String zooKeeperPassword)
        The password to use when connecting to the zookeeper ensemble
      • setManagedGroupFactory

        public void setManagedGroupFactory​(ManagedGroupFactory managedGroupFactory)
      • setManagedGroupFactoryStrategy

        public void setManagedGroupFactoryStrategy​(ManagedGroupFactoryStrategy managedGroupFactoryStrategy)
      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.apache.camel.support.service.BaseService
        Throws:
        Exception
      • call

        public org.apache.curator.framework.CuratorFramework call()
                                                           throws Exception
        Specified by:
        call in interface Callable<org.apache.curator.framework.CuratorFramework>
        Throws:
        Exception
      • doStop

        protected void doStop()
                       throws Exception
        Overrides:
        doStop in class org.apache.camel.support.service.BaseService
        Throws:
        Exception
      • stateChanged

        public void stateChanged​(org.apache.curator.framework.CuratorFramework client,
                                 org.apache.curator.framework.state.ConnectionState newState)
        Specified by:
        stateChanged in interface org.apache.curator.framework.state.ConnectionStateListener
      • registerAsListener

        protected void registerAsListener()