Package com.netflix.governator.guice

Examples of com.netflix.governator.guice.BootstrapModule


        Injector injector = LifecycleInjector
            .builder()
            .usingBasePackages("custom_autobind")
            .withBootstrapModule
                (
                    new BootstrapModule()
                    {
                        @Override
                        public void configure(BootstrapBinder binder)
                        {
                            // bind an AutoBindProvider for @ExampleAutoBind annotated fields/arguments
View Full Code Here


        Injector    injector = LifecycleInjector
            .builder()
            .usingBasePackages("validation")
            .withBootstrapModule
                (
                    new BootstrapModule()
                    {
                        @Override
                        public void configure(BootstrapBinder binder)
                        {
                            binder.bindConfigurationProvider().to(SystemConfigurationProvider.class);
View Full Code Here

        // Always get the Guice injector from Governator
        Injector    injector = LifecycleInjector
            .builder()
            .withBootstrapModule
            (
                new BootstrapModule()
                {
                    @Override
                    public void configure(BootstrapBinder binder)
                    {
                        // bind the configuration provider
View Full Code Here

            .builder()
            .usingBasePackages("autobind")
            .ignoringAutoBindClasses(ignore)    // tell Governator's CLASSPATH scanner to ignore listed classes
            .withBootstrapModule
            (
                new BootstrapModule()
                {
                    @Override
                    public void configure(BootstrapBinder binder)
                    {
                        // bind an AutoBindProvider for @AutoBind annotated fields/arguments
View Full Code Here

    @Test(dataProvider = "builders")
    public void confirmBindingSingletonOrder(LifecycleInjectorBuilder lifecycleInjectorBuilder) throws Exception
    {
        final List<Integer> actual = Lists.newArrayList();
        final List<Module> modules = Lists.<Module>newArrayList(new ModuleA1(), new ModuleA2(), new ModuleA3(), new ModuleA4());
        BootstrapModule bootstrap = new BootstrapModule()
        {
            @Override
            public void configure(BootstrapBinder binder)
            {
                binder.bind(LIST_TYPE_LITERAL).toInstance(actual);
View Full Code Here

    @Test(dataProvider = "builders")
    public void confirmBindingReverseSingletonOrder(LifecycleInjectorBuilder lifecycleInjectorBuilder) throws Exception
    {
        final List<Integer> actual = Lists.newArrayList();
        final List<Module> modules = Lists.<Module>newArrayList(new ModuleA1(), new ModuleA2(), new ModuleA3(), new ModuleA4());
        BootstrapModule bootstrap = new BootstrapModule()
        {
            @Override
            public void configure(BootstrapBinder binder)
            {
                binder.bind(LIST_TYPE_LITERAL).toInstance(actual);
View Full Code Here

   
    @Test(dataProvider = "builders")
    public void confirmMultiWithModuleClasses(LifecycleInjectorBuilder lifecycleInjectorBuilder)
    {
        final List<Integer> actual = Lists.newArrayList();
        BootstrapModule bootstrap = new BootstrapModule()
        {
            @Override
            public void configure(BootstrapBinder binder)
            {
                binder.bind(LIST_TYPE_LITERAL).toInstance(actual);
View Full Code Here

                return null;
            }
        };
        Injector injector = lifecycleInjectorBuilder.withBootstrapModule
            (
                new BootstrapModule()
                {
                    @Override
                    public void configure(BootstrapBinder binder)
                    {
                        binder.bindResourceLocator().toInstance(resourceLocator);
View Full Code Here

                return nextInChain.locate(resource, nextInChain);
            }
        };
        Injector injector = lifecycleInjectorBuilder.withBootstrapModule
            (
                new BootstrapModule()
                {
                    @Override
                    public void configure(BootstrapBinder binder)
                    {
                        binder.bindResourceLocator().toInstance(resourceLocator1);
View Full Code Here

    public void     testInjectedLifecycleListener(LifecycleInjectorBuilder lifecycleInjectorBuilder) throws Exception
    {
        Injector injector = lifecycleInjectorBuilder
            .withBootstrapModule
            (
                new BootstrapModule()
                {
                    @Override
                    public void configure(BootstrapBinder binder)
                    {
                        TestInterface instance = new TestInterface()
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.