Package com.twitter.common.application.modules

Examples of com.twitter.common.application.modules.LifecycleModule


    statsProvider = createMock(StatsProvider.class);
    module = new SlaModule(Amount.of(5L, Time.MILLISECONDS));
    injector = Guice.createInjector(
        ImmutableList.<Module>builder()
            .add(module)
            .add(new LifecycleModule())
            .add(new AppLauncherModule())
            .add(new AbstractModule() {
              @Override
              protected void configure() {
                PubsubTestUtil.installPubsub(binder());
View Full Code Here


        .withCredentials(ZooKeeperClient.digestCredentials("mesos", "mesos"));
    injector = Guice.createInjector(
        ImmutableList.<Module>builder()
            .addAll(SchedulerMain.getModules(
                CLUSTER_NAME, SERVERSET_PATH, zkClientConfig, STATS_URL_PREFIX))
            .add(new LifecycleModule())
            .add(new AppLauncherModule())
            .add(new ZooKeeperClientModule(zkClientConfig))
            .add(testModule)
            .build()
    );
View Full Code Here

    Injector injector = Guice.createInjector(
        new ServletModule(),
        new LogModule(),
        new StatsModule(),
        new HttpModule(),
        new LifecycleModule(),
        new AbstractModule() {
          <T> T bindMock(Class<T> clazz) {
            T mock = createMock(clazz);
            bind(clazz).toInstance(mock);
            return mock;
View Full Code Here

        .withCredentials(ZooKeeperClient.digestCredentials("mesos", "mesos"));
    final SchedulerMain main = SchedulerMain.class.newInstance();
    injector = Guice.createInjector(
        ImmutableList.<Module>builder()
            .addAll(main.getModules(CLUSTER_NAME, SERVERSET_PATH, zkClientConfig, STATS_URL_PREFIX))
            .add(new LifecycleModule())
            .add(new AppLauncherModule())
            .add(new ZooKeeperClientModule(zkClientConfig))
            .add(testModule)
            .build()
    );
View Full Code Here

    statsProvider = createMock(StatsProvider.class);
    module = new SlaModule(Amount.of(5L, Time.MILLISECONDS));
    injector = Guice.createInjector(
        ImmutableList.<Module>builder()
            .add(module)
            .add(new LifecycleModule())
            .add(new AppLauncherModule())
            .add(new AbstractModule() {
              @Override
              protected void configure() {
                bind(Clock.class).toInstance(clock);
View Full Code Here

    );
  }

  public Injector getInjector(boolean isAsync) {
    return Guice.createInjector(
        new LifecycleModule(),
        new PubsubEventModule(isAsync, logger),
        new AbstractModule() {
          @Override
          protected void configure() {
            bind(Thread.UncaughtExceptionHandler.class)
View Full Code Here

  }

  private Injector createInjector(Module module) {
    return Guice.createInjector(
        module,
        new LifecycleModule(),
        new AbstractModule() {
          private <T> void bindMock(Class<T> clazz) {
            bind(clazz).toInstance(createMock(clazz));
          }
View Full Code Here

      }
    });
    statsProvider = new FakeStatsProvider();

    Injector injector = Guice.createInjector(
        new LifecycleModule(),
        new PubsubEventModule(false),
        new AbstractModule() {
          @Override
          protected void configure() {
            bind(Driver.class).toInstance(driver);
View Full Code Here

        });

    injector = Guice.createInjector(
        new JettyServerModule(),
        new StatsModule(),
        new LifecycleModule(),
        new AbstractModule() {
          <T> T bindMock(Class<T> clazz) {
            T mock = createMock(clazz);
            bind(clazz).toInstance(mock);
            return mock;
View Full Code Here

TOP

Related Classes of com.twitter.common.application.modules.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.