|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--websphinx.EventLog
Crawling monitor that writes messages to standard output or a file. Acts as both a CrawlListener (monitoring start and end of the crawl) and as a LinkListener (monitoring page retrieval).
Field Summary | |
(package private) boolean |
onlyNetworkEvents
|
(package private) java.io.PrintWriter |
stream
|
Constructor Summary | |
EventLog()
Make a EventLog that writes to standard output. |
|
EventLog(java.io.OutputStream out)
Make a EventLog that writes to a stream. |
|
EventLog(java.lang.String filename)
Make a EventLog that writes to a file. |
Method Summary | |
void |
cleared(CrawlEvent event)
Notify that the crawler's state was cleared. |
void |
crawled(LinkEvent event)
Notify that a link event occured. |
boolean |
getOnlyNetworkEvents()
Test whether logger prints only network-related LinkEvents. |
static void |
monitor(Crawler crawler)
Create a EventLog that prints to standard error and attach it to a crawler. |
void |
paused(CrawlEvent event)
Notify that the crawler paused. |
void |
setOnlyNetworkEvents(boolean flag)
Set whether logger prints only network-related LinkEvents. |
void |
started(CrawlEvent event)
Notify that the crawler started. |
void |
stopped(CrawlEvent event)
Notify that the crawler has stopped. |
void |
timedOut(CrawlEvent event)
Notify that the crawler timed out. |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.io.PrintWriter stream
boolean onlyNetworkEvents
Constructor Detail |
public EventLog()
public EventLog(java.io.OutputStream out)
public EventLog(java.lang.String filename) throws java.io.IOException
filename
- File to which crawling event messages are writtenMethod Detail |
public void setOnlyNetworkEvents(boolean flag)
flag
- true iff only network LinkEvents should be loggedpublic boolean getOnlyNetworkEvents()
public void started(CrawlEvent event)
started
in interface CrawlListener
public void stopped(CrawlEvent event)
stopped
in interface CrawlListener
public void cleared(CrawlEvent event)
cleared
in interface CrawlListener
public void timedOut(CrawlEvent event)
timedOut
in interface CrawlListener
public void paused(CrawlEvent event)
paused
in interface CrawlListener
public void crawled(LinkEvent event)
crawled
in interface LinkListener
public static void monitor(Crawler crawler)
crawler
- Crawler to be monitored
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |