|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.QueryUnicaster
This class runs a single thread which sends unicast UDP queries to a master list of unicast-enabled hosts every n milliseconds. It interacts with HostCatcher to find unicast-enabled hosts. It also allows for stopping of individual queries by reply counts.
Field Summary | |
static int |
ITERATION_TIME
The time in between successive unicast queries. |
static int |
MAX_ENDPOINTS
The max number of unicast pongs to store. |
static int |
MIN_ENDPOINTS
The number of Endpoints where you should start sending pings to them. |
static long |
ONE_HOUR
One hour in milliseconds. |
Method Summary | |
boolean |
addQuery(QueryRequest query,
ReplyHandler reference)
|
void |
addUnicastEndpoint(java.net.InetAddress address,
int port)
Just feed me ExtendedEndpoints - I'll check if I could use them or not. |
GUESSEndpoint |
getUnicastEndpoint()
Returns a GUESSEndpoint from the current cache of GUESS endpoints. |
java.util.List |
getUnicastEndpoints()
Returns a List of unicast Endpoints. |
void |
handleQueryKeyPong(PingReply pr)
Feed me QueryKey pongs so I can query people.... |
void |
handleQueryReply(QueryReply qr)
Feed me QRs so I can keep track of stuff. |
static QueryUnicaster |
instance()
Need to call initialize() to make sure I'm running! |
void |
start()
Starts the query unicaster thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ITERATION_TIME
public static final int MIN_ENDPOINTS
public static final int MAX_ENDPOINTS
public static final long ONE_HOUR
Method Detail |
public static QueryUnicaster instance()
public java.util.List getUnicastEndpoints()
public GUESSEndpoint getUnicastEndpoint()
public void start()
public boolean addQuery(QueryRequest query, ReplyHandler reference)
query
- The Query to add, to start unicasting.reference
- The originating connection. OK if NULL.
public void addUnicastEndpoint(java.net.InetAddress address, int port)
public void handleQueryReply(QueryReply qr)
public void handleQueryKeyPong(PingReply pr)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |