Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Dig through git history, and update copyright lines.
[simgrid.git] / examples / java / bittorrent / Bittorrent.java
1 /**
2 * Copyright (c) 2012-2013. The SimGrid Team.
3 * All rights reserved.
4 *
5 * This program is free software; you can redistribute 
6 * it and/or modify it under the terms of the license 
7 * (GNU LGPL) which comes with this package.
8 *
9 */
10 package bittorrent;
11
12 import org.simgrid.msg.Msg;
13 import org.simgrid.msg.MsgException;
14
15 public class Bittorrent {
16         public static void main(String[] args) throws MsgException {
17                 /* initialize the MSG simulation. Must be done before anything else (even logging). */
18                 Msg.init(args);
19         if(args.length < 2) {
20                 Msg.info("Usage   : Bittorrent platform_file deployment_file");
21                 Msg.info("example : Bittorrent platform.xml deployment.xml");
22                 System.exit(1);
23         }
24                 
25                 /* construct the platform and deploy the application */
26                 Msg.createEnvironment(args[0]);
27                 Msg.deployApplication(args[1]);
28                         
29                 /*  execute the simulation. */
30         Msg.run();              
31         }
32
33 }