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;
27 * This class defines a simple event. A simple event is characterized only
30 public class SimpleEvent {
33 * The identifier of the type of the event.
35 * The available identifiers for event type are:<br/>
37 * <li>1 is KEEP_ALIVE message</li>
38 * <li>2 is CHOKE message</li>
39 * <li>3 is UNCHOKE message</li>
40 * <li>4 is INTERESTED message</li>
41 * <li>5 is NOT_INTERESTED message</li>
42 * <li>6 is HAVE message</li>
43 * <li>7 is BITFIELD message</li>
44 * <li>8 is REQUEST message</li>
45 * <li>9 is PIECE message</li>
46 * <li>10 is CANCEL message</li>
47 * <li>11 is TRACKER message</li>
48 * <li>12 is PEERSET message</li>
49 * <li>13 is CHOKE_TIME event</li>
50 * <li>14 is OPTUNCHK_TIME event</li>
51 * <li>15 is ANTISNUB_TIME event</li>
52 * <li>16 is CHECKALIVE_TIME event</li>
53 * <li>17 is TRACKERALIVE_TIME event</li>
54 * <li>18 is DOWNLOAD_COMPLETED event</li>
63 * Initializes the type of the event.
64 * @param type The identifier of the type of the event
66 public SimpleEvent(int type){
71 * Gets the type of the event.
72 * @return The type of the current event.