Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix doxygen comments.
[simgrid.git] / examples / java / suspend / DreamMaster.java
1 /*
2  * Copyright 2006-2012. The SimGrid Team. 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 suspend;
8
9 import org.simgrid.msg.Host;
10 import org.simgrid.msg.Msg;
11 import org.simgrid.msg.Process;
12 import org.simgrid.msg.MsgException;
13 public class DreamMaster extends Process {
14         public DreamMaster(Host host, String name, String[]args) {
15                 super(host,name,args);
16         } 
17         public void main(String[] args) throws MsgException {
18                 Msg.info("Let's create a lazy guy.");
19                 Process lazyGuy = new LazyGuy(getHost(),"Lazy",null);
20                 lazyGuy.start();
21                 Msg.info("Let's wait a little bit...");
22                 waitFor(10);
23                 Msg.info("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
24                 lazyGuy.resume();
25                 Msg.info("OK, goodbye now.");
26         }
27 }