Class SharedServerResources
java.lang.Object
org.apache.tika.pipes.core.server.SharedServerResources
Holds shared resources for a shared PipesServer.
These resources are thread-safe and shared among all ConnectionHandlers:
- AutoDetectParser, Detector - immutable after initialization
- FetcherManager, EmitterManager - use ConcurrentHashMap internally
- MetadataFilter, ContentHandlerFactory - stateless
-
Method Summary
Modifier and TypeMethodDescriptioncreateMergedParseContext(ParseContext requestContext) Creates a merged ParseContext with defaults from tika-config overlaid with request values.static SharedServerResourcesload(TikaLoader tikaLoader, PipesConfig pipesConfig) Loads shared server resources from configuration.
-
Method Details
-
load
public static SharedServerResources load(TikaLoader tikaLoader, PipesConfig pipesConfig) throws TikaException, IOException, SAXException Loads shared server resources from configuration.- Parameters:
tikaLoader- the tika loaderpipesConfig- the pipes configuration- Returns:
- initialized shared resources
- Throws:
TikaException- if initialization failsIOException- if I/O error occursSAXException- if XML parsing error occurs
-
createMergedParseContext
public ParseContext createMergedParseContext(ParseContext requestContext) throws TikaConfigException Creates a merged ParseContext with defaults from tika-config overlaid with request values.- Parameters:
requestContext- the ParseContext from FetchEmitTuple- Returns:
- a new ParseContext with defaults + request overrides
- Throws:
TikaConfigException
-
getTikaLoader
-
getPipesConfig
-
getAutoDetectParser
-
getDetector
-
getRMetaParser
-
getFetcherManager
-
getEmitterManager
-
getDefaultMetadataFilter
-
getDefaultContentHandlerFactory
-
getDefaultMetadataWriteLimiterFactory
-
getEmitStrategy
-
getConfigStore
-