1 /* 2 * File : TRTrackerClientFactory.java 3 * Created : 5 Oct. 2003 4 * By : Parg 5 * 6 * Azureus - a Java Bittorrent client 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details ( see the LICENSE file ). 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 */ 22 23 package org.gudy.azureus2.core3.tracker.client; 24 25 26 import org.gudy.azureus2.core3.torrent.*; 27 import org.gudy.azureus2.core3.tracker.client.impl.TRTrackerAnnouncerFactoryImpl; 28 29 public class 30 TRTrackerAnnouncerFactory 31 { 32 public static TRTrackerAnnouncer create( TOTorrent torrent )33 create( 34 TOTorrent torrent ) 35 36 throws TRTrackerAnnouncerException 37 { 38 return( create( torrent, null )); 39 } 40 41 public static TRTrackerAnnouncer create( TOTorrent torrent, boolean manual )42 create( 43 TOTorrent torrent, 44 boolean manual ) 45 46 throws TRTrackerAnnouncerException 47 { 48 return( TRTrackerAnnouncerFactoryImpl.create( torrent, null, manual )); 49 } 50 51 public static TRTrackerAnnouncer create( TOTorrent torrent, DataProvider provider )52 create( 53 TOTorrent torrent, 54 DataProvider provider ) 55 56 throws TRTrackerAnnouncerException 57 { 58 return( TRTrackerAnnouncerFactoryImpl.create( torrent, provider, false )); 59 } 60 61 public static void addListener( TRTrackerAnnouncerFactoryListener l )62 addListener( 63 TRTrackerAnnouncerFactoryListener l ) 64 { 65 TRTrackerAnnouncerFactoryImpl.addListener(l); 66 } 67 68 public static void removeListener( TRTrackerAnnouncerFactoryListener l )69 removeListener( 70 TRTrackerAnnouncerFactoryListener l ) 71 { 72 TRTrackerAnnouncerFactoryImpl.removeListener(l); 73 } 74 75 76 public interface 77 DataProvider 78 { 79 public String[] getNetworks()80 getNetworks(); 81 } 82 } 83