Search in sources :

Example 6 with TraceTokenModule

use of io.airlift.tracetoken.TraceTokenModule in project airlift by airlift.

the class Main method main.

public static void main(String[] args) throws Exception {
    Bootstrap app = new Bootstrap(new NodeModule(), new DiscoveryModule(), new HttpServerModule(), new JsonModule(), new JaxrsModule(true), new MBeanModule(), new JmxModule(), new JmxHttpModule(), new JmxHttpRpcModule(), new LogJmxModule(), new HttpEventModule(), new TraceTokenModule(), new MainModule());
    try {
        Injector injector = app.strictConfig().initialize();
        injector.getInstance(Announcer.class).start();
    } catch (Throwable e) {
        log.error(e);
        System.exit(1);
    }
}
Also used : MBeanModule(org.weakref.jmx.guice.MBeanModule) JmxHttpRpcModule(io.airlift.jmx.http.rpc.JmxHttpRpcModule) JmxModule(io.airlift.jmx.JmxModule) LogJmxModule(io.airlift.log.LogJmxModule) NodeModule(io.airlift.node.NodeModule) DiscoveryModule(io.airlift.discovery.client.DiscoveryModule) JaxrsModule(io.airlift.jaxrs.JaxrsModule) LogJmxModule(io.airlift.log.LogJmxModule) JsonModule(io.airlift.json.JsonModule) TraceTokenModule(io.airlift.tracetoken.TraceTokenModule) HttpEventModule(io.airlift.event.client.HttpEventModule) HttpServerModule(io.airlift.http.server.HttpServerModule) Announcer(io.airlift.discovery.client.Announcer) Injector(com.google.inject.Injector) Bootstrap(io.airlift.bootstrap.Bootstrap) JmxHttpModule(io.airlift.jmx.JmxHttpModule)

Example 7 with TraceTokenModule

use of io.airlift.tracetoken.TraceTokenModule in project airlift by airlift.

the class Main method main.

public static void main(String[] args) throws Exception {
    Bootstrap app = new Bootstrap(new NodeModule(), new DiscoveryModule(), new HttpServerModule(), new JsonModule(), new JaxrsModule(true), new MBeanModule(), new JmxModule(), new JmxHttpModule(), new JmxHttpRpcModule(), new LogJmxModule(), new HttpEventModule(), new TraceTokenModule(), new MainModule());
    try {
        Injector injector = app.strictConfig().initialize();
        injector.getInstance(Announcer.class).start();
    } catch (Throwable e) {
        log.error(e);
        System.exit(1);
    }
}
Also used : MBeanModule(org.weakref.jmx.guice.MBeanModule) JmxHttpRpcModule(io.airlift.jmx.http.rpc.JmxHttpRpcModule) JmxModule(io.airlift.jmx.JmxModule) LogJmxModule(io.airlift.log.LogJmxModule) NodeModule(io.airlift.node.NodeModule) DiscoveryModule(io.airlift.discovery.client.DiscoveryModule) JaxrsModule(io.airlift.jaxrs.JaxrsModule) LogJmxModule(io.airlift.log.LogJmxModule) JsonModule(io.airlift.json.JsonModule) TraceTokenModule(io.airlift.tracetoken.TraceTokenModule) HttpEventModule(io.airlift.event.client.HttpEventModule) HttpServerModule(io.airlift.http.server.HttpServerModule) Announcer(io.airlift.discovery.client.Announcer) Injector(com.google.inject.Injector) Bootstrap(io.airlift.bootstrap.Bootstrap) JmxHttpModule(io.airlift.jmx.JmxHttpModule)

Aggregations

Injector (com.google.inject.Injector)7 TraceTokenModule (io.airlift.tracetoken.TraceTokenModule)7 Bootstrap (io.airlift.bootstrap.Bootstrap)6 JettyHttpClient (io.airlift.http.client.jetty.JettyHttpClient)5 Test (org.testng.annotations.Test)5 ImmutableList (com.google.common.collect.ImmutableList)4 Key (com.google.inject.Key)4 LifeCycleManager (io.airlift.bootstrap.LifeCycleManager)4 HttpClientBinder.httpClientBinder (io.airlift.http.client.HttpClientBinder.httpClientBinder)4 Assertions.assertInstanceOf (io.airlift.testing.Assertions.assertInstanceOf)4 Duration (io.airlift.units.Duration)4 ElementType (java.lang.annotation.ElementType)4 Retention (java.lang.annotation.Retention)4 RUNTIME (java.lang.annotation.RetentionPolicy.RUNTIME)4 Target (java.lang.annotation.Target)4 MINUTES (java.util.concurrent.TimeUnit.MINUTES)4 Qualifier (javax.inject.Qualifier)4 Assert.assertEquals (org.testng.Assert.assertEquals)4 Assert.assertFalse (org.testng.Assert.assertFalse)4 Assert.assertNotNull (org.testng.Assert.assertNotNull)4