@Override public void configure(BootstrapBinder binder) { binder.bind(String.class).annotatedWith(EurekaNamespace.class).toInstance("testnamespace."); } })
@Override public void configure(BootstrapBinder binder) { for (Module m : enableExtensions()) { binder.include(m); } } };
@Override public void configure(BootstrapBinder bootstrapBinder) { if (null != propertiesLoaderClass) { bootstrapBinder.bind(PropertiesLoader.class).to(propertiesLoaderClass).asEagerSingleton(); } else { bootstrapBinder.bind(PropertiesLoader.class).toInstance(propertiesLoader); } bootstrapBinder.bind(PropertiesInitializer.class).asEagerSingleton(); ArchaiusConfigurationProvider.Builder builder = ArchaiusConfigurationProvider.builder(); builder.withOwnershipPolicy(ConfigurationOwnershipPolicies.ownsAll()); bootstrapBinder.bindConfigurationProvider().toInstance(builder.build()); }
@Override public void configure(BootstrapBinder binder) { CompositeConfigurationProvider compositeConfigurationProvider = new CompositeConfigurationProvider(); for (Properties property : getConfigurations()) { compositeConfigurationProvider.add(new PropertiesConfigurationProvider(property)); } binder.bindConfigurationProvider().toInstance(compositeConfigurationProvider); } })
@Override public void configure(BootstrapBinder bootstrapBinder) { bootstrapBinder.inMode(LifecycleInjectorMode.SIMULATED_CHILD_INJECTORS); bootstrapBinder.include(new AbstractModule() { @Override protected void configure() { bindHealthCheck(bind(HealthCheckHandler.class)); bindHealthCheckInvocationStrategy(bind(HealthCheckInvocationStrategy.class)); } }); }
@Override public void configure(BootstrapBinder binder) { if (config.enableAutoBindSingleton() == false) binder.disableAutoBinding(); binder.inStage(config.stage()); binder.inMode(config.mode()); for (Class<? extends PostInjectorAction> action : config.actions()) { try { binder.bindPostInjectorAction().to(action); } catch (Exception e) { throw new ProvisionException("Error creating postInjectorAction '" + action.getName() + "'", e); } } for (Class<? extends ModuleTransformer> transformer : config.transformers()) { try { binder.bindModuleTransformer().to(transformer); } catch (Exception e) { throw new ProvisionException("Error creating postInjectorAction '" + transformer.getName() + "'", e); } } } }
@Override public void configure(BootstrapBinder binder) { binder.includeModules(modules); }
public Builder(final String name, final Logger logger) { this.lifecycleInjectorBuilder = LifecycleInjector.builder() .ignoringAllAutoBindClasses() .withBootstrapModule(bootstrapBinder -> { bootstrapBinder.disableAutoBinding(); bootstrapBinder.requireExactBindingAnnotations(); }); this.configModuleBuilder = new AutoBindConfigModule.Builder(name); this.serviceGraphModuleBuilder = new AutoBindServiceGraphModule.Builder(name, serviceGraph); setName(name); setLogger(logger); setServiceConfig(ConfigFactory.empty()); }
@Override public void configure(BootstrapBinder binder) { for (Module m : enableExtensions(serverType)) { binder.include(m); } } };
@Override public void configure(BootstrapBinder bootstrapBinder) { if (null != propertiesLoaderClass) { bootstrapBinder.bind(PropertiesLoader.class).to(propertiesLoaderClass).asEagerSingleton(); } else { bootstrapBinder.bind(PropertiesLoader.class).toInstance(propertiesLoader); } bootstrapBinder.bind(PropertiesInitializer.class).asEagerSingleton(); ArchaiusConfigurationProvider.Builder builder = ArchaiusConfigurationProvider.builder(); builder.withOwnershipPolicy(ConfigurationOwnershipPolicies.ownsAll()); bootstrapBinder.bindConfigurationProvider().toInstance(builder.build()); }
@Override public void configure(BootstrapBinder binder) { binder.bindConfigurationProvider().toInstance(new SystemConfigurationProvider()); } })
@Override public void configure(BootstrapBinder bootstrapBinder) { bootstrapBinder.inMode(LifecycleInjectorMode.SIMULATED_CHILD_INJECTORS); bootstrapBinder.include(new AbstractModule() { @Override protected void configure() { bindHealthCheck(bind(HealthCheckHandler.class)); bindHealthCheckInvocationStrategy(bind(HealthCheckInvocationStrategy.class)); } }); }
@Override public void configure(BootstrapBinder binder) { binder.includeModules(modules); }
protected void bindMetricsRegistry(BootstrapBinder bootstrapBinder) { bootstrapBinder.include(new AbstractModule() { @Override protected void configure() { MetricRegistry internalRegistry = new MetricRegistry(); final JmxReporter reporter = JmxReporter.forRegistry(internalRegistry).build(); reporter.start(); ExtendedRegistry registry = new ExtendedRegistry(new MetricsRegistry(Clock.SYSTEM, internalRegistry)); bind(ExtendedRegistry.class).toInstance(registry); } }); }
@Override public void configure(BootstrapBinder bootstrapBinder) { if (null != propertiesLoaderClass) { bootstrapBinder.bind(PropertiesLoader.class).to(propertiesLoaderClass).asEagerSingleton(); } else { bootstrapBinder.bind(PropertiesLoader.class).toInstance(propertiesLoader); } bootstrapBinder.bind(PropertiesInitializer.class).asEagerSingleton(); ArchaiusConfigurationProvider.Builder builder = ArchaiusConfigurationProvider.builder(); builder.withOwnershipPolicy(ConfigurationOwnershipPolicies.ownsAll()); bootstrapBinder.bindConfigurationProvider().toInstance(builder.build()); } });
@Override public void configure(BootstrapBinder binder) { binder.bindConfigurationProvider().toInstance(new SystemConfigurationProvider()); } })
@Override public void configure(final BootstrapBinder bootstrapBinder) { bootstrapBinder.bind(String.class).annotatedWith(Names.named("BootstrapModule")) .toInstance(this.getClass().getSimpleName()); } }
@Override public void configure(BootstrapBinder binder) { ServiceLoader<? extends Module> modules = ServiceLoader.load(type); binder.includeModules(Lists.newArrayList(modules.iterator())); } }
@Override public void configure(BootstrapBinder binder) { binder.include(moduleClass); }