|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--websphinx.DownloadParameters
Download parameters. These parameters are limits on how Page can download a Link. A Crawler has a default set of download parameters, but the defaults can be overridden on individual links by calling Link.setDownloadParameters().
DownloadParameters is an immutable class (like String). "Changing" a parameter actually returns a new instance of the class with only the specified parameter changed.
Constructor Summary | |
DownloadParameters()
Make a DownloadParameters object with default settigns. |
Method Summary | |
websphinx.DownloadParameters |
changeAcceptedMIMETypes(java.lang.String types)
Change accepted MIME types. |
websphinx.DownloadParameters |
changeCrawlTimeout(int timeout)
Change timeout value. |
websphinx.DownloadParameters |
changeDownloadTimeout(int timeout)
Change download timeout value. |
websphinx.DownloadParameters |
changeInteractive(boolean f)
Change interactive flag. |
websphinx.DownloadParameters |
changeMaxPageSize(int maxPageSize)
Change maximum page size. |
websphinx.DownloadParameters |
changeMaxThreads(int maxthreads)
Set maximum threads. |
websphinx.DownloadParameters |
changeObeyRobotExclusion(boolean f)
Change obey-robot-exclusion flag. |
websphinx.DownloadParameters |
changeUseCaches(boolean f)
Change use-caches flag. |
websphinx.DownloadParameters |
changeUserAgent(java.lang.String userAgent)
Change User-agent field used in HTTP requests. |
java.lang.Object |
clone()
Clone a DownloadParameters object. |
java.lang.String |
getAcceptedMIMETypes()
Get accepted MIME types. |
int |
getCrawlTimeout()
Get timeout on entire crawl. |
int |
getDownloadTimeout()
Get download timeout value. |
boolean |
getInteractive()
Get interactive flag. |
int |
getMaxPageSize()
Get maximum page size. |
int |
getMaxThreads()
Get maximum threads. |
boolean |
getObeyRobotExclusion()
Get obey-robot-exclusion flag. |
boolean |
getUseCaches()
Get use-caches flag. |
java.lang.String |
getUserAgent()
Get User-agent header used in HTTP requests. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DownloadParameters()
Method Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
public int getMaxThreads()
public websphinx.DownloadParameters changeMaxThreads(int maxthreads)
maxthreads
- maximum number of background threads used by crawler
public int getMaxPageSize()
public websphinx.DownloadParameters changeMaxPageSize(int maxPageSize)
maxPageSize
- maximum page size in kilobytes
public int getDownloadTimeout()
public websphinx.DownloadParameters changeDownloadTimeout(int timeout)
timeout
- length of time (in seconds) to wait for a page to download
Use a negative value to turn off timeout.
public int getCrawlTimeout()
public websphinx.DownloadParameters changeCrawlTimeout(int timeout)
timeout
- maximum length of time (in seconds) that crawler will run.
Use a negative value to turn off timeout.
public boolean getObeyRobotExclusion()
public websphinx.DownloadParameters changeObeyRobotExclusion(boolean f)
f
- If true, then the
crawler checks robots.txt on the remote Web site
before downloading a page.
public boolean getInteractive()
public websphinx.DownloadParameters changeInteractive(boolean f)
f
- true if a user is available to respond
to dialog boxes
public boolean getUseCaches()
public websphinx.DownloadParameters changeUseCaches(boolean f)
f
- true if cached pages should be used whenever possible
public java.lang.String getAcceptedMIMETypes()
public websphinx.DownloadParameters changeAcceptedMIMETypes(java.lang.String types)
types
- list of MIME types that can be handled
by the crawler. Use null if the crawler can handle anything.
public java.lang.String getUserAgent()
public websphinx.DownloadParameters changeUserAgent(java.lang.String userAgent)
userAgent
- user-agent field used in HTTP
requests. Pass null to use the Java library's default
user-agent field.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |