Search in sources :

Example 1 with HoneycombConfiguration

use of com.nearinfinity.honeycomb.config.HoneycombConfiguration in project honeycomb by altamiracorp.

the class StoreFactoryTest method createFactory.

private StoreFactory createFactory() {
    HoneycombConfiguration configurationHolder = new HoneycombConfiguration(adapterConfigs, "hbase");
    Map<AdapterType, Provider<Store>> map = Maps.newHashMap();
    map.put(AdapterType.HBASE, storeProvider);
    when(storeProvider.get()).thenReturn(store);
    return new StoreFactory(map, configurationHolder);
}
Also used : HoneycombConfiguration(com.nearinfinity.honeycomb.config.HoneycombConfiguration) AdapterType(com.nearinfinity.honeycomb.config.AdapterType) Provider(com.google.inject.Provider)

Example 2 with HoneycombConfiguration

use of com.nearinfinity.honeycomb.config.HoneycombConfiguration in project honeycomb by altamiracorp.

the class Bootstrap method startup.

/**
     * The initial function called by JNI to wire-up the required object graph dependencies
     *
     * @param configFilename The path to the configuration file, not null or empty
     * @param configSchema  The path to the schema used to validate the configuration file, not null or empty
     * @return {@link HandlerProxyFactory} with all dependencies setup
     */
public static HandlerProxyFactory startup(String configFilename, String configSchema) {
    Verify.isNotNullOrEmpty(configFilename);
    Verify.isNotNullOrEmpty(configSchema);
    ensureLoggingPathsCorrect();
    HoneycombConfiguration configuration = ConfigurationParser.parseConfiguration(configFilename, configSchema);
    Bootstrap bootstrap = new Bootstrap(configuration);
    Injector injector = Guice.createInjector(bootstrap);
    return injector.getInstance(HandlerProxyFactory.class);
}
Also used : HoneycombConfiguration(com.nearinfinity.honeycomb.config.HoneycombConfiguration) Injector(com.google.inject.Injector)

Aggregations

HoneycombConfiguration (com.nearinfinity.honeycomb.config.HoneycombConfiguration)2 Injector (com.google.inject.Injector)1 Provider (com.google.inject.Provider)1 AdapterType (com.nearinfinity.honeycomb.config.AdapterType)1