|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.bootstrap.BootstrapServerManager
A list of GWebCache servers. Provides methods to fetch address addresses from these servers, find the addresses of more such servers, and update the addresses of these and other servers.
Information on the GWebCache protocol can be found at http://zero-g.net/gwebcache/specs.html
Field Summary | |
static int |
MAX_HOSTS_PER_REQUEST
The maximum number of hosts to try per request. |
static int |
UPDATE_DELAY_MSEC
The amount of time in milliseconds between update requests. |
Constructor Summary | |
BootstrapServerManager(HostCatcher catcher)
|
Method Summary | |
void |
addBootstrapServer(BootstrapServer server)
Adds server to this. |
void |
fetchBootstrapServersAsync()
Asynchronously fetches other bootstrap URLs and stores them in this. |
void |
fetchEndpointsAsync()
Asynchronously fetches host addresses from bootstrap servers and stores them in the HostCatcher. |
java.util.Iterator |
getBootstrapServers()
Returns an iterator of the bootstrap servers in this, each as a BootstrapServer, in any order. |
protected int |
randomServer()
Returns an random valid index of SERVERS. |
void |
sendUpdatesAsync(Endpoint myIP)
Asynchronously sends an update message to a cache. |
protected int |
size()
Returns the number of servers in this. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int MAX_HOSTS_PER_REQUEST
public static int UPDATE_DELAY_MSEC
Constructor Detail |
public BootstrapServerManager(HostCatcher catcher)
catcher
- where to deposit fetched endpoints.Method Detail |
public void addBootstrapServer(BootstrapServer server)
public java.util.Iterator getBootstrapServers()
public void fetchBootstrapServersAsync()
public void fetchEndpointsAsync()
public void sendUpdatesAsync(Endpoint myIP)
myIP
- my listening address and port
NullPointerException
- if the ip param is nullprotected int randomServer()
protected int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |