1 /* 2 * Created on Dec 22, 2008 3 * Created by Paul Gardner 4 * 5 * Copyright (C) Azureus Software, Inc, All Rights Reserved. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 20 21 package org.gudy.azureus2.plugins.peers; 22 23 public interface 24 PeerManagerEvent 25 { 26 /** Peer Added: Use getPeer */ 27 public static final int ET_PEER_ADDED = 1; // getPeer 28 /** Peer Removed: Use getPeer */ 29 public static final int ET_PEER_REMOVED = 2; // getPeer 30 /** Peer Discovered: getPeerDescriptor for discovery information; getPeer() returns peer that discovered it. */ 31 public static final int ET_PEER_DISCOVERED = 3; // getPeerDescriptor; opt getPeer if discovered from a Peer 32 /** Peer Sent Bad Data: {@link #getPeer()}; {@link #getData()} to retrieve {@link Integer} piece number */ 33 public static final int ET_PEER_SENT_BAD_DATA = 4; // getPeer; getData -> Integer piece number 34 35 /** Piece Activated: Use {@link #getPeer()}; {@link #getData()} returns Piece Object */ 36 public static final int ET_PIECE_ACTIVATED = 5; // opt getPeer; getData -> Piece object 37 /** Piece Deactivated: Use {@link #getPeer()}; {@link #getData()} returns Piece Object */ 38 public static final int ET_PIECE_DEACTIVATED = 6; // getData -> Piece object 39 /** Piece Completion Changed: Use {@link #getPeer()}; {@link #getData()} returns Piece Object */ 40 public static final int ET_PIECE_COMPLETION_CHANGED = 7; // getData -> Piece object 41 42 public PeerManager getPeerManager()43 getPeerManager(); 44 45 public int getType()46 getType(); 47 48 public Peer getPeer()49 getPeer(); 50 51 public PeerDescriptor getPeerDescriptor()52 getPeerDescriptor(); 53 54 public Object getData()55 getData(); 56 } 57