Package com.google.gerrit.lifecycle

Examples of com.google.gerrit.lifecycle.LifecycleModule


          @Override
          protected void configure() {
            factory(CreateCodeReviewNotes.Factory.class);
          }
        });
        install(new LifecycleModule() {
          @Override
          protected void configure() {
            listener().to(LocalDiskRepositoryManager.Lifecycle.class);
          }
        });
View Full Code Here


  @Override
  protected void configure() {
    bind(JettyEnv.class).toInstance(env);
    bind(JettyServer.class);
    install(new LifecycleModule() {
      @Override
      protected void configure() {
        listener().to(JettyServer.Lifecycle.class);
      }
    });
View Full Code Here

      @Override
      protected void configure() {
        bind(File.class).annotatedWith(SitePath.class).toInstance(sitePath);
      }
    });
    modules.add(new LifecycleModule() {
      @Override
      protected void configure() {
        bind(DataSourceProvider.Context.class).toInstance(context);
        bind(Key.get(DataSource.class, Names.named("ReviewDb"))).toProvider(
            DataSourceProvider.class).in(SINGLETON);
View Full Code Here

import com.google.inject.ProvisionException;

/** Validates the current schema version. */
public class SchemaVersionCheck implements LifecycleListener {
  public static Module module () {
    return new LifecycleModule() {
      @Override
      protected void configure() {
        listener().to(SchemaVersionCheck.class);
      }
    };
View Full Code Here

  public static class Module extends AbstractModule {
    @Override
    protected void configure() {
      bind(GitRepositoryManager.class).to(LocalDiskRepositoryManager.class);

      install(new LifecycleModule() {
        @Override
        protected void configure() {
          listener().to(LocalDiskRepositoryManager.Lifecycle.class);
        }
      });
View Full Code Here

  }

  private Injector createDbInjector() {
    final List<Module> modules = new ArrayList<Module>();
    if (sitePath != null) {
      modules.add(new LifecycleModule() {
        @Override
        protected void configure() {
          bind(File.class).annotatedWith(SitePath.class).toInstance(sitePath);
          bind(DataSourceProvider.Context.class).toInstance(
              DataSourceProvider.Context.MULTI_USER);
          bind(Key.get(DataSource.class, Names.named("ReviewDb"))).toProvider(
              DataSourceProvider.class).in(SINGLETON);
          listener().to(DataSourceProvider.class);
        }
      });
      modules.add(new GerritServerConfigModule());

    } else {
      modules.add(new LifecycleModule() {
        @Override
        protected void configure() {
          bind(Key.get(DataSource.class, Names.named("ReviewDb"))).toProvider(
              ReviewDbDataSourceProvider.class).in(SINGLETON);
          listener().to(ReviewDbDataSourceProvider.class);
View Full Code Here

    command("git-receive-pack").to(Commands.key(git, "receive-pack"));
    command("gerrit-receive-pack").to(Commands.key(git, "receive-pack"));

    command("suexec").to(SuExec.class);

    install(new LifecycleModule() {
      @Override
      protected void configure() {
        listener().to(ShowCaches.StartupListener.class);
      }
    });
View Full Code Here

    factory(GeneratePassword.Factory.class);

    bind(SocketAddress.class).annotatedWith(RemotePeer.class).toProvider(
        HttpRemotePeerProvider.class).in(RequestScoped.class);

    install(new LifecycleModule() {
      @Override
      protected void configure() {
        listener().toInstance(registerInParentInjectors());
      }
    });
View Full Code Here

    bind(PublickeyAuthenticator.class).to(DatabasePubKeyAuth.class);
    bind(KeyPairProvider.class).toProvider(HostKeyProvider.class).in(SINGLETON);

    install(new DefaultCommandModule());

    install(new LifecycleModule() {
      @Override
      protected void configure() {
        bind(ModuleGenerator.class).to(SshAutoRegisterModuleGenerator.class);
        bind(SshPluginStarterCallback.class);
        bind(StartPluginListener.class)
View Full Code Here

//    bind(ChangeControl.GenericFactory.class);
//    bind(ProjectControl.GenericFactory.class);
//    factory(FunctionState.Factory.class);
//    factory(ReplicationUser.Factory.class);

    install(new LifecycleModule() {
      @Override
      protected void configure() {
        listener().to(LocalDiskRepositoryManager.Lifecycle.class);
        listener().to(CachePool.Lifecycle.class);
        listener().to(WorkQueue.Lifecycle.class);
View Full Code Here

TOP

Related Classes of com.google.gerrit.lifecycle.LifecycleModule

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.