|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.search.QueryDispatcher
This class handles the thread that dispatches dynamic queries for Ultrapeers. This maintains the data for all active queries for this Ultrapeer and any of its leaves, also providing an interface for removing active queries. Queries may be removed, for example, when a leaf node with an active query disconnects from the Ultrapeer.
Method Summary | |
void |
addQuery(QueryHandler handler)
Adds the specified QueryHandler to the list of queries to process. |
static QueryDispatcher |
instance()
Instance accessor for the QueryDispatcher. |
void |
removeReplyHandler(ReplyHandler handler)
This method removes all queries for the given ReplyHandler instance. |
void |
run()
Starts the thread that processes queries. |
void |
start()
Schudules the processing of queries for execution. |
void |
updateLeafResultsForQuery(GUID queryGUID,
int numResults)
Updates the relevant QueryHandler with result stats from the leaf. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static QueryDispatcher instance()
public void start()
public void addQuery(QueryHandler handler)
handler
- the QueryHandler instance to addpublic void removeReplyHandler(ReplyHandler handler)
handler
- the handler that should have it's queries removedpublic void updateLeafResultsForQuery(GUID queryGUID, int numResults)
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |