Search in sources :

Example 1 with JmxModule

use of io.airlift.jmx.JmxModule in project airlift by airlift.

the class TestServer method setup.

@BeforeMethod
public void setup() throws Exception {
    Bootstrap app = new Bootstrap(new TestingNodeModule(), new TestingHttpServerModule(), new JsonModule(), new JaxrsModule(), new JmxHttpModule(), new JmxModule(), new MainModule());
    Injector injector = app.doNotInitializeLogging().initialize();
    lifeCycleManager = injector.getInstance(LifeCycleManager.class);
    server = injector.getInstance(TestingHttpServer.class);
    client = new JettyHttpClient();
}
Also used : LifeCycleManager(io.airlift.bootstrap.LifeCycleManager) TestingHttpServerModule(io.airlift.http.server.testing.TestingHttpServerModule) JmxModule(io.airlift.jmx.JmxModule) TestingNodeModule(io.airlift.node.testing.TestingNodeModule) Injector(com.google.inject.Injector) JettyHttpClient(io.airlift.http.client.jetty.JettyHttpClient) JaxrsModule(io.airlift.jaxrs.JaxrsModule) TestingHttpServer(io.airlift.http.server.testing.TestingHttpServer) Bootstrap(io.airlift.bootstrap.Bootstrap) JsonModule(io.airlift.json.JsonModule) JmxHttpModule(io.airlift.jmx.JmxHttpModule) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with JmxModule

use of io.airlift.jmx.JmxModule 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)

Example 3 with JmxModule

use of io.airlift.jmx.JmxModule 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)3 Bootstrap (io.airlift.bootstrap.Bootstrap)3 JaxrsModule (io.airlift.jaxrs.JaxrsModule)3 JmxHttpModule (io.airlift.jmx.JmxHttpModule)3 JmxModule (io.airlift.jmx.JmxModule)3 JsonModule (io.airlift.json.JsonModule)3 Announcer (io.airlift.discovery.client.Announcer)2 DiscoveryModule (io.airlift.discovery.client.DiscoveryModule)2 HttpEventModule (io.airlift.event.client.http.HttpEventModule)2 HttpServerModule (io.airlift.http.server.HttpServerModule)2 JmxHttpRpcModule (io.airlift.jmx.http.rpc.JmxHttpRpcModule)2 LogJmxModule (io.airlift.log.LogJmxModule)2 NodeModule (io.airlift.node.NodeModule)2 TraceTokenModule (io.airlift.tracetoken.TraceTokenModule)2 MBeanModule (org.weakref.jmx.guice.MBeanModule)2 LifeCycleManager (io.airlift.bootstrap.LifeCycleManager)1 JettyHttpClient (io.airlift.http.client.jetty.JettyHttpClient)1 TestingHttpServer (io.airlift.http.server.testing.TestingHttpServer)1 TestingHttpServerModule (io.airlift.http.server.testing.TestingHttpServerModule)1 TestingNodeModule (io.airlift.node.testing.TestingNodeModule)1