|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--websphinx.LinkEvent
Link event. A LinkEvent is issued when the crawler starts or stops retrieving a link, and when it makes a decision about a link.
Field Summary | |
static int |
ALREADY_VISITED
Link has already been visited during the crawl, so it was skipped. |
(package private) Crawler |
crawler
|
static int |
DOWNLOADED
Link has been retrieved |
static int |
ERROR
An error occurred in retrieving the page. |
static java.lang.String[] |
eventName
Map from id code (RETRIEVING) to name ("retrieving") |
(package private) java.lang.Throwable |
exception
|
(package private) int |
id
|
(package private) Link |
link
|
static int |
NONE
No event occured on this link yet. |
static int |
QUEUED
Link was accepted by walk() and is waiting to be downloaded |
static int |
RETRIEVING
Link is being retrieved |
static int |
SKIPPED
Link was rejected by shouldVisit() |
static int |
TOO_DEEP
Link was accepted by walk() but exceeds the maximum depth from the start set. |
static int |
VISITED
Link has been thoroughly processed by crawler |
Constructor Summary | |
LinkEvent(Crawler crawler,
int id,
Link link)
Make a LinkEvent. |
|
LinkEvent(Crawler crawler,
int id,
Link link,
java.lang.Throwable exception)
Make a LinkEvent for an error. |
Method Summary | |
Crawler |
getCrawler()
Get crawler that generated the event |
java.lang.Throwable |
getException()
Get exception related to this event. |
int |
getID()
Get event id |
Link |
getLink()
Get link to which this event occurred. |
java.lang.String |
getName()
Get event name (string equivalent to its ID) |
java.lang.String |
toString()
Convert this event to a String describing it. |
Methods inherited from class java.lang.Object |
|
Field Detail |
Crawler crawler
int id
Link link
java.lang.Throwable exception
public static final int NONE
public static final int SKIPPED
public static final int ALREADY_VISITED
public static final int TOO_DEEP
public static final int QUEUED
public static final int RETRIEVING
public static final int ERROR
public static final int DOWNLOADED
public static final int VISITED
public static final java.lang.String[] eventName
Constructor Detail |
public LinkEvent(Crawler crawler, int id, Link link)
crawler
- Crawler that generated this eventid
- event code, like LinkEvent.RETRIEVINGlink
- Link on which this event occurredpublic LinkEvent(Crawler crawler, int id, Link link, java.lang.Throwable exception)
crawler
- Crawler that generated this eventid
- Event code, usually ERRORlink
- Link on which this event occurredexception
- ThrowableMethod Detail |
public Crawler getCrawler()
public int getID()
public java.lang.String getName()
public Link getLink()
public java.lang.Throwable getException()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |