Class WebDavFetcher
java.lang.Object
com.norconex.crawler.core.fetch.AbstractFetcher<WebDavFetcherConfig>
com.norconex.crawler.fs.fetch.impl.AbstractNioFetcher<WebDavFetcherConfig>
com.norconex.crawler.fs.fetch.impl.webdav.WebDavFetcher
- All Implemented Interfaces:
Configurable<WebDavFetcherConfig>,EventListener<Event>,Fetcher,EventListener,Consumer<Event>
Fetcher for WebDAV repositories (webdav://,
webdavs://), backed by a custom, read-only NIO.2
FileSystemProvider
(WebDavFileSystemProvider) that speaks WebDAV directly over
Apache HttpClient (no third-party WebDAV library).
It can also be pointed at plain http:///https://
resources, in which case each reference is treated as a single fetchable
file (no directory traversal). For crawling web sites, use the Norconex
Web Crawler instead.
-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanacceptRequest(@NonNull FetchRequest fetchRequest) Optional method for subclasses to override when in need for additional acceptance logic beyond reference filters (which this abstract class provides).protected booleanbooleanprotected voidfetcherShutdown(CrawlerSession crawler) Invoked once per fetcher when the crawler ends.inthashCode()protected PathresolvePath(String reference) Resolves a crawler reference (as found onDoc.getReference()) into a NIO.2Path.toString()Methods inherited from class com.norconex.crawler.fs.fetch.impl.AbstractNioFetcher
fetch, fetchChildPaths, fetchContent, fetchFileObject, fetchMetadata, getOrOpenFileSystemMethods inherited from class com.norconex.crawler.core.fetch.AbstractFetcher
accept, accept, fetcherStartup
-
Constructor Details
-
WebDavFetcher
public WebDavFetcher()
-
-
Method Details
-
fetcherShutdown
Description copied from class:AbstractFetcherInvoked once per fetcher when the crawler ends. Default implementation does nothing.- Overrides:
fetcherShutdownin classAbstractNioFetcher<WebDavFetcherConfig>- Parameters:
crawler- crawler
-
acceptRequest
Description copied from class:AbstractFetcherOptional method for subclasses to override when in need for additional acceptance logic beyond reference filters (which this abstract class provides). This method is only invoked if there are no reference filters configured on this class, or all of them accepts the request document. Default implementation does nothing (always returntrue).- Overrides:
acceptRequestin classAbstractFetcher<WebDavFetcherConfig>- Parameters:
fetchRequest- the fetch request to evaluate (nevernull)- Returns:
trueif accepted
-
resolvePath
Description copied from class:AbstractNioFetcherResolves a crawler reference (as found onDoc.getReference()) into a NIO.2Path.- Specified by:
resolvePathin classAbstractNioFetcher<WebDavFetcherConfig>- Parameters:
reference- the reference to resolve- Returns:
- the resolved path
- Throws:
IOException- if the reference cannot be resolved
-
toString
- Overrides:
toStringin classAbstractNioFetcher<WebDavFetcherConfig>
-
equals
- Overrides:
equalsin classAbstractNioFetcher<WebDavFetcherConfig>
-
canEqual
- Overrides:
canEqualin classAbstractNioFetcher<WebDavFetcherConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractNioFetcher<WebDavFetcherConfig>
-
getConfiguration
-