Class GcsFetcher
java.lang.Object
com.norconex.crawler.core.fetch.AbstractFetcher<GcsFetcherConfig>
com.norconex.crawler.fs.fetch.impl.AbstractNioFetcher<GcsFetcherConfig>
com.norconex.crawler.fs.fetch.impl.gcs.GcsFetcher
- All Implemented Interfaces:
Configurable<GcsFetcherConfig>,EventListener<Event>,Fetcher,EventListener,Consumer<Event>
Fetcher for Google Cloud Storage (gs://bucket/object),
backed by the official Google-maintained
google-cloud-nio provider.
-
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
-
GcsFetcher
public GcsFetcher()
-
-
Method Details
-
fetcherShutdown
Description copied from class:AbstractFetcherInvoked once per fetcher when the crawler ends. Default implementation does nothing.- Overrides:
fetcherShutdownin classAbstractNioFetcher<GcsFetcherConfig>- 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<GcsFetcherConfig>- 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<GcsFetcherConfig>- Parameters:
reference- the reference to resolve- Returns:
- the resolved path
- Throws:
IOException- if the reference cannot be resolved
-
toString
- Overrides:
toStringin classAbstractNioFetcher<GcsFetcherConfig>
-
equals
- Overrides:
equalsin classAbstractNioFetcher<GcsFetcherConfig>
-
canEqual
- Overrides:
canEqualin classAbstractNioFetcher<GcsFetcherConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractNioFetcher<GcsFetcherConfig>
-
getConfiguration
-