|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.pogamut.posh.explorer.Crawler<T>
T - what is crawler crawlingpublic abstract class Crawler<T>
One time use class for crawling the primitives and providing them to the explorer.
| Field Summary | |
|---|---|
protected Set<T> |
cache
Set of all values found by this crawler. |
protected Set<T> |
cacheUm
Unmodifiable wrapper of cache. |
protected Set<CrawlerListener<T>> |
listeners
Set of listeners for crawler. |
protected Set<CrawlerListener<T>> |
listenersUm
Unmodifiable wrapper of listeners. |
| Constructor Summary | |
|---|---|
Crawler()
|
|
| Method Summary | |
|---|---|
boolean |
addListener(CrawlerListener<T> listener)
Add listener for crawler. |
abstract void |
crawl()
Start crawling for the primitives. |
abstract void |
die()
Terminate the crawler, once this is called, crawler should die and liseners shouldn't recieve any further messages. |
abstract String |
getDescription()
Get description of the primitive. |
abstract String |
getName()
Get name of primitive this provider is crawling |
protected void |
notifyCrawledData(Collection<T> data)
Notify all listeners that we have new data as result of diligent crawling. |
protected void |
notifyFinished(boolean error)
Notify all listeners that crawling has been finished. |
protected void |
notifyStarted()
Notify all listeners that crawling has started. |
boolean |
removeListener(CrawlerListener<T> listener)
Remove crawler listener from set of listeners. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Set<CrawlerListener<T>> listeners
unmodifiable version.
protected final Set<CrawlerListener<T>> listenersUm
protected final Set<T> cache
protected final Set<T> cacheUm
| Constructor Detail |
|---|
public Crawler()
| Method Detail |
|---|
public abstract String getName()
public abstract String getDescription()
public abstract void crawl()
CrawlerListenerpublic abstract void die()
CrawlerListener#finished(boolean) .
public final boolean addListener(CrawlerListener<T> listener)
listener - listener to add
public final boolean removeListener(CrawlerListener<T> listener)
listener - listener to remove
protected final void notifyStarted()
protected final void notifyCrawledData(Collection<T> data)
protected final void notifyFinished(boolean error)
error - am I ending due to an error?
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||