Package com.google.inject.assistedinject

Examples of com.google.inject.assistedinject.FactoryModuleBuilder


   @Override
   protected void configure() {
      // ServiceClient is used directly for filters and retry handlers, so let's bind it explicitly
      bindSyncToAsyncHttpApi(binder(), AuthenticationClient.class, AuthenticationAsyncClient.class);
      install(new FactoryModuleBuilder().implement(RegionIdToURISupplier.class,
               RegionIdToURIFromAuthForServiceSupplier.class).build(RegionIdToURISupplier.Factory.class));
      install(new FactoryModuleBuilder().implement(ImplicitRegionIdSupplier.class, V1DefaultRegionIdSupplier.class)
               .build(V1DefaultRegionIdSupplier.Factory.class));
      bind(HttpRetryHandler.class).annotatedWith(ClientError.class).to(RetryOnRenew.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().build(StageFactory.class));
      install(new FactoryModuleBuilder().build(HostRoleCommandFactory.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(
        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().build(StageFactory.class));
    bind(HostRoleCommandFactory.class).to(HostRoleCommandFactoryImpl.class);
  }
View Full Code Here

     
      bind(String.class)
      .annotatedWith(Names.named("Spreadsheet Id"))
      .toInstance("spreadsheet");
     
      install(new FactoryModuleBuilder().build(Cell.Factory.class));
      install(new FactoryModuleBuilder().build(CellBlock.Factory.class));
      install(new FactoryModuleBuilder().build(CellCache.Factory.class));
      install(new FactoryModuleBuilder().build(CellCacheAggeration.BuilderFactory.class));
     
      super.configure();
    }
View Full Code Here

  private static final int POOL_SIZE = 10;

  @Override
  protected void configure() {
    bind(ScheduledThreadPoolExecutor.class).toInstance(new ScheduledThreadPoolExecutor(POOL_SIZE));
    install(new FactoryModuleBuilder()
        .implement(YumHosted.class, YumHostedImpl.class)
        .implement(YumProxy.class, YumProxyImpl.class)
        .implement(YumGroup.class, YumGroupImpl.class)
        .build(YumFactory.class)
    );
View Full Code Here

  @Override
  protected void configure() {
    bind(CapabilityStorage.class).to(OrientCapabilityStorage.class);

    install(new FactoryModuleBuilder().build(ActivationConditionHandlerFactory.class));
    install(new FactoryModuleBuilder().build(ValidityConditionHandlerFactory.class));
    install(new FactoryModuleBuilder().build(ValidatorFactory.class));
  }
View Full Code Here

        bind(AstyanaxConnectionPoolConfigurationProvider.class).to(DefaultAstyanaxConnectionPoolConfigurationProvider.class).in(Scopes.SINGLETON);
        bind(AstyanaxConnectionPoolMonitorProvider.class)      .to(DefaultAstyanaxConnectionPoolMonitorProvider.class).in(Scopes.SINGLETON);
        bind(KeyspaceClientProvider.class)                     .to(DefaultKeyspaceClientProvider.class).in(Scopes.SINGLETON);
        bind(ClusterClientProvider.class)                      .to(DefaultAstyanaxClusterClientProvider.class).in(Scopes.SINGLETON);
       
        install(new FactoryModuleBuilder()
            .implement(CassandraClusterAdminResource.class, AstyanaxThriftClusterAdminResource.class)
            .build(CassandraClusterAdminResourceFactory.class));
       
        // REST resources
        bind(ClusterDiscoveryService.class).to(LocalClusterDiscoveryService.class);
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

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

   }

   public static class RegionModule extends AbstractModule {
      @Override
      protected void configure() {
         install(new FactoryModuleBuilder().implement(RegionIdToURISupplier.class,
               RegionIdToURIFromAccessForTypeAndVersion.class).build(RegionIdToURISupplier.Factory.class));
         install(new FactoryModuleBuilder().implement(RegionIdToAdminURISupplier.class,
               RegionIdToAdminURIFromAccessForTypeAndVersion.class).build(RegionIdToAdminURISupplier.Factory.class));
         // dynamically build the region list as opposed to from properties
         bind(RegionIdsSupplier.class).to(RegionIdsFromRegionIdToURIKeySet.class);
         bind(ImplicitLocationSupplier.class).to(FirstRegion.class).in(Scopes.SINGLETON);
         bind(LocationsSupplier.class).to(RegionToProvider.class).in(Scopes.SINGLETON);
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.