diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-02-06 15:14:50 +0100 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-02-06 15:14:50 +0100 |
commit | b5919a813f1ec6a4b6fe8ca407ec12a107e688e3 (patch) | |
tree | fb156e7e419a64fe73eefa621e3c40f4cd86d848 /same/src/main/java/com | |
parent | 37e22087cc594cd22a7788444539c5501b22a72c (diff) |
Replace MasterApp with a generic App class.
Diffstat (limited to 'same/src/main/java/com')
-rw-r--r-- | same/src/main/java/com/orbekk/same/App.java (renamed from same/src/main/java/com/orbekk/same/MasterApp.java) | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/same/src/main/java/com/orbekk/same/MasterApp.java b/same/src/main/java/com/orbekk/same/App.java index c5e270a..2416899 100644 --- a/same/src/main/java/com/orbekk/same/MasterApp.java +++ b/same/src/main/java/com/orbekk/same/App.java @@ -1,27 +1,25 @@ package com.orbekk.same; -import org.eclipse.jetty.server.Server; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.googlecode.jsonrpc4j.JsonRpcServer; import com.orbekk.same.config.Configuration; -public class MasterApp { +public class App { private Logger logger = LoggerFactory.getLogger(getClass()); - - public void run(Configuration configuration) { + + public void run(String[] args) { + Configuration configuration = Configuration.loadOrDie(); SameController controller = SameController.create(configuration); try { controller.start(); + controller.join(); } catch (Exception e) { - logger.error("Failed to start Same", e); + logger.error("Error in App.", e); } - controller.join(); } public static void main(String[] args) { - Configuration configuration = Configuration.loadOrDie(); - (new MasterApp()).run(configuration); + new App().run(args); } } |