Class FtpFetcher
java.lang.Object
com.norconex.crawler.core.fetch.AbstractFetcher<FtpFetcherConfig>
com.norconex.crawler.fs.fetch.impl.AbstractNioFetcher<FtpFetcherConfig>
com.norconex.crawler.fs.fetch.impl.ftp.FtpFetcher
- All Implemented Interfaces:
Configurable<FtpFetcherConfig>,EventListener<Event>,Fetcher,EventListener,Consumer<Event>
FTP (ftp://) and FTPS (ftps://) fetcher, backed
by the ftp-fs NIO.2
file system provider.
- See Also:
-
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 voidfetcherStartup(CrawlerSession crawler) Invoked once per fetcher instance, when the crawler starts.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, fetcherShutdown, fetchFileObject, fetchMetadata, getOrOpenFileSystemMethods inherited from class com.norconex.crawler.core.fetch.AbstractFetcher
accept, accept
-
Constructor Details
-
FtpFetcher
public FtpFetcher()
-
-
Method Details
-
fetcherStartup
Description copied from class:AbstractFetcherInvoked once per fetcher instance, when the crawler starts. Default implementation does nothing.- Overrides:
fetcherStartupin classAbstractFetcher<FtpFetcherConfig>- 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<FtpFetcherConfig>- 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<FtpFetcherConfig>- Parameters:
reference- the reference to resolve- Returns:
- the resolved path
- Throws:
IOException- if the reference cannot be resolved
-
toString
- Overrides:
toStringin classAbstractNioFetcher<FtpFetcherConfig>
-
equals
- Overrides:
equalsin classAbstractNioFetcher<FtpFetcherConfig>
-
canEqual
- Overrides:
canEqualin classAbstractNioFetcher<FtpFetcherConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractNioFetcher<FtpFetcherConfig>
-
getConfiguration
-