mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-09 15:36:40 +00:00
Misc
* ArchiveUtils.java (checkContinue) utility method relocated from ToeThread for converting interrupt status to exception * ClassKeyMatchesRegExpDecideRule.java properly set up crawlController property for auto-wiring
This commit is contained in:
1 parent
16538f175c
commit
c7ed3e775d
2 files changed
+37
-10
No files matched your search
+11
-6
@@ -27,8 +27,8 @@ package org.archive.crawler.deciderules;
|
||||
|
||||
import org.archive.crawler.framework.CrawlController;
|
||||
import org.archive.modules.CrawlURI;
|
||||
import org.archive.modules.ProcessorURI;
|
||||
import org.archive.modules.deciderules.MatchesRegExpDecideRule;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
|
||||
/**
|
||||
@@ -41,19 +41,24 @@ public class ClassKeyMatchesRegExpDecideRule extends MatchesRegExpDecideRule {
|
||||
|
||||
private static final long serialVersionUID = 3L;
|
||||
|
||||
|
||||
final private CrawlController controller;
|
||||
protected CrawlController controller;
|
||||
public CrawlController getCrawlController() {
|
||||
return this.controller;
|
||||
}
|
||||
@Autowired
|
||||
public void setCrawlController(CrawlController controller) {
|
||||
this.controller = controller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Usual constructor.
|
||||
*/
|
||||
public ClassKeyMatchesRegExpDecideRule(CrawlController controller) {
|
||||
this.controller = controller;
|
||||
public ClassKeyMatchesRegExpDecideRule() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String getString(ProcessorURI uri) {
|
||||
protected String getString(CrawlURI uri) {
|
||||
CrawlURI curi = (CrawlURI)uri;
|
||||
return controller.getFrontier().getClassKey(curi);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user