Package io.airlift.configuration

Examples of io.airlift.configuration.ConfigurationModule


        Map<String, String> properties = ImmutableMap.of("node.environment", "test");
        ConfigurationFactory configFactory = new ConfigurationFactory(properties);
        Injector injector = Guice.createInjector(Stage.PRODUCTION, new JmxModule(),
                                                 new NodeModule(),
                                                 new MBeanModule(),
                                                 new ConfigurationModule(configFactory));
        injector.getInstance(JmxAgent.class);
    }
View Full Code Here


    public void testThriftClientAndServerModules()
            throws Exception
    {
        final List<Object> eventHandlerContexts = newArrayList();
        Injector injector = Guice.createInjector(Stage.PRODUCTION,
                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                new ThriftCodecModule(),
                new ThriftClientModule(),
                new ThriftServerModule(),
                new TestingJmxModule(),
                new MBeanModule(),
View Full Code Here

    @Test
    public void testThriftWithAnnotationBinding()
            throws Exception
    {
        Injector injector = Guice.createInjector(Stage.PRODUCTION,
                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                new ThriftCodecModule(),
                new ThriftClientModule(),
                new ThriftServerModule(),
                new Module()
                {
View Full Code Here

    @Test
    public void testThriftWithKeyBinding()
            throws Exception
    {
        Injector injector = Guice.createInjector(Stage.PRODUCTION,
                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                new ThriftCodecModule(),
                new ThriftClientModule(),
                new ThriftServerModule(),
                new Module()
                {
View Full Code Here

                .put("PumaReadService.thrift.client.socks-proxy", proxy.toString())
                .build();

        Injector injector = Guice.createInjector(
                Stage.PRODUCTION,
                new ConfigurationModule(new ConfigurationFactory(configMap)),
                new ThriftCodecModule(),
                new ThriftClientModule(),
                new Module() {
                    @Override
                    public void configure(Binder binder)
View Full Code Here

    @Test
    public void testThriftClientAndServerModules()
            throws Exception
    {
        Injector injector = Guice.createInjector(Stage.PRODUCTION,
                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                new ThriftCodecModule(),
                new ThriftClientModule(),
                new ThriftServerModule(),
                new JmxModule(),
                new MBeanModule(),
View Full Code Here

    @Test
    public void testThriftWithAnnotationBinding()
            throws Exception
    {
        Injector injector = Guice.createInjector(Stage.PRODUCTION,
                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                new ThriftCodecModule(),
                new ThriftClientModule(),
                new ThriftServerModule(),
                new Module()
                {
View Full Code Here

    @Test
    public void testThriftWithKeyBinding()
            throws Exception
    {
        Injector injector = Guice.createInjector(Stage.PRODUCTION,
                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                new ThriftCodecModule(),
                new ThriftClientModule(),
                new ThriftServerModule(),
                new Module()
                {
View Full Code Here

                .put("PumaReadService.thrift.client.socks-proxy", proxy.toString())
                .build();

        Injector injector = Guice.createInjector(
                Stage.PRODUCTION,
                new ConfigurationModule(new ConfigurationFactory(configMap)),
                new ThriftCodecModule(),
                new ThriftClientModule(),
                new Module() {
                    @Override
                    public void configure(Binder binder)
View Full Code Here

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

TOP

Related Classes of io.airlift.configuration.ConfigurationModule

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.