com.limegroup.gnutella.xml
Class RichQueryHandler

java.lang.Object
  extended bycom.limegroup.gnutella.xml.RichQueryHandler

public class RichQueryHandler
extends java.lang.Object

Used to handle Rich Queries. The FileManager will check to see if the Rich Query part of the message is empty. If not then it will grab and instance of this class and use it to find a set of Responses for that Query.

Has a singleton pattern.


Constructor Summary
RichQueryHandler()
           
 
Method Summary
static RichQueryHandler instance()
          Call this method to get the singleton
 Response[] query(LimeXMLDocument queryDoc)
          Returns an array of Responses that correspond to documents that have a match with the XMLQuery String Warning: Returns null if the XMLQuery is malformed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RichQueryHandler

public RichQueryHandler()
Method Detail

instance

public static RichQueryHandler instance()
Call this method to get the singleton


query

public Response[] query(LimeXMLDocument queryDoc)
Returns an array of Responses that correspond to documents that have a match with the XMLQuery String Warning: Returns null if the XMLQuery is malformed.

This method is synchronized. Because if two threads from different connections make two different queries. Then all bad things can happen.