Search in sources :

Example 26 with Bootstrap

use of io.airlift.bootstrap.Bootstrap in project airlift by airlift.

the class Main method main.

public static void main(String[] args) {
    Bootstrap app = new Bootstrap(new NodeModule(), new DiscoveryModule(), new HttpServerModule(), new JsonModule(), new JaxrsModule(), new MBeanModule(), new JmxModule(), new JmxHttpModule(), new JmxHttpRpcModule(), new LogJmxModule(), new HttpEventModule(), new TraceTokenModule(), new MainModule());
    try {
        Injector injector = app.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.http.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)26 Bootstrap (io.airlift.bootstrap.Bootstrap)26 Test (org.testng.annotations.Test)17 JettyHttpClient (io.airlift.http.client.jetty.JettyHttpClient)15 LifeCycleManager (io.airlift.bootstrap.LifeCycleManager)13 TestingNodeModule (io.airlift.node.testing.TestingNodeModule)12 JsonModule (io.airlift.json.JsonModule)8 ImmutableMap (com.google.common.collect.ImmutableMap)7 TraceTokenModule (io.airlift.tracetoken.TraceTokenModule)7 InMemoryEventModule (io.airlift.event.client.InMemoryEventModule)5 JaxrsModule (io.airlift.jaxrs.JaxrsModule)5 Duration (io.airlift.units.Duration)5 HttpClient (io.airlift.http.client.HttpClient)4 TheServlet (io.airlift.http.server.TheServlet)4 File (java.io.File)4 ImmutableList (com.google.common.collect.ImmutableList)3 EventModule (io.airlift.event.client.EventModule)3 HttpClientConfig (io.airlift.http.client.HttpClientConfig)3 StatusResponse (io.airlift.http.client.StatusResponseHandler.StatusResponse)3 TestingHttpServer (io.airlift.http.server.testing.TestingHttpServer)3