public static void start(Module... extraModules) { Bootstrap app = new Bootstrap(ImmutableList.<Module>builder() .add(new NodeModule()) .add(new HttpServerModule()) .add(new JsonModule()) .add(new JaxrsModule(true)) .add(new MBeanModule()) .add(new JmxModule()) .add(new LogJmxModule()) .add(new TraceTokenModule()) .add(new EventModule()) .add(new ProxyModule()) .add(extraModules) .build()); Logger log = Logger.get(PrestoProxy.class); try { app.strictConfig().initialize(); log.info("======== SERVER STARTED ========"); } catch (Throwable t) { log.error(t); System.exit(1); } }
new JaxrsModule(true), new MBeanModule(), new JmxModule(), new JmxHttpModule(), new LogJmxModule(),
public static void start(Module... extraModules) { Bootstrap app = new Bootstrap(ImmutableList.<Module>builder() .add(new NodeModule()) .add(new HttpServerModule()) .add(new JsonModule()) .add(new JaxrsModule(true)) .add(new MBeanModule()) .add(new JmxModule()) .add(new LogJmxModule()) .add(new TraceTokenModule()) .add(new EventModule()) .add(new ProxyModule()) .add(extraModules) .build()); Logger log = Logger.get(PrestoProxy.class); try { app.strictConfig().initialize(); log.info("======== SERVER STARTED ========"); } catch (Throwable t) { log.error(t); System.exit(1); } }
new JaxrsModule(true), new MBeanModule(), new JmxModule(), new JmxHttpModule(), new LogJmxModule(),
new MBeanModule(), new PrefixObjectNameGeneratorModule("io.prestosql"), new JmxModule(), new JmxHttpModule(), new LogJmxModule(),
public static void main(String[] args) throws Exception { Bootstrap app = new Bootstrap( new NodeModule(), new HttpServerModule(), new HttpEventModule(), new DiscoveryModule(), new JsonModule(), new MBeanModule(), new RackModule(), new JmxModule(), new JmxHttpRpcModule()); try { Injector injector = app.strictConfig().initialize(); injector.getInstance(Announcer.class).start(); } catch (Exception e) { Logger.get(Main.class).error(e); System.err.flush(); System.out.flush(); System.exit(0); } catch (Throwable t) { System.exit(0); } } }
public static void main(String[] args) throws Exception { Bootstrap app = new Bootstrap( new NodeModule(), new HttpServerModule(), new HttpEventModule(), new DiscoveryModule(), new JsonModule(), new MBeanModule(), new RackModule(), new JmxModule(), new JmxHttpRpcModule()); try { Injector injector = app.strictConfig().initialize(); injector.getInstance(Announcer.class).start(); } catch (Exception e) { Logger.get(Main.class).error(e); System.err.flush(); System.out.flush(); System.exit(0); } catch (Throwable t) { System.exit(0); } } }
new MBeanModule(), new PrefixObjectNameGeneratorModule("io.prestosql"), new JmxModule(), new JmxHttpModule(), new LogJmxModule(),
public static void main(String[] args) throws Exception { try { Bootstrap app = new Bootstrap( new DiscoveryModule(), new NodeModule(), new HttpServerModule(), new HttpEventModule(), new JsonModule(), new JaxrsModule(), new MBeanModule(), new JmxModule(), new AgentMainModule()); app.strictConfig().initialize(); } catch (Exception e) { log.error(e, "Startup failed"); System.exit(1); } } }
public static void main(String[] args) { try { Bootstrap app = new Bootstrap( new MBeanModule(), new NodeModule(), new HttpServerModule(), new JaxrsModule(true), new JsonModule(), new JmxModule(), new JmxHttpRpcModule(), new DiscoveryServerModule(), new HttpEventModule(), new TraceTokenModule(), new DiscoveryModule() ); Injector injector = app.strictConfig().initialize(); injector.getInstance(Announcer.class).start(); } catch (Throwable t) { log.error(t); System.exit(1); } } }
public static void main(String[] args) throws Exception { try { Bootstrap app = new Bootstrap( new NodeModule(), new HttpServerModule(), new HttpEventModule(), new DiscoveryModule(), new JsonModule(), new JaxrsModule(), new MBeanModule(), new JmxModule(), new CoordinatorMainModule(), installIfPropertyEquals(new StaticProvisionerModule(), "coordinator.provisioner", "static"), installIfPropertyEquals(new AwsProvisionerModule(), "coordinator.provisioner", "aws")); app.strictConfig().initialize(); } catch (Throwable e) { log.error(e, "Startup failed"); System.exit(1); } } }
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); } } }
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); } } }
@BeforeMethod public void setup() throws Exception { Bootstrap app = new Bootstrap( new TestingNodeModule(), new TestingHttpServerModule(), new JsonModule(), new JaxrsModule(true), new JmxHttpModule(), new JmxModule(), new MainModule()); Injector injector = app .strictConfig() .doNotInitializeLogging() .initialize(); lifeCycleManager = injector.getInstance(LifeCycleManager.class); server = injector.getInstance(TestingHttpServer.class); client = new JettyHttpClient(); }