T - type of config object to provide.public class JsonConfigProvider<T> extends Object implements com.google.inject.Provider<com.google.common.base.Supplier<T>>
<T> from Properties bound in guice.
 JsonConfigProvider.bind(binder, "druid.server", DruidServerConfig.class);
druid.server should be a key found in the Properties bound elsewhere.
 The value of that key should directly relate to the fields in DruidServerConfig.class.
 <T> is defined by the value of the property propertyBase.
 This value is a json structure, decoded via JsonConfigurator.configurate(Properties, String, Class).
 
   public class DruidServerConfig
   {| Constructor and Description | 
|---|
JsonConfigProvider(String propertyBase,
                  Class<T> classToProvide)  | 
| Modifier and Type | Method and Description | 
|---|---|
static <T> void | 
bind(com.google.inject.Binder binder,
    String propertyBase,
    Class<T> classToProvide)  | 
static <T> void | 
bind(com.google.inject.Binder binder,
    String propertyBase,
    Class<T> classToProvide,
    Annotation annotation)  | 
static <T> void | 
bind(com.google.inject.Binder binder,
    String propertyBase,
    Class<T> classToProvide,
    Class<? extends Annotation> annotation)  | 
static <T> void | 
bind(com.google.inject.Binder binder,
    String propertyBase,
    Class<T> clazz,
    com.google.inject.Key<T> instanceKey,
    com.google.inject.Key<com.google.common.base.Supplier<T>> supplierKey)  | 
static <T> void | 
bindInstance(com.google.inject.Binder binder,
            com.google.inject.Key<T> bindKey,
            T instance)  | 
com.google.common.base.Supplier<T> | 
get()  | 
void | 
inject(Properties props,
      JsonConfigurator configurator)  | 
static <T> JsonConfigProvider<T> | 
of(String propertyBase,
  Class<T> classToProvide)  | 
public static <T> void bind(com.google.inject.Binder binder,
                            String propertyBase,
                            Class<T> classToProvide)
public static <T> void bind(com.google.inject.Binder binder,
                            String propertyBase,
                            Class<T> classToProvide,
                            Annotation annotation)
public static <T> void bind(com.google.inject.Binder binder,
                            String propertyBase,
                            Class<T> classToProvide,
                            Class<? extends Annotation> annotation)
public static <T> void bind(com.google.inject.Binder binder,
                            String propertyBase,
                            Class<T> clazz,
                            com.google.inject.Key<T> instanceKey,
                            com.google.inject.Key<com.google.common.base.Supplier<T>> supplierKey)
public static <T> void bindInstance(com.google.inject.Binder binder,
                                    com.google.inject.Key<T> bindKey,
                                    T instance)
public static <T> JsonConfigProvider<T> of(String propertyBase, Class<T> classToProvide)
@Inject public void inject(Properties props, JsonConfigurator configurator)
Copyright © 2011–2018. All rights reserved.