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