Examples of LifeCycleModule


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() {
                bind(Clock.class).toInstance(clock);
View Full Code Here

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

    );
  }

  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

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

  }

  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

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

      }
    });
    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

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

        });

    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

Examples of io.airlift.bootstrap.LifeCycleModule

            jCommander.usage();
        } else {
            injector = Guice.createInjector(
                    Stage.PRODUCTION,
                    new ConfigurationModule(new ConfigurationFactory(buildConfigMap(config))),
                    new LifeCycleModule(),
                    new ThriftCodecModule(),
                    new ThriftClientModule(),
                    new ThriftClientStatsModule(),
                    new NodeModule(),
                    new JmxModule(),
View Full Code Here

Examples of io.airlift.bootstrap.LifeCycleModule

            jCommander.usage();
        } else {
            injector = Guice.createInjector(
                    Stage.PRODUCTION,
                    new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                    new LifeCycleModule(),
                    new ThriftCodecModule(),
                    new ThriftClientModule(),
                    new Module()
                    {
                        @Override
View Full Code Here

Examples of io.airlift.bootstrap.LifeCycleModule

            jCommander.usage();
        } else {
            injector = Guice.createInjector(
                    Stage.PRODUCTION,
                    new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                    new LifeCycleModule(),
                    new ThriftCodecModule(),
                    new ThriftClientModule(),
                    new Module()
                    {
                        @Override
View Full Code Here

Examples of io.airlift.bootstrap.LifeCycleModule

    Guice.createInjector
      (
        Stage.PRODUCTION,
        new ConfigurationModule(cf),
        new ValidationErrorModule(new ConfigurationValidator(cf, null).validate(exampleModule)),
        new LifeCycleModule(),
        exampleModule,
        new NiftyModule() {
          @Override
          protected void configureNifty() {
            bind().toProvider(LoadTestServerProvider.class);
View Full Code Here

Examples of io.airlift.bootstrap.LifeCycleModule

            }
        };
        Guice.createInjector(Stage.PRODUCTION,
                             new ConfigurationModule(cf),
                             new ValidationErrorModule(new ConfigurationValidator(cf, null).validate(exampleModule)),
                             new LifeCycleModule(),
                             exampleModule,
                             new NiftyModule()
                             {
                                 @Override
                                 protected void configureNifty()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.