Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move Java examples to examples/java/.
[simgrid.git] / examples / java / startKillTime / Slave.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 startKillTime;
8 import org.simgrid.msg.Host;
9 import org.simgrid.msg.HostFailureException;
10 import org.simgrid.msg.HostNotFoundException;
11 import org.simgrid.msg.TransferFailureException;
12 import org.simgrid.msg.TimeoutException;
13 import org.simgrid.msg.Msg;
14 import org.simgrid.msg.Process;
15
16 /**
17  * Lazy Guy Slave, suspends itself ASAP
18  */
19 public class Slave extends Process {
20         public Slave(Host host, String name, String[]args) {
21                 super(host,name,args);
22         } 
23         public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
24                 Msg.info("Hello!");
25                 waitFor(10.0);
26                 Msg.info("OK, goodbye now.");
27         
28   }
29 }