2 * Copyright (c) 2007-2008 Fabrizio Frioli, Michele Pedrolli
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 * Please send your questions/suggestions to:
20 * {fabrizio.frioli, michele.pedrolli} at studenti dot unitn dot it
24 package example.bittorrent;
26 import peersim.core.*;
29 * This class defines a simple message.
30 * A simple message has its type and the reference of the sender node.
33 public class SimpleMsg extends SimpleEvent {
36 * The sender of the message.
38 protected Node sender;
44 * Initializes the simple message with its type and sender.
45 * @param type The identifier of the type of the message
46 * @param sender The sender of the message
48 public SimpleMsg(int type, Node sender){
54 * Gets the sender of the message.
55 * @return The sender of the message.
57 public Node getSender(){