public static void main(String[] args) throws Exception { // final boolean verbose = (args.length == 1 && "-verbose".equals(args[0])); Properties props = new Properties(); FileReader in = null; try { in = new FileReader("scalerd.properties"); props.load(in); } finally { Closeables.closeQuietly(in); } ConnectionFactory cf = new ConnectionFactory(); cf.setUri(props.getProperty("amqp.uri")); Daemon daemon = new Daemon(cf, props.getProperty("amqp.exchange"), props.getProperty("amqp.queue")); daemon.run(); System.exit(0); }
protected void runDaemon() { task.run(); }