Package io.airlift.bootstrap

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


            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

            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

    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

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

    public void runGuiceServer() throws Exception
    {
        Injector injector = Guice.createInjector(
                Stage.PRODUCTION,
                new ConfigurationModule(new ConfigurationFactory(SERVER_CONFIGURATION)),
                new LifeCycleModule(),
                new ThriftCodecModule(),
                new ThriftServerModule(),
                new ThriftServerStatsModule(),
                new Fb303ServiceModule(App.class),
                new MBeanModule(),
View Full Code Here

    public static void main(String[] args) throws Exception {
        Injector serverInjector = Guice.createInjector(
                Stage.PRODUCTION,
                new ConfigurationModule(new ConfigurationFactory(SERVER_CONFIGURATION)),
                new LifeCycleModule(),
                new ThriftCodecModule(),
                new ThriftServerModule(),
                new ThriftServerStatsModule(),
                new Fb303ServiceModule(App.class),
                new MBeanModule(),
                new JmxModule(),
                new HeaderServerModule(),
                new AbstractModule() {
                    @Override
                    protected void configure() {
                        bind(OptionsSource.class).to(EmptyOptionsSource.class);

                        fb303SourceBinder(binder()).exportJmxUtils();
                        fb303SourceBinder(binder()).exportRuntimeMBeans();

                        bind(HeaderUsageExampleHandler.class).in(Scopes.SINGLETON);
                        thriftServerBinder(binder()).exportThriftService(HeaderUsageExampleHandler.class);
                    }
                }
        );

        Injector clientInjector = Guice.createInjector(
                Stage.PRODUCTION,
                new LifeCycleModule(),
                new ConfigurationModule(new ConfigurationFactory(CLIENT_CONFIGURATION)),
                new ThriftCodecModule(),
                new ThriftClientModule(),
                new AbstractModule() {
                    @Override
View Full Code Here

        ImmutableMap<String, String> configuration = ImmutableMap.of(
                "ExampleService.thrift.client.read-timeout", "1000ms"
        );
        Injector injector = Guice.createInjector(
                Stage.PRODUCTION,
                new LifeCycleModule(),
                new ConfigurationModule(new ConfigurationFactory(configuration)),
                new ThriftCodecModule(),
                new ThriftClientModule(),
                new Module()
                {
View Full Code Here

TOP

Related Classes of io.airlift.bootstrap.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.