com.norconex.collector.http.handler.impl
Class DefaultDelayResolver

java.lang.Object
  extended by com.norconex.collector.http.handler.impl.DefaultDelayResolver
All Implemented Interfaces:
IDelayResolver, IXMLConfigurable, Serializable

public class DefaultDelayResolver
extends Object
implements IDelayResolver, IXMLConfigurable

See Also:
Serialized Form

Nested Class Summary
static class DefaultDelayResolver.DelaySchedule
           
 
Field Summary
static long DEFAULT_DELAY
           
 
Constructor Summary
DefaultDelayResolver()
           
 
Method Summary
 void delay(RobotsTxt robotsTxt, String url)
           
 long getDefaultDelay()
          Gets the default delay in milliseconds.
 List<DefaultDelayResolver.DelaySchedule> getSchedules()
           
 boolean isIgnoreRobotsCrawlDelay()
           
 void loadFromXML(Reader in)
           
 void saveToXML(Writer out)
           
 void setDefaultDelay(long defaultDelay)
          Sets the default delay in milliseconds.
 void setIgnoreRobotsCrawlDelay(boolean ignoreRobotsCrawlDelay)
           
 void setSchedules(List<DefaultDelayResolver.DelaySchedule> schedules)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DELAY

public static final long DEFAULT_DELAY
See Also:
Constant Field Values
Constructor Detail

DefaultDelayResolver

public DefaultDelayResolver()
Method Detail

delay

public void delay(RobotsTxt robotsTxt,
                  String url)
Specified by:
delay in interface IDelayResolver

getDefaultDelay

public long getDefaultDelay()
Gets the default delay in milliseconds.

Returns:
default delay

setDefaultDelay

public void setDefaultDelay(long defaultDelay)
Sets the default delay in milliseconds.

Parameters:
defaultDelay - default deleay

getSchedules

public List<DefaultDelayResolver.DelaySchedule> getSchedules()

setSchedules

public void setSchedules(List<DefaultDelayResolver.DelaySchedule> schedules)

isIgnoreRobotsCrawlDelay

public boolean isIgnoreRobotsCrawlDelay()

setIgnoreRobotsCrawlDelay

public void setIgnoreRobotsCrawlDelay(boolean ignoreRobotsCrawlDelay)

loadFromXML

public void loadFromXML(Reader in)
                 throws IOException
Specified by:
loadFromXML in interface IXMLConfigurable
Throws:
IOException

saveToXML

public void saveToXML(Writer out)
               throws IOException
Specified by:
saveToXML in interface IXMLConfigurable
Throws:
IOException


Copyright © 2009-2013 Norconex Inc.. All Rights Reserved.