Package com.netflix.governator.guice

Examples of com.netflix.governator.guice.BootstrapModule


    @Test
    @Ignore
    public void testStatus() throws Exception {
        Injector injector = LifecycleInjector.builder()
                .withMode(LifecycleInjectorMode.SIMULATED_CHILD_INJECTORS)
                .withBootstrapModule(new BootstrapModule() {
                    @Override
                    public void configure(BootstrapBinder binder) {
                        Properties props = new Properties();
                        props.put("eureka.status.interval", STATUS_REFRESH_RATE);
View Full Code Here


        final Properties props = new Properties();
        props.put("SuroServer.statusServerPort", Integer.toString(statusPort));
        props.put("SuroServer.port", Integer.toString(serverPort));

        Injector injector = LifecycleInjector.builder().withBootstrapModule(new BootstrapModule() {
            @Override
            public void configure(BootstrapBinder binder) {
                binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
            }
        }).withModules(
View Full Code Here

        testQueue(props);
    }

    private void testQueue(final Properties props) throws Exception {
        injector = LifecycleInjector.builder()
                .withBootstrapModule(new BootstrapModule() {
                    @Override
                    public void configure(BootstrapBinder binder) {
                        binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
                    }
                }).build().createInjector();
View Full Code Here

        props.put(ClientConfig.ASYNC_FILEQUEUE_PATH, filePath);
        props.put(ClientConfig.ASYNC_QUEUE_TYPE, "file");

        injector = LifecycleInjector.builder()
                .withBootstrapModule(new BootstrapModule() {
                    @Override
                    public void configure(BootstrapBinder binder) {
                        binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
                        binder.bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
                    }
View Full Code Here

        servers = TestConnectionPool.startServers(3);
    }

    private void setupMemory(final Properties props) throws Exception {
        injector = LifecycleInjector.builder()
                .withBootstrapModule(new BootstrapModule() {
                    @Override
                    public void configure(BootstrapBinder binder) {
                        binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
                        binder.bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
                    }
View Full Code Here

        props.put(ClientConfig.LB_SERVER, TestConnectionPool.createConnectionString(servers));
        props.put(ClientConfig.ASYNC_FILEQUEUE_PATH, tempDir.newFolder().getAbsolutePath());
        props.put(ClientConfig.ASYNC_QUEUE_TYPE, "file");

        injector = LifecycleInjector.builder()
                .withBootstrapModule(new BootstrapModule() {
                    @Override
                    public void configure(BootstrapBinder binder) {
                        binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
                        binder.bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
                    }
View Full Code Here

        props.setProperty(ClientConfig.RECONNECT_INTERVAL, "1");
        props.setProperty(ClientConfig.RECONNECT_TIME_INTERVAL, "1");
        props.setProperty(ClientConfig.APP, "app");

        injector = LifecycleInjector.builder()
                .withBootstrapModule(new BootstrapModule() {
                    @Override
                    public void configure(BootstrapBinder binder) {
                        binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
                        binder.bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
                    }
View Full Code Here

        props.setProperty(ClientConfig.RECONNECT_INTERVAL, "1");
        props.setProperty(ClientConfig.RECONNECT_TIME_INTERVAL, "1");
        props.setProperty(ClientConfig.APP, "app");

        injector = LifecycleInjector.builder()
                .withBootstrapModule(new BootstrapModule() {
                    @Override
                    public void configure(BootstrapBinder binder) {
                        binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(props));
                        binder.bind(ILoadBalancer.class).to(StaticLoadBalancer.class);
                    }
View Full Code Here

                        this.addSinkType("TestSink", TestMessageRouterSink.class);
                    }
                },
                new RoutingPlugin()
            )
            .withBootstrapModule(new BootstrapModule() {
                @Override
                public void configure(BootstrapBinder binder) {
                    binder.bindConfigurationProvider().toInstance(new PropertiesConfigurationProvider(properties));
                }
        }).build().createInjector();
View Full Code Here

    public static void create(AtomicReference<Injector> injector, final Properties properties, Module... modules) throws Exception {
        // Create the injector
        injector.set(LifecycleInjector.builder()
                .withBootstrapModule(
                        new BootstrapModule() {
                            @Override
                            public void configure(BootstrapBinder binder) {
                                binder.bindConfigurationProvider().toInstance(
                                        new PropertiesConfigurationProvider(properties));
                            }
View Full Code Here

TOP

Related Classes of com.netflix.governator.guice.BootstrapModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.