|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.importing.crawler.web.fetcher.SimpleFetcher
public class SimpleFetcher
Example implementation of a Fetcher service. It uses GET method to access the resource.
| Constructor Summary | |
|---|---|
SimpleFetcher()
initialize HttpClient with disabled redirects. |
|
| Method Summary | |
|---|---|
void |
crawl(Record linkRecord,
AnyMap parameters,
TaskLog taskLog)
invoked by WebCrawlerWorker to resolve the URL in an input record. |
void |
fetch(Record crawledRecord,
AnyMap parameters,
TaskLog taskLog)
invoked by WebFetcherWorker to get the content of a resource for which the crawler did not already attach the content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleFetcher()
| Method Detail |
|---|
public void crawl(Record linkRecord,
AnyMap parameters,
TaskLog taskLog)
throws WebCrawlerException
Fetcher
crawl in interface FetcherlinkRecord - record containing the URL and maybe additional information necessary to access the web resource.parameters - configuration parameters, may be null.taskLog - log facility provided by worker frame.
WebCrawlerException - if resource cannot be crawled. If recoverable the request should be retried later, else the record should
be skipped by the crawler worker.
public void fetch(Record crawledRecord,
AnyMap parameters,
TaskLog taskLog)
throws WebCrawlerException
Fetcher
fetch in interface Fetcherparameters - configuration parameters, may be null.taskLog - log facility provided by worker frame.
WebCrawlerException - if resource cannot be fetched. If recoverable the request should be retried later, else the record should
be skipped by the crawler worker.
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||