public final class SequentialCrawler<T extends FetchResult> extends Object implements Crawler<T>
| Constructor and Description |
|---|
SequentialCrawler(int fetches,
Extractor<T> extractor,
ResultWriter<T> writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
process(String... seedUrl)
Starts the crawler, starting by the seedURL.
|
void |
setup(int fetches,
Extractor<T> extractor,
ResultWriter<T> writer)
Setups this crawler.
|
public SequentialCrawler(int fetches,
Extractor<T> extractor,
ResultWriter<T> writer)
throws IOException
IOExceptionpublic final void setup(int fetches,
Extractor<T> extractor,
ResultWriter<T> writer)
throws IOException
Crawlersetup in interface Crawler<T extends FetchResult>fetches - how many maximum fetches it should do.extractor - the given Extractor to extract a
FetchResult.writer - the ResultWriter to write the result to a sink.IOExceptionpublic final void process(String... seedUrl) throws InterruptedException, ExecutionException
Crawlerprocess in interface Crawler<T extends FetchResult>InterruptedExceptionExecutionExceptionCopyright © 2016. All rights reserved.