Class S3Fetcher
java.lang.Object
com.norconex.crawler.core.fetch.AbstractFetcher<S3FetcherConfig>
com.norconex.crawler.fs.fetch.impl.AbstractNioFetcher<S3FetcherConfig>
com.norconex.crawler.fs.fetch.impl.s3.S3Fetcher
- All Implemented Interfaces:
Configurable<S3FetcherConfig>,EventListener<Event>,Fetcher,EventListener,Consumer<Event>
Fetcher for Amazon S3 (s3://bucket/key), backed by a
custom, read-only NIO.2 FileSystemProvider
(S3FileSystemProvider) built directly on the standard AWS SDK
v2 S3Client - not the AWS Common Runtime (CRT) client, avoiding
its ~19MB native-library dependency.
S3 has no real directories: a reference like
s3://bucket/folder/ is treated as a directory whenever any
object exists with that key as a prefix, matching how the AWS console
and CLI simulate folders.
-
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
-
S3Fetcher
public S3Fetcher()
-
-
Method Details
-
fetcherShutdown
Description copied from class:AbstractFetcherInvoked once per fetcher when the crawler ends. Default implementation does nothing.- Overrides:
fetcherShutdownin classAbstractNioFetcher<S3FetcherConfig>- 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<S3FetcherConfig>- 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<S3FetcherConfig>- Parameters:
reference- the reference to resolve- Returns:
- the resolved path
- Throws:
IOException- if the reference cannot be resolved
-
toString
- Overrides:
toStringin classAbstractNioFetcher<S3FetcherConfig>
-
equals
- Overrides:
equalsin classAbstractNioFetcher<S3FetcherConfig>
-
canEqual
- Overrides:
canEqualin classAbstractNioFetcher<S3FetcherConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractNioFetcher<S3FetcherConfig>
-
getConfiguration
-