|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.archive.crawler.datamodel.CrawlServer
public class CrawlServer
Represents a single remote "server". A server is a service on a host. There might be more than one service on a host differentiated by a port number.
| Field Summary | |
|---|---|
protected int |
consecutiveConnectionErrors
|
static long |
MIN_ROBOTS_RETRIES
only check if robots-fetch is perhaps superfluous after this many tries |
static long |
ROBOTS_NOT_FETCHED
|
(package private) long |
robotsFetched
|
(package private) java.util.zip.Checksum |
robotstxtChecksum
|
(package private) CrawlSubstats |
substats
|
(package private) boolean |
validRobots
|
| Constructor Summary | |
|---|---|
CrawlServer(java.lang.String h)
Creates a new CrawlServer object. |
|
| Method Summary | |
|---|---|
void |
addCredentialAvatar(CredentialAvatar ca)
Add an avatar. |
java.util.Set |
getCredentialAvatars()
|
java.lang.String |
getName()
|
int |
getPort()
Get the port number for this server. |
RobotsExclusionPolicy |
getRobots()
Get the robots exclusion policy for this server. |
long |
getRobotsFetchedTime()
|
static java.lang.String |
getServerKey(CandidateURI cauri)
Get key to use doing lookup on server instances. |
SettingsHandler |
getSettingsHandler()
Get the settings handler. |
CrawlSubstats |
getSubstats()
|
boolean |
hasCredentialAvatars()
|
void |
incrementConsecutiveConnectionErrors()
|
boolean |
isValidRobots()
If true then valid robots.txt information has been retrieved. |
void |
resetConsecutiveConnectionErrors()
|
void |
setRobots(RobotsExclusionPolicy policy)
Set the robots exclusion policy for this server. |
void |
setSettingsHandler(SettingsHandler settingsHandler)
Set the settings handler to be used by this server. |
java.lang.String |
toString()
|
void |
updateRobots(CrawlURI curi)
Update the robots exclusion policy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long ROBOTS_NOT_FETCHED
public static final long MIN_ROBOTS_RETRIES
long robotsFetched
boolean validRobots
java.util.zip.Checksum robotstxtChecksum
CrawlSubstats substats
protected int consecutiveConnectionErrors
| Constructor Detail |
|---|
public CrawlServer(java.lang.String h)
h - the host string for the server.| Method Detail |
|---|
public RobotsExclusionPolicy getRobots()
public void setRobots(RobotsExclusionPolicy policy)
policy - the policy to set.public java.lang.String toString()
toString in class java.lang.Objectpublic void updateRobots(CrawlURI curi)
curi - the crawl URI containing the fetched robots.txt
java.io.IOExceptionpublic long getRobotsFetchedTime()
public java.lang.String getName()
public int getPort()
public SettingsHandler getSettingsHandler()
public void setSettingsHandler(SettingsHandler settingsHandler)
settingsHandler - the settings handler to be used by this server.public void incrementConsecutiveConnectionErrors()
public void resetConsecutiveConnectionErrors()
public java.util.Set getCredentialAvatars()
public boolean hasCredentialAvatars()
public void addCredentialAvatar(CredentialAvatar ca)
ca - Credential avatar to add to set of avatars.public boolean isValidRobots()
public static java.lang.String getServerKey(CandidateURI cauri)
throws org.apache.commons.httpclient.URIException
cauri - CandidateURI we're to get server key for.
org.apache.commons.httpclient.URIExceptionpublic CrawlSubstats getSubstats()
getSubstats in interface CrawlSubstats.HasCrawlSubstats
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||