Class Spider
- All Implemented Interfaces:
AutoCloseable
Crawl a website domain, manage URL queues, filter links, cache pages, and inspect fetched HTML.
Chilkat.Spider crawls pages within a single initialized domain.
It maintains internal lists of unspidered, spidered, failed, and outbound
URLs; fetches one page at a time; extracts same-domain links for continued
crawling; collects outbound links separately; respects robots.txt;
supports wildcard include and avoid patterns; can use a dedicated cache
directory; and exposes the last fetched HTML, title, meta description,
keywords, redirect information, cache status, and last-modified date.
Domain-limited crawling
Initialize the spider with a domain and crawl only URLs that belong to that same domain.
URL queue management
Add starting URLs, crawl the next queued URL, skip selected URLs, and inspect unspidered, spidered, failed, and outbound URL lists.
Filtering rules
Add wildcard avoid patterns, must-match patterns, and outbound-link avoid patterns to control which URLs are crawled or collected.
Page metadata
Read the last fetched HTML, page title, meta description, meta keywords, final redirect URL, and last-modified timestamp.
Caching and redirects
Fetch pages from a Chilkat-managed cache, update the cache, detect when a page was redirected, and inspect whether the last page came from cache.
Network controls
Configure user-agent, proxy settings, connect/read timeouts, IPv6 preference, maximum URL length, maximum response size, and abort support.
Common pattern:
Call Initialize with the target domain, add one or more starting
URLs with AddUnspidered, optionally add filtering patterns, then
repeatedly call CrawlNext. After each successful crawl, inspect
LastUrl, LastHtml, page metadata, redirect state,
and the URL-list counts to decide whether to continue, skip, recrawl, or
process the page.
Scope note:
Spider is intended for controlled, domain-oriented crawling and
link discovery. Use Chilkat.Http or Chilkat.Rest
when the task is a single HTTP request, API call, form post, or download
rather than a crawl of discovered links.
</section>
Event-capable: long-running methods report progress through a ProgressListener installed
with setProgressListener(ProgressListener), onAbortCheck(BooleanSupplier),
onPercentDone(IntPredicate) or onProgressInfo(BiConsumer).
Instances hold a native Chilkat object: close them with ChilkatObject.close() (try-with-resources) when
done; an unclosed instance is freed when it becomes unreachable.
- See Also:
- Online reference
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAvoidOutboundLinkPattern(String pattern)Adds a wildcarded pattern to prevent collecting matching outbound link URLs.voidaddAvoidPattern(String pattern)Adds a wildcarded pattern to prevent spidering matching URLs.voidaddMustMatchPattern(String pattern)Adds a wildcarded pattern to limit spidering to only URLs that match the pattern.voidaddUnspidered(String url)To begin spidering you must call this method one or more times to provide starting points.canonicalizeUrl(String url)Canonicalizes a URL by doing the following: Drops username/password if present.voidClears the object's internal list of URLs that could not be downloaded.voidClears the object's internal list of outbound URLs that will automatically accumulate while spidering.voidClears the object's internal list of already-spidered URLs that will automatically accumulate while spidering.booleanCrawls the next URL in the internal list of unspidered URLs.Returns the contents of the robots.txt file from the domain being crawled.booleanWhen set totrue, causes the currently running method to abort.booleanIf set the 1 (true) the spider will avoid all HTTPS URLs.getAvoidPattern(int index)Returns the Nth avoid pattern previously added by calling AddAvoidPattern.getBaseDomain(String domain)Returns the second-level + top-level domain of thedomain.Specifies a cache directory to use for spidering.booleanIf equal to 1 (true), then the query portion of all URLs are automatically removed when adding to the unspidered list.intThe maximum number of seconds to wait while connecting to an HTTP server.The domain name that is being spidered.getFailedUrl(int index)Returns the Nth URL in the failed URL list.booleanIf equal to 1 (true) then pages are fetched from cache when possible.If the last URL crawled was redirected (as indicated by the WasRedirected property), this property will contain the final redirect URL.intThe interval in milliseconds between eachevent callback, which enables an application to abort certain method calls before they complete.AbortCheckbooleanEqual to 1 if the last page spidered was fetched from the cache.The HTML text of the last paged fetched by the spider.The HTML META description from the last page fetched by the spider.The HTML META keywords from the last page fetched by the spider.The HTML title from the last page fetched by the spider.The last modification date/time (RFC822 format) from the last page fetched by the spider.The URL of the last page spidered.intThe maximum HTTP response size allowed.intThe maximum URL length allowed.intThe number of avoid patterns previously set by calling AddAvoidPattern.intThe number of URLs in the object's failed URL list.intThe number of URLs in the object's outbound links URL list.intThe number of URLs in the object's already-spidered URL list.intThe number of URLs in the object's unspidered URL list.getOutboundLink(int index)Returns the Nth URL in the outbound link URL list.booleanIftrue, then use IPv6 over IPv4 when both are supported for a particular domain.Returns the installed listener, ornull.The domain name of a proxy host if an HTTP proxy is used.If an HTTP proxy is used and it requires authentication, this property specifies the HTTP proxy login.If an HTTP proxy is used and it requires authentication, this property specifies the HTTP proxy password.intThe port number of a proxy server if an HTTP proxy is used.intThe maximum number of seconds to wait when reading from an HTTP server.getSpideredUrl(int index)Returns the Nth URL in the already-spidered URL list.getUnspideredUrl(int index)Returns the Nth URL in the unspidered URL list.booleanIf equal to 1 (true) then pages saved to the cache.getUrlDomain(String url)Returns the domain name part of a URL.The value of the HTTP user-agent header field to be sent with HTTP requests.booleanIndicates whether the last URL crawled was redirected.intThewind-downphase begins when this number of URLs has been spidered.voidinitialize(String domain)Initializes the object to begin spidering a domain.voidonAbortCheck(BooleanSupplier callback)Installs a listener whose only callback isabortCheck: called everyHeartbeatMsmilliseconds during a long-running method; returntrueto abort it.voidonPercentDone(IntPredicate callback)Installs a listener whose only callback ispercentDone: called with the completion percentage (0..100) as a long-running method progresses; returntrueto abort it.voidonProgressInfo(BiConsumer<String,String> callback)Installs a listener whose only callback isprogressInfo: called with a name/value pair of progress information as a long-running method proceeds.booleanRe-crawls the last URL spidered.voidsetAbortCurrent(boolean value)Sets theAbortCurrentproperty; seegetAbortCurrent().voidsetAvoidHttps(boolean value)Sets theAvoidHttpsproperty; seegetAvoidHttps().voidsetCacheDir(String value)Sets theCacheDirproperty; seegetCacheDir().voidsetChopAtQuery(boolean value)Sets theChopAtQueryproperty; seegetChopAtQuery().voidsetConnectTimeout(int value)Sets theConnectTimeoutproperty; seegetConnectTimeout().voidsetFetchFromCache(boolean value)Sets theFetchFromCacheproperty; seegetFetchFromCache().voidsetHeartbeatMs(int value)Sets theHeartbeatMsproperty; seegetHeartbeatMs().voidsetMaxResponseSize(int value)Sets theMaxResponseSizeproperty; seegetMaxResponseSize().voidsetMaxUrlLen(int value)Sets theMaxUrlLenproperty; seegetMaxUrlLen().voidsetPreferIpv6(boolean value)Sets thePreferIpv6property; seegetPreferIpv6().voidsetProgressListener(ProgressListener listener)Installs the listener that receives this object's progress events (abortCheck,percentDone,progressInfo) during its long-running methods; replaces any listener or lambda installed before;nullremoves it.voidsetProxyDomain(String value)Sets theProxyDomainproperty; seegetProxyDomain().voidsetProxyLogin(String value)Sets theProxyLoginproperty; seegetProxyLogin().voidsetProxyPassword(String value)Sets theProxyPasswordproperty; seegetProxyPassword().voidsetProxyPort(int value)Sets theProxyPortproperty; seegetProxyPort().voidsetReadTimeout(int value)Sets theReadTimeoutproperty; seegetReadTimeout().voidsetUpdateCache(boolean value)Sets theUpdateCacheproperty; seegetUpdateCache().voidsetUserAgent(String value)Sets theUserAgentproperty; seegetUserAgent().voidsetWindDownCount(int value)Sets theWindDownCountproperty; seegetWindDownCount().voidskipUnspidered(int index)Moves a URL from the unspidered list to the spidered list.voidsleepMs(int numMilliseconds)Suspends the execution of the current thread until the time-out interval elapses.Methods inherited from class com.chilkatsoft.chilkat2.ChilkatObject
close, getDebugLogFilePath, getLastErrorHtml, getLastErrorText, getLastErrorXml, getLastMethodSuccess, getVerboseLogging, getVersion, isClosed, setDebugLogFilePath, setLastMethodSuccess, setVerboseLogging, toString
-
Constructor Details
-
Spider
public Spider()Creates a newSpiderobject.
-
-
Method Details
-
getAbortCurrent
public boolean getAbortCurrent()When set totrue, causes the currently running method to abort. Methods that always finish quickly (i.e.have no length file operations or network communications) are not affected. If no method is running, then this property is automatically reset tofalsewhen the next method is called. When the abort occurs, this property is reset tofalse. Both synchronous and asynchronous method calls can be aborted. (A synchronous method call could be aborted by setting this property from a separate thread.)- Returns:
- the value of the
AbortCurrentproperty
-
setAbortCurrent
public void setAbortCurrent(boolean value)Sets theAbortCurrentproperty; seegetAbortCurrent().- Parameters:
value- the new value
-
getAvoidHttps
public boolean getAvoidHttps()If set the 1 (true) the spider will avoid all HTTPS URLs. The default is 0 (false).- Returns:
- the value of the
AvoidHttpsproperty
-
setAvoidHttps
public void setAvoidHttps(boolean value)Sets theAvoidHttpsproperty; seegetAvoidHttps().- Parameters:
value- the new value
-
getCacheDir
Specifies a cache directory to use for spidering. If either of the FetchFromCache or UpdateCache properties are true, this is the location of the cache to be used. Note: the Internet Explorer, Netscape, and FireFox caches are completely separate from the Chilkat Spider cache directory. You should specify a new and empty directory.- Returns:
- the value of the
CacheDirproperty
-
setCacheDir
Sets theCacheDirproperty; seegetCacheDir().- Parameters:
value- the new value (notnull)
-
getChopAtQuery
public boolean getChopAtQuery()If equal to 1 (true), then the query portion of all URLs are automatically removed when adding to the unspidered list. The default value is 0 (false).- Returns:
- the value of the
ChopAtQueryproperty
-
setChopAtQuery
public void setChopAtQuery(boolean value)Sets theChopAtQueryproperty; seegetChopAtQuery().- Parameters:
value- the new value
-
getConnectTimeout
public int getConnectTimeout()The maximum number of seconds to wait while connecting to an HTTP server.- Returns:
- the value of the
ConnectTimeoutproperty
-
setConnectTimeout
public void setConnectTimeout(int value)Sets theConnectTimeoutproperty; seegetConnectTimeout().- Parameters:
value- the new value
-
getDomain
The domain name that is being spidered. This is the domain previously set in the Initialize method.- Returns:
- the value of the
Domainproperty (read-only)
-
getFetchFromCache
public boolean getFetchFromCache()If equal to 1 (true) then pages are fetched from cache when possible. If 0, the cache is ignored. The default value is 1. Regardless, if no CacheDir is set then the cache is not used.- Returns:
- the value of the
FetchFromCacheproperty
-
setFetchFromCache
public void setFetchFromCache(boolean value)Sets theFetchFromCacheproperty; seegetFetchFromCache().- Parameters:
value- the new value
-
getFinalRedirectUrl
If the last URL crawled was redirected (as indicated by the WasRedirected property), this property will contain the final redirect URL.- Returns:
- the value of the
FinalRedirectUrlproperty (read-only)
-
getHeartbeatMs
public int getHeartbeatMs()The interval in milliseconds between eachevent callback, which enables an application to abort certain method calls before they complete. By default, HeartbeatMs is set toAbortCheck0, meaning no AbortCheck event callbacks will trigger.- Returns:
- the value of the
HeartbeatMsproperty
-
setHeartbeatMs
public void setHeartbeatMs(int value)Sets theHeartbeatMsproperty; seegetHeartbeatMs().- Parameters:
value- the new value
-
getLastFromCache
public boolean getLastFromCache()Equal to 1 if the last page spidered was fetched from the cache. Otherwise equal to 0.- Returns:
- the value of the
LastFromCacheproperty (read-only)
-
getLastHtml
The HTML text of the last paged fetched by the spider.- Returns:
- the value of the
LastHtmlproperty (read-only)
-
getLastHtmlDescription
The HTML META description from the last page fetched by the spider.- Returns:
- the value of the
LastHtmlDescriptionproperty (read-only)
-
getLastHtmlKeywords
The HTML META keywords from the last page fetched by the spider.- Returns:
- the value of the
LastHtmlKeywordsproperty (read-only)
-
getLastHtmlTitle
The HTML title from the last page fetched by the spider.- Returns:
- the value of the
LastHtmlTitleproperty (read-only)
-
getLastModDateStr
The last modification date/time (RFC822 format) from the last page fetched by the spider.- Returns:
- the value of the
LastModDateStrproperty (read-only)
-
getLastUrl
The URL of the last page spidered.- Returns:
- the value of the
LastUrlproperty (read-only)
-
getMaxResponseSize
public int getMaxResponseSize()The maximum HTTP response size allowed. The spider will automatically fail any pages larger than this size. The default value is 250,000 bytes.- Returns:
- the value of the
MaxResponseSizeproperty
-
setMaxResponseSize
public void setMaxResponseSize(int value)Sets theMaxResponseSizeproperty; seegetMaxResponseSize().- Parameters:
value- the new value
-
getMaxUrlLen
public int getMaxUrlLen()The maximum URL length allowed. URLs longer than this are not added to the unspidered list. The default value is 200.- Returns:
- the value of the
MaxUrlLenproperty
-
setMaxUrlLen
public void setMaxUrlLen(int value)Sets theMaxUrlLenproperty; seegetMaxUrlLen().- Parameters:
value- the new value
-
getNumAvoidPatterns
public int getNumAvoidPatterns()The number of avoid patterns previously set by calling AddAvoidPattern.- Returns:
- the value of the
NumAvoidPatternsproperty (read-only)
-
getNumFailed
public int getNumFailed()The number of URLs in the object's failed URL list.- Returns:
- the value of the
NumFailedproperty (read-only)
-
getNumOutboundLinks
public int getNumOutboundLinks()The number of URLs in the object's outbound links URL list.- Returns:
- the value of the
NumOutboundLinksproperty (read-only)
-
getNumSpidered
public int getNumSpidered()The number of URLs in the object's already-spidered URL list.- Returns:
- the value of the
NumSpideredproperty (read-only)
-
getNumUnspidered
public int getNumUnspidered()The number of URLs in the object's unspidered URL list.- Returns:
- the value of the
NumUnspideredproperty (read-only)
-
getPreferIpv6
public boolean getPreferIpv6()Iftrue, then use IPv6 over IPv4 when both are supported for a particular domain. The default value of this property isfalse, which will choose IPv4 over IPv6.- Returns:
- the value of the
PreferIpv6property
-
setPreferIpv6
public void setPreferIpv6(boolean value)Sets thePreferIpv6property; seegetPreferIpv6().- Parameters:
value- the new value
-
getProxyDomain
The domain name of a proxy host if an HTTP proxy is used.- Returns:
- the value of the
ProxyDomainproperty
-
setProxyDomain
Sets theProxyDomainproperty; seegetProxyDomain().- Parameters:
value- the new value (notnull)
-
getProxyLogin
If an HTTP proxy is used and it requires authentication, this property specifies the HTTP proxy login.- Returns:
- the value of the
ProxyLoginproperty
-
setProxyLogin
Sets theProxyLoginproperty; seegetProxyLogin().- Parameters:
value- the new value (notnull)
-
getProxyPassword
If an HTTP proxy is used and it requires authentication, this property specifies the HTTP proxy password.- Returns:
- the value of the
ProxyPasswordproperty
-
setProxyPassword
Sets theProxyPasswordproperty; seegetProxyPassword().- Parameters:
value- the new value (notnull)
-
getProxyPort
public int getProxyPort()The port number of a proxy server if an HTTP proxy is used.- Returns:
- the value of the
ProxyPortproperty
-
setProxyPort
public void setProxyPort(int value)Sets theProxyPortproperty; seegetProxyPort().- Parameters:
value- the new value
-
getReadTimeout
public int getReadTimeout()The maximum number of seconds to wait when reading from an HTTP server.- Returns:
- the value of the
ReadTimeoutproperty
-
setReadTimeout
public void setReadTimeout(int value)Sets theReadTimeoutproperty; seegetReadTimeout().- Parameters:
value- the new value
-
getUpdateCache
public boolean getUpdateCache()If equal to 1 (true) then pages saved to the cache. If 0, the cache is ignored. The default value is 1. Regardless, if no CacheDir is set then the cache is not used.- Returns:
- the value of the
UpdateCacheproperty
-
setUpdateCache
public void setUpdateCache(boolean value)Sets theUpdateCacheproperty; seegetUpdateCache().- Parameters:
value- the new value
-
getUserAgent
The value of the HTTP user-agent header field to be sent with HTTP requests. This can be set to any desired value, but be aware that some websites may reject requests from unknown user agents.- Returns:
- the value of the
UserAgentproperty
-
setUserAgent
Sets theUserAgentproperty; seegetUserAgent().- Parameters:
value- the new value (notnull)
-
getWasRedirected
public boolean getWasRedirected()Indicates whether the last URL crawled was redirected. (true= yes,false= no)- Returns:
- the value of the
WasRedirectedproperty (read-only)
-
getWindDownCount
public int getWindDownCount()Thewind-downphase begins when this number of URLs has been spidered. When in the wind-down phase, no new URLs are added to the unspidered list. The default value is 0 which means that there is NO wind-down phase.- Returns:
- the value of the
WindDownCountproperty
-
setWindDownCount
public void setWindDownCount(int value)Sets theWindDownCountproperty; seegetWindDownCount().- Parameters:
value- the new value
-
addAvoidOutboundLinkPattern
Adds a wildcarded pattern to prevent collecting matching outbound link URLs. For example, if*google*is added, then any outbound links containing the wordgooglewill be ignored. The*character matches zero or more of any character.- Parameters:
pattern- thepatternargument (notnull)
-
addAvoidPattern
Adds a wildcarded pattern to prevent spidering matching URLs. For example, if*register*is added, then any url containing the wordregisteris not spidered. The*character matches zero or more of any character.- Parameters:
pattern- thepatternargument (notnull)
-
addMustMatchPattern
Adds a wildcarded pattern to limit spidering to only URLs that match the pattern. For example, if*/products/*is added, then only URLs containing/products/are spidered. This is helpful for only spidering a portion of a website. The*character matches zero or more of any character.- Parameters:
pattern- thepatternargument (notnull)
-
addUnspidered
To begin spidering you must call this method one or more times to provide starting points. It adds a single URL to the object's internal queue of URLs to be spidered.- Parameters:
url- theurlargument (notnull)
-
canonicalizeUrl
Canonicalizes a URL by doing the following:- Drops username/password if present.
- Drops fragment if present.
- Converts domain to lowercase.
- Removes port 80 or 443
- Remove default.asp, index.html, index.htm, default.html, index.htm, default.htm, index.php, index.asp, default.php, .cfm, .aspx, ,php3, .pl, .cgi, .txt, .shtml, .phtml
- Remove www. from the domain if present.
- Parameters:
url- theurlargument (notnull)- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
clearFailedUrls
public void clearFailedUrls()Clears the object's internal list of URLs that could not be downloaded. -
clearOutboundLinks
public void clearOutboundLinks()Clears the object's internal list of outbound URLs that will automatically accumulate while spidering. -
clearSpideredUrls
public void clearSpideredUrls()Clears the object's internal list of already-spidered URLs that will automatically accumulate while spidering. -
crawlNext
public boolean crawlNext()Crawls the next URL in the internal list of unspidered URLs. The URL is moved from the unspidered list to the spidered list. Any new links within the same domain and not yet spidered are added to the unspidered list. (providing that they do not matchavoidpatterns, etc.) Any new outbound links are added to the outbound URL list.If successful, the HTML of the downloaded page is available in the LastHtml property. If there are no more URLs left unspidered, the method returns
false. Information about the URL crawled is available in the properties LastUrl, LastFromCache, and LastModDate.- Returns:
- the result; this method never throws
ChilkatException
-
fetchRobotsText
Returns the contents of the robots.txt file from the domain being crawled. This spider object will not crawl URLs excluded by robots.txt. If you believe the spider is not behaving correctly, please notify us at support@chilkatsoft.com and provide information detailing a case that allows us to reproduce the problem.- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
getAvoidPattern
Returns the Nth avoid pattern previously added by calling AddAvoidPattern. Indexing begins at 0.- Parameters:
index- theindexargument- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
getBaseDomain
Returns the second-level + top-level domain of thedomain. For example, ifdomainisxyz.example.com, this returnsexample.com. For some domains, such asxyz.example.co.uk, the top 3 levels are returned, such asexample.co.uk.- Parameters:
domain- thedomainargument (notnull)- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
getFailedUrl
Returns the Nth URL in the failed URL list. Indexing begins at 0.- Parameters:
index- theindexargument- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
getOutboundLink
Returns the Nth URL in the outbound link URL list. Indexing begins at 0.- Parameters:
index- theindexargument- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
getSpideredUrl
Returns the Nth URL in the already-spidered URL list. Indexing begins at 0.- Parameters:
index- theindexargument- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
getUnspideredUrl
Returns the Nth URL in the unspidered URL list. Indexing begins at 0.- Parameters:
index- theindexargument- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
getUrlDomain
Returns the domain name part of a URL. For example, if the URL ishttps://www.chilkatsoft.com/test.asp, thenwww.chilkatsoft.comis returned.- Parameters:
url- theurlargument (notnull)- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
initialize
Initializes the object to begin spidering a domain. Calling Initialize clears any patterns added via the AddAvoidOutboundLinkPattern, AddAvoidPattern, and AddMustMatchPattern methods. The domain name passed to this method is what is returned by the Domain property. The spider only crawls URLs within the same domain.- Parameters:
domain- thedomainargument (notnull)
-
recrawlLast
public boolean recrawlLast()Re-crawls the last URL spidered. This helpful when cookies set in a previous page load cause the page to be loaded differently the next time.- Returns:
- the result; this method never throws
ChilkatException
-
skipUnspidered
public void skipUnspidered(int index)Moves a URL from the unspidered list to the spidered list. This allows an application to skip a specific URL.- Parameters:
index- theindexargument
-
sleepMs
public void sleepMs(int numMilliseconds)Suspends the execution of the current thread until the time-out interval elapses.- Parameters:
numMilliseconds- thenumMillisecondsargument
-
setProgressListener
Installs the listener that receives this object's progress events (abortCheck,percentDone,progressInfo) during its long-running methods; replaces any listener or lambda installed before;nullremoves it.- Parameters:
listener- the listener, ornull- Throws:
IllegalStateException- if called from inside one of this object's own callbacks
-
getProgressListener
Returns the installed listener, ornull.- Returns:
- the listener installed with
setProgressListener(ProgressListener)or one of theon...methods
-
onAbortCheck
Installs a listener whose only callback isabortCheck: called everyHeartbeatMsmilliseconds during a long-running method; returntrueto abort it. Replaces any listener installed before.- Parameters:
callback- the callback, ornullto remove the listener
-
onPercentDone
Installs a listener whose only callback ispercentDone: called with the completion percentage (0..100) as a long-running method progresses; returntrueto abort it. Replaces any listener installed before.- Parameters:
callback- the callback, ornullto remove the listener
-
onProgressInfo
Installs a listener whose only callback isprogressInfo: called with a name/value pair of progress information as a long-running method proceeds. Replaces any listener installed before.- Parameters:
callback- the callback, ornullto remove the listener
-