Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
reduce Java debt (endless wip)
[simgrid.git] / examples / java / cloud / migration / Main.java
1 /* Copyright (c) 2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 package cloud.migration;
8
9 import org.simgrid.msg.Msg;
10 import org.simgrid.msg.Host;
11 import org.simgrid.msg.HostNotFoundException;
12 import org.simgrid.msg.MsgException;
13
14 public class Main {
15   private static boolean endOfTest = false;
16
17   private Main() {
18     throw new IllegalAccessError("Utility class");
19   }
20
21   public static void setEndOfTest(){
22     endOfTest=true;
23   }
24
25   public static boolean isEndOfTest(){
26     return endOfTest;
27   }
28
29   public static void main(String[] args) throws MsgException {
30     Msg.init(args);
31
32     if (args.length < 1) {
33       Msg.info("Usage  : Main platform_file.xml");
34       System.exit(1);
35     }
36
37     /* construct the platform and deploy the application */
38     Msg.createEnvironment(args[0]);
39     new cloud.migration.Test("PM0","Test").start();
40     Msg.run();
41   }
42 }