1 /* Copyright (c) 2006-2014. The SimGrid Team.
2 * All rights reserved. */
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. */
7 package master_slave_kill;
8 import org.simgrid.msg.HostFailureException;
9 import org.simgrid.msg.HostNotFoundException;
10 import org.simgrid.msg.Msg;
11 import org.simgrid.msg.MsgException;
12 import org.simgrid.msg.Task;
13 import org.simgrid.msg.TimeoutException;
14 import org.simgrid.msg.TransferFailureException;
15 import org.simgrid.msg.NativeException;
16 import org.simgrid.msg.Process;
18 import master_slave_kill.FinalizeTask;
20 public class Slave extends Process {
21 public Slave(String hostname, String name) throws HostNotFoundException {
22 super(hostname, name);
24 public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException, NativeException {
25 Msg.info("Slave Hello!");
27 FinalizeTask task = new FinalizeTask();
28 Msg.info("Send Mail1!");
32 Task.receive("mail2");
33 } catch (MsgException e) {
34 Msg.debug("Received failed");
37 Msg.info("Receive Mail2!");