You are viewing a plain text version of this content. The canonical link for it is here.
Posted to droids-commits@incubator.apache.org by th...@apache.org on 2013/01/30 13:04:26 UTC
svn commit: r1440383 - in
/incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler:
CrawlingDroid.java SimpleCrawlingDroid.java
Author: thorsten
Date: Wed Jan 30 13:04:26 2013
New Revision: 1440383
URL: http://svn.apache.org/viewvc?rev=1440383&view=rev
Log:
Moving the getNewWorker method out of the super class by making it abstract. The creation of new worker highly depends on the implementor and not the abstract class.
Modified:
incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/CrawlingDroid.java
incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/SimpleCrawlingDroid.java
Modified: incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/CrawlingDroid.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/CrawlingDroid.java?rev=1440383&r1=1440382&r2=1440383&view=diff
==============================================================================
--- incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/CrawlingDroid.java (original)
+++ incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/CrawlingDroid.java Wed Jan 30 13:04:26 2013
@@ -44,8 +44,6 @@ public abstract class CrawlingDroid exte
this.initialLocations = initialLocations;
}
- public Worker<LinkTask> getNewWorker() {
- return new CrawlingWorker(this);
- }
+ public abstract Worker<LinkTask> getNewWorker();
}
Modified: incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/SimpleCrawlingDroid.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/SimpleCrawlingDroid.java?rev=1440383&r1=1440382&r2=1440383&view=diff
==============================================================================
--- incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/SimpleCrawlingDroid.java (original)
+++ incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/SimpleCrawlingDroid.java Wed Jan 30 13:04:26 2013
@@ -24,8 +24,7 @@ import java.util.Queue;
import com.google.common.base.Preconditions;
import org.apache.droids.core.TaskMaster;
-import org.apache.droids.handle.ReportHandler;
-
+import org.apache.droids.core.Worker;
/**
* This simple CrawlingDroid uses the ReportHandler to handle all retrieved files.
@@ -51,4 +50,8 @@ public class SimpleCrawlingDroid extends
super.start();
}
+ @Override
+ public Worker<LinkTask> getNewWorker() {
+ return new CrawlingWorker(this);
+ }
}