|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
dcf.tasks.HTMLCrawlerTask
Implements a distributed web crawler. The task is a Vector of URLs
to visit. It is a circular task so when it is done new tasks are created
with the links found by the solver.
| Constructor Summary | |
HTMLCrawlerTask()
|
|
| Method Summary | |
void |
addMessage(dcf.tasks.String str)
Post a message on to the parent |
void |
addResult(java.lang.Object obj)
|
void |
divide()
Divide the task into parts - if the data is a List it is already divided. |
java.util.Vector |
generate()
Generates a new HTMLCrawlerTask using the new links we've found |
java.lang.Object |
getData()
|
dcf.tasks.String |
getName()
|
java.lang.Object |
getResults()
|
int |
getSize()
|
boolean |
hasMore()
|
boolean |
isCircular()
The Distributer will call this method when a Task is returned by the client. If the task is circualr the client will call the generate() method to create additinal tasks. |
java.lang.Object |
next()
|
void |
processResults()
This is where we save whatever we want to save on the server side. |
void |
setData(java.lang.Object obj)
|
void |
setName(dcf.tasks.String n)
|
void |
setParent(Worker w)
Sets this workers parent |
void |
setProgress(float i)
Sets the task progress (used by the Solver to set it to the Worker) |
| Methods inherited from interface dcf.server.Task |
setName |
| Constructor Detail |
public HTMLCrawlerTask()
| Method Detail |
public void setData(java.lang.Object obj)
setData in interface Taskdcf.server.Taskobj - Most commonly a Vector of data to be processed.public java.lang.Object getData()
getData in interface Taskpublic void divide()
Taskdivide in interface Taskpublic boolean hasMore()
hasMore in interface Taskpublic java.lang.Object next()
next in interface Taskpublic int getSize()
getSize in interface Taskpublic void addResult(java.lang.Object obj)
addResult in interface Taskdcf.server.Taskobj - An Object to add to the results.public java.lang.Object getResults()
getResults in interface Taskpublic void setName(dcf.tasks.String n)
public dcf.tasks.String getName()
getName in interface Taskpublic boolean isCircular()
TaskisCircular in interface Taskdcf.server.Taskpublic java.util.Vector generate()
generate in interface Taskpublic void processResults()
processResults in interface Taskpublic void setParent(Worker w)
setParent in interface Taskw - The parent worker.public void addMessage(dcf.tasks.String str)
str - The message to post.public void setProgress(float i)
i - The progress for this task.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||