Logo AND Algorithmique Numérique Distribuée

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