Package com.google.inject.assistedinject

Examples of com.google.inject.assistedinject.FactoryModuleBuilder


   }

   public static class ZoneModule extends AbstractModule {
      @Override
      protected void configure() {
         install(new FactoryModuleBuilder().implement(ZoneIdToURISupplier.class,
               ZoneIdToURIFromAccessForTypeAndVersion.class).build(ZoneIdToURISupplier.Factory.class));
         // dynamically build the zone list as opposed to from properties
         bind(ZoneIdsSupplier.class).to(ZoneIdsFromZoneIdToURIKeySet.class);
         bind(ImplicitLocationSupplier.class).to(FirstZone.class).in(Scopes.SINGLETON);
         bind(LocationsSupplier.class).to(ZoneToProvider.class).in(Scopes.SINGLETON);
View Full Code Here


   public static class KeystoneAdminURLModule extends AbstractModule {

      @Override
      protected void configure() {
         install(new FactoryModuleBuilder().implement(RegionIdToAdminURISupplier.class,
                  RegionIdToAdminURIFromAccessForTypeAndVersion.class).build(RegionIdToAdminURISupplier.Factory.class));
      }
View Full Code Here

        bindConstant().annotatedWith(VelocityProperties.class).to(VELOCITY_PROPERTIES);

        bind(GeneratorUtil.class).in(Singleton.class);
        bind(EventBus.class).in(Singleton.class);

        install(new FactoryModuleBuilder().build(GeneratorFactory.class));
    }
View Full Code Here

        bindConstant().annotatedWith(VelocityProperties.class).to(VELOCITY_PROPERTIES);

        bind(GeneratorUtil.class).in(Singleton.class);
        bind(GenerateFormFactorGinjectors.class).in(Singleton.class);

        install(new FactoryModuleBuilder().build(FormFactorGinjectorFactory.class));
        install(new FactoryModuleBuilder().build(VelocityPlacetokenGenerator.Factory.class));
    }
View Full Code Here

        bind(ManufacturersResource.class).to(ManufacturersResourceImpl.class);
        bind(SessionResource.class).to(SessionResourceImpl.class);
        bind(RatingResource.class).to(RatingResourceImpl.class);
        bind(StatisticsResourceImpl.class);

        install(new FactoryModuleBuilder()
                .implement(CarResource.class, CarResourceImpl.class)
                .build(ResourcesFactory.class));
    }
View Full Code Here

    return jpaPersistModule;
  }

  private void installFactories() {
    install(new FactoryModuleBuilder().implement(
        Cluster.class, ClusterImpl.class).build(ClusterFactory.class));
    install(new FactoryModuleBuilder().implement(
        Host.class, HostImpl.class).build(HostFactory.class));
    install(new FactoryModuleBuilder().implement(
        Service.class, ServiceImpl.class).build(ServiceFactory.class));
  
   
    install(new FactoryModuleBuilder()
        .implement(ResourceProvider.class, Names.named("host"), HostResourceProvider.class)
        .implement(ResourceProvider.class, Names.named("hostComponent"), HostComponentResourceProvider.class)
        .implement(ResourceProvider.class, Names.named("service"), ServiceResourceProvider.class)
        .implement(ResourceProvider.class, Names.named("component"), ComponentResourceProvider.class)
        .build(ResourceProviderFactory.class));

   
    install(new FactoryModuleBuilder().implement(
        ServiceComponent.class, ServiceComponentImpl.class).build(
        ServiceComponentFactory.class));
    install(new FactoryModuleBuilder().implement(
        ServiceComponentHost.class, ServiceComponentHostImpl.class).build(
        ServiceComponentHostFactory.class));
    install(new FactoryModuleBuilder().implement(
        Config.class, ConfigImpl.class).build(ConfigFactory.class));
    install(new FactoryModuleBuilder().implement(
      ConfigGroup.class, ConfigGroupImpl.class).build(ConfigGroupFactory.class));
    install(new FactoryModuleBuilder().build(StageFactory.class));
    bind(HostRoleCommandFactory.class).to(HostRoleCommandFactoryImpl.class);
  }
View Full Code Here

      bind(AmbariMetaInfo.class).toInstance(ambariMetaInfo);
    }

    private void installDependencies() {
      install(new JpaPersistModule("ambari-javadb"));
      install(new FactoryModuleBuilder().implement(
          Cluster.class, ClusterImpl.class).build(ClusterFactory.class));
      install(new FactoryModuleBuilder().implement(
          Host.class, HostImpl.class).build(HostFactory.class));
      install(new FactoryModuleBuilder().implement(
          Service.class, ServiceImpl.class).build(ServiceFactory.class));
      install(new FactoryModuleBuilder().implement(
          ServiceComponent.class, ServiceComponentImpl.class).build(
          ServiceComponentFactory.class));
      install(new FactoryModuleBuilder().implement(
          ServiceComponentHost.class, ServiceComponentHostImpl.class).build(
          ServiceComponentHostFactory.class));
      install(new FactoryModuleBuilder().implement(
          Config.class, ConfigImpl.class).build(ConfigFactory.class));
      install(new FactoryModuleBuilder().implement(
        ConfigGroup.class, ConfigGroupImpl.class).build(ConfigGroupFactory.class));
      install(new FactoryModuleBuilder().build(StageFactory.class));
      install(new FactoryModuleBuilder().build(HostRoleCommandFactory.class));
    }
View Full Code Here

      bind(LoginCredentials.class).annotatedWith(Names.named("image")).toProvider(
            GetLoginForProviderFromPropertiesAndStoreCredentialsOrReturnNull.class);
     
      bindCredentialsOverriderFunction();
     
      install(new FactoryModuleBuilder()
            .implement(RunScriptOnNodeUsingSsh.class, Names.named("direct"), RunScriptOnNodeUsingSsh.class)
            .implement(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.class, Names.named("blocking"),
                  RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.class)
            .implement(RunScriptOnNodeAsInitScriptUsingSsh.class, Names.named("nonblocking"),
                  RunScriptOnNodeAsInitScriptUsingSsh.class).build(RunScriptOnNodeFactoryImpl.Factory.class));

      install(new PersistNodeCredentialsModule());

      install(new FactoryModuleBuilder().implement(new TypeLiteral<Callable<Void>>() {
      }, CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.class)
            .implement(new TypeLiteral<Function<AtomicReference<NodeMetadata>, Void>>() {
            }, CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.class)
            .build(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.Factory.class));

      install(new FactoryModuleBuilder().implement(new TypeLiteral<Callable<RunScriptOnNode>>() {
      }, InitializeRunScriptOnNodeOrPlaceInBadMap.class).build(InitializeRunScriptOnNodeOrPlaceInBadMap.Factory.class));

      install(new FactoryModuleBuilder().build(BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory.class));
   }
View Full Code Here

public class CloudLoadBalancersHttpApiModule extends HttpApiModule<CloudLoadBalancersApi> {

   @Override
   protected void configure() {
      bind(DateAdapter.class).to(Iso8601DateAdapter.class);
      install(new FactoryModuleBuilder().build(ConvertLB.Factory.class));
      super.configure();
   }
View Full Code Here

    * </pre>
    */
   public static class ProviderModule extends AbstractModule {
      @Override
      protected void configure() {
         install(new FactoryModuleBuilder().build(LocationIdToURIFromAccessForTypeAndVersion.Factory.class));
      }
View Full Code Here

TOP

Related Classes of com.google.inject.assistedinject.FactoryModuleBuilder

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.