Interface ConfigAwareProvider<T,​C extends io.dropwizard.Configuration>

  • Type Parameters:
    T - provided object type
    C - configuration type
    All Known Implementing Classes:
    SimpleDbiProvider
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ConfigAwareProvider<T,​C extends io.dropwizard.Configuration>
    Helper for implementing lazy initialization. Useful in initialization part where bundles are configured. For example, to construct some dropwizard integration object and use it in guice integrations later.
    Since:
    05.12.2016
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T get​(C configuration, io.dropwizard.setup.Environment environment)
      Called to provide required object.
    • Method Detail

      • get

        T get​(C configuration,
              io.dropwizard.setup.Environment environment)
        Called to provide required object.
        Parameters:
        configuration - configuration instance
        environment - environment instance
        Returns:
        object instance