Main.java 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package uk.ac.ic.wlgitbridge;
  2. import java.util.Arrays;
  3. import uk.ac.ic.wlgitbridge.application.GitBridgeApp;
  4. import uk.ac.ic.wlgitbridge.util.Log;
  5. /*
  6. * Created by Winston on 01/11/14.
  7. */
  8. /*
  9. * This is the entry point into the Git Bridge.
  10. *
  11. * It is responsible for creating the {@link GitBridgeApp} and then running it.
  12. *
  13. * The {@link GitBridgeApp} parses args and creates the {@link GitBridgeServer}.
  14. *
  15. * The {@link GitBridgeServer} creates the {@link Bridge}, among other things.
  16. *
  17. * The {@link Bridge} is the heart of the Git Bridge. Start there, and follow
  18. * the links outwards (which lead back to the Git users and the postback from
  19. * the snapshot API) and inwards (which lead into the components of the Git
  20. * Bridge: the configurable repo store, db store, and swap store, along with
  21. * the project lock, the swap job, the snapshot API, the resource cache
  22. * and the postback manager).
  23. */
  24. public class Main {
  25. public static void main(String[] args) {
  26. Log.info("Git Bridge started with args: " + Arrays.toString(args));
  27. try {
  28. new GitBridgeApp(args).run();
  29. } catch (Throwable t) {
  30. /* So that we get a timestamp */
  31. Log.error("Fatal exception thrown to top level, exiting: ", t);
  32. System.exit(1);
  33. }
  34. }
  35. }