|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.ResponseVerifier
Records information about queries so that responses can be validated later. Typical use is to call record(..) on an outgoing query request, and score/matchesType/isMandragoreWorm on each incoming response.
Constructor Summary | |
ResponseVerifier()
|
Method Summary | |
boolean |
isMandragoreWorm(byte[] guid,
Response response)
Returns true if the given response is an instance of the Mandragore Worm. |
boolean |
matchesType(byte[] guid,
Response response)
Returns true if response has the same media type as the corresponding query request the given GUID. |
void |
record(QueryRequest qr)
Same as record(qr, null). |
void |
record(QueryRequest qr,
MediaType type)
|
static int |
score(java.lang.String query,
LimeXMLDocument richQuery,
RemoteFileDesc response)
Returns the score of the given response compared to the given query. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ResponseVerifier()
Method Detail |
public void record(QueryRequest qr)
public void record(QueryRequest qr, MediaType type)
public static int score(java.lang.String query, LimeXMLDocument richQuery, RemoteFileDesc response)
query
- the query keyword string sentrichQuery
- the XML metadata string sent, or null if noneresponse
- the response to score, converted to RemoteFileDesc
public boolean matchesType(byte[] guid, Response response)
public boolean isMandragoreWorm(byte[] guid, Response response)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |