1 /* Copyright (c) 2006-2007, 2010, 2013-2014, 2016. 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. */
8 import org.simgrid.msg.Msg;
9 import org.simgrid.msg.Comm;
10 import org.simgrid.msg.Host;
11 import org.simgrid.msg.Task;
12 import org.simgrid.msg.Process;
13 import org.simgrid.msg.HostFailureException;
14 import org.simgrid.msg.TaskCancelledException;
15 import org.simgrid.msg.TimeoutException;
16 import org.simgrid.msg.TransferFailureException;
18 public class Receiver extends Process {
19 public Receiver (Host host, String name) {
23 public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
24 Msg.info("Receiving on '"+ getHost().getName() + "'");
25 Task.receive(getHost().getName());
26 Msg.info("Received a task. I'm done. See you!");