2 * Copyright (c) 2006-2013. The SimGrid Team.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package.
8 package master_slave_kill
10 import org.simgrid.msg.HostFailureException
11 import org.simgrid.msg.HostNotFoundException
12 import org.simgrid.msg.Msg
13 import org.simgrid.msg.MsgException
14 import org.simgrid.msg.Task
15 import org.simgrid.msg.TimeoutException
16 import org.simgrid.msg.TransferFailureException
17 import org.simgrid.msg.Process
19 class Slave(hostname:String, name:String) extends Process(hostname, name) {
20 def main(args:Array[String]) {
21 Msg.info("Slave Hello!")
23 val task = new FinalizeTask();
24 Msg.info("Send Mail1!");
28 Task.receive("mail2");
30 case e:MsgException => {Msg.debug("Received failed")
33 Msg.info("Receive Mail2!")