|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.droids.AbstractDroid
org.apache.droids.HelloCrawler
public class HelloCrawler
Default implementation of a crawler. The crawler needs a starting url and extract then the next links with the help of the defaultWorker. Extend this method for your own Droid.
Constructor Summary | |
---|---|
HelloCrawler()
|
Method Summary | |
---|---|
DelayTimer |
getDelayTimer()
Get the DelayTimer implementation that we want to use. |
String |
getUrl()
Return the initial url |
Worker |
getWorker()
Get the default worker for the class. |
void |
initQueue()
Initialize the queue. |
void |
run()
Do the work (whatever it is defined in the Droid and their workers) |
void |
setDelayTimer(DelayTimer delayTimer)
|
void |
setUrl(String url)
Set the initial url |
long |
startWorkers()
Will start a new worker. |
Methods inherited from class org.apache.droids.AbstractDroid |
---|
finishedWorker, getCore, getFreeSlots, getMaxThreads, getPool, getQueue, getRunningThreads, getRunningWorker, getTaskDate, setCore, setFreeSlots, setMaxThreads, setPool, setQueue, setRunningThreads, setRunningWorker, setTaskDate, shutdownAndAwaitTermination |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HelloCrawler()
Method Detail |
---|
public void run()
Runnable.run()
public long startWorkers()
AbstractDroid
startWorkers
in class AbstractDroid
public void initQueue() throws DroidsException
Droid
DroidsException
public String getUrl()
public void setUrl(String url)
url
- the initial urlpublic DelayTimer getDelayTimer()
public void setDelayTimer(DelayTimer delayTimer) throws DroidsException
DroidsException
public Worker getWorker() throws DroidsException
AbstractDroid
getWorker
in class AbstractDroid
DroidsException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |