1 /*
2  * File    : TRTrackerResponse.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 import java.net.URL;
26 import java.util.Map;
27 
28 import org.gudy.azureus2.core3.util.HashWrapper;
29 
30 public interface
31 TRTrackerAnnouncerResponse
32 {
33 	public static final int	ST_OFFLINE			= 0;
34 	public static final int ST_REPORTED_ERROR	= 1;
35 	public static final int	ST_ONLINE			= 2;
36 
37 	/**
38 	 * Returns the current status of the tracker
39 	 * @return	see above ST_ set
40 	 */
41 
42 	public int
getStatus()43 	getStatus();
44 
45 	public String
getStatusString()46 	getStatusString();
47 
48 	public HashWrapper
getHash()49 	getHash();
50 
51 	/**
52 	 * This value is always available
53 	 * @return time to wait before requerying tracker
54 	 */
55 
56 	public long
getTimeToWait()57 	getTimeToWait();
58 
59 	/**
60 	 * Returns any additional textual information associated with reponse.
61 	 * If the status is ST_REPORTED_ERROR, this will return the error description
62 	 * (possibly directly from the tracker).
63 	 *
64 	 * @return	Additional information
65 	 */
66 
67 	public String
getAdditionalInfo()68 	getAdditionalInfo();
69 
70 	/**
71 	 *
72 	 * @return	peers reported by tracker. this will include the local peer as well
73 	 */
74 
75 	public TRTrackerAnnouncerResponsePeer[]
getPeers()76 	getPeers();
77 
78 	public void
setPeers( TRTrackerAnnouncerResponsePeer[] peers )79 	setPeers(
80 		TRTrackerAnnouncerResponsePeer[]	peers );
81 
82 	public Map
getExtensions()83 	getExtensions();
84 
85 	public URL
getURL()86 	getURL();
87 
88 	public int
getScrapeCompleteCount()89 	getScrapeCompleteCount();
90 
91 	public int
getScrapeIncompleteCount()92 	getScrapeIncompleteCount();
93 
94 	public int
getScrapeDownloadedCount()95 	getScrapeDownloadedCount();
96 
97 	public void
print()98 	print();
99 }
100