Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
244569f6e56c762bd54e80506a1969b3c667eec0
[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   public static void setEndOfTest(){
18     endOfTest=true;
19   }
20
21   public static boolean isEndOfTest(){
22     return endOfTest;
23   }
24
25   public static void main(String[] args) throws MsgException {
26     Msg.init(args);
27
28     if (args.length < 1) {
29       Msg.info("Usage  : Main platform_file.xml");
30       System.exit(1);
31     }
32
33     /* construct the platform and deploy the application */
34     Msg.createEnvironment(args[0]);
35     new cloud.migration.Test("host0","Test").start();
36     Msg.run();
37   }
38 }