Class CuratorBundle<C extends io.dropwizard.Configuration & CuratorConfigured>

  • Type Parameters:
    C - configuration class type
    All Implemented Interfaces:
    io.dropwizard.ConfiguredBundle<C>

    public class CuratorBundle<C extends io.dropwizard.Configuration & CuratorConfigured>
    extends Object
    implements io.dropwizard.ConfiguredBundle<C>
    A Dropwizard bundle that creates a CuratorFramework instance, wrapped in a Dropwizard Managed instance.

    Starts the CuratorFramework immediately, i.e. does not wait for Dropwizard to do it. Also, adds a health check (CuratorHealthCheck).

    • Constructor Detail

      • CuratorBundle

        public CuratorBundle()
    • Method Detail

      • run

        public void run​(C configuration,
                        io.dropwizard.setup.Environment environment)
        Specified by:
        run in interface io.dropwizard.ConfiguredBundle<C extends io.dropwizard.Configuration & CuratorConfigured>
      • getClient

        public org.apache.curator.framework.CuratorFramework getClient()
        Once the bundle has been run, this will return the CuratorFramework.
        Returns:
        the CuratorFramework if run has been called, otherwise null