org.niocchi.core
Interface URLPool

All Known Implementing Classes:
SimpleFileURLPool, SimpleListURLPool, TimeoutURLPool

public interface URLPool


Method Summary
 Query getNextQuery()
           
 boolean hasNextQuery()
           
 void setProcessed(Query query)
          This method is called by the crawler when the query has been processed.
 

Method Detail

hasNextQuery

boolean hasNextQuery()
Returns:
true if there is at least one query to crawl (i.e. getNextQuery will return a query at some point), false if no more queries to crawl (a call to getNextQuery will throw an URLPoolException).

getNextQuery

Query getNextQuery()
                   throws URLPoolException
Returns:
null if no query is yet available, otherwise return a Query. Throws URLPoolException is no query will be available (a call to hasNextQuery() must returns false).
Throws:
URLPoolException

setProcessed

void setProcessed(Query query)
This method is called by the crawler when the query has been processed. That gives the oportunity to the url pool to implement specific behaviors (for instance, send back the query to the crawler if it got a timeout.