|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.limegroup.gnutella.QueryUnicaster
public final class 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. |
| Constructor Summary | |
|---|---|
QueryUnicaster(NetworkManager networkManager,
QueryRequestFactory queryRequestFactory,
ScheduledExecutorService backgroundExecutor,
com.google.inject.Provider<MessageRouter> messageRouter,
com.google.inject.Provider<UDPService> udpService,
PingRequestFactory pingRequestFactory)
|
|
| Method Summary | |
|---|---|
boolean |
addQuery(QueryRequest query,
ReplyHandler reference)
|
void |
addUnicastEndpoint(InetAddress address,
int port)
Just feed me ExtendedEndpoints - I'll check if I could use them or not. |
String |
getServiceName()
|
GUESSEndpoint |
getUnicastEndpoint()
Returns a GUESSEndpoint from the current cache of GUESS endpoints. |
List<GUESSEndpoint> |
getUnicastEndpoints()
Returns a List of unicast Endpoints. |
void |
handleQueryKeyPong(PingReply pr)
Feed me AddressSecurityToken pongs so I can query people.... |
void |
handleQueryReply(QueryReply qr)
Feed me QRs so I can keep track of stuff. |
void |
initialize()
|
void |
start()
Starts the query unicaster thread. |
void |
stop()
|
| 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
| Constructor Detail |
|---|
@Inject
public QueryUnicaster(NetworkManager networkManager,
QueryRequestFactory queryRequestFactory,
ScheduledExecutorService backgroundExecutor,
com.google.inject.Provider<MessageRouter> messageRouter,
com.google.inject.Provider<UDPService> udpService,
PingRequestFactory pingRequestFactory)
| Method Detail |
|---|
public List<GUESSEndpoint> getUnicastEndpoints()
public GUESSEndpoint getUnicastEndpoint()
public void start()
start in interface Servicepublic String getServiceName()
getServiceName in interface Servicepublic void initialize()
initialize in interface Servicepublic void stop()
stop in interface Service
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(InetAddress address,
int port)
public void handleQueryReply(QueryReply qr)
public void handleQueryKeyPong(PingReply pr)
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||