Class RobotRules
- java.lang.Object
-
- crawlercommons.robots.BaseRobotRules
-
- com.digitalpebble.stormcrawler.protocol.RobotRules
-
- All Implemented Interfaces:
Serializable
public class RobotRules extends crawlercommons.robots.BaseRobotRules
Wrapper for BaseRobotRules which tracks the number of requests and length of the responses needed to get the rules. If the array returned by getContentLengthFetched() is empty, then the rules were obtained from the cache.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RobotRules(crawlercommons.robots.BaseRobotRules base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSitemap(String sitemap)
boolean
equals(Object obj)
int[]
getContentLengthFetched()
Returns the number of bytes fetched per request when not cached *long
getCrawlDelay()
List<String>
getSitemaps()
int
hashCode()
boolean
isAllowAll()
boolean
isAllowed(String url)
boolean
isAllowNone()
boolean
isDeferVisits()
void
setContentLengthFetched(int[] bytesFetched)
Returns the number of bytes fetched per request when not cached *void
setCrawlDelay(long crawlDelay)
void
setDeferVisits(boolean deferVisits)
-
-
-
Method Detail
-
isAllowed
public boolean isAllowed(String url)
- Specified by:
isAllowed
in classcrawlercommons.robots.BaseRobotRules
-
isAllowAll
public boolean isAllowAll()
- Specified by:
isAllowAll
in classcrawlercommons.robots.BaseRobotRules
-
isAllowNone
public boolean isAllowNone()
- Specified by:
isAllowNone
in classcrawlercommons.robots.BaseRobotRules
-
getContentLengthFetched
public int[] getContentLengthFetched()
Returns the number of bytes fetched per request when not cached *
-
setContentLengthFetched
public void setContentLengthFetched(int[] bytesFetched)
Returns the number of bytes fetched per request when not cached *
-
getCrawlDelay
public long getCrawlDelay()
- Overrides:
getCrawlDelay
in classcrawlercommons.robots.BaseRobotRules
-
isDeferVisits
public boolean isDeferVisits()
- Overrides:
isDeferVisits
in classcrawlercommons.robots.BaseRobotRules
-
getSitemaps
public List<String> getSitemaps()
- Overrides:
getSitemaps
in classcrawlercommons.robots.BaseRobotRules
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcrawlercommons.robots.BaseRobotRules
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classcrawlercommons.robots.BaseRobotRules
-
setCrawlDelay
public void setCrawlDelay(long crawlDelay)
- Overrides:
setCrawlDelay
in classcrawlercommons.robots.BaseRobotRules
-
setDeferVisits
public void setDeferVisits(boolean deferVisits)
- Overrides:
setDeferVisits
in classcrawlercommons.robots.BaseRobotRules
-
addSitemap
public void addSitemap(String sitemap)
- Overrides:
addSitemap
in classcrawlercommons.robots.BaseRobotRules
-
-