LimeWire Consolidated API

com.limegroup.gnutella
Interface ResponseVerifier

All Known Implementing Classes:
ResponseVerifierImpl

public interface 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.


Method Summary
 boolean isMandragoreWorm(byte[] guid, Response response)
          Returns true if the given response is an instance of the Mandragore Worm.
 boolean matchesQuery(byte[] guid, Response response)
           
 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)
           
 

Method Detail

record

void record(QueryRequest qr)
Same as record(qr, null).


record

void record(QueryRequest qr,
            MediaType type)

matchesQuery

boolean matchesQuery(byte[] guid,
                     Response response)

matchesType

boolean matchesType(byte[] guid,
                    Response response)
Returns true if response has the same media type as the corresponding query request the given GUID. In the rare case that guid is not known (because this' buffers overflowed), conservatively returns true.


isMandragoreWorm

boolean isMandragoreWorm(byte[] guid,
                         Response response)
Returns true if the given response is an instance of the Mandragore Worm. This worm responds to the query "x" with a 8KB file named "x.exe". In the rare case that the query for guid can't be found returns false.


LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.