Package org.apache.tika.pipes
Class CompositePipesReporter
java.lang.Object
org.apache.tika.pipes.PipesReporter
org.apache.tika.pipes.CompositePipesReporter
- All Implemented Interfaces:
Closeable,AutoCloseable,Initializable
-
Field Summary
Fields inherited from class org.apache.tika.pipes.PipesReporter
NO_OP_REPORTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPipesReporter(PipesReporter pipesReporter) voidcheckInitialization(InitializableProblemHandler problemHandler) voidclose()Tries to close all resources.voidThis is called if the process has crashed.voidThis is called if the process has crashed.voidinitialize(Map<String, Param> params) voidreport(FetchEmitTuple t, PipesResult result, long elapsed) voidreport(TotalCountResult totalCountResult) No-op implementation.booleanOverride this if your reporter supports total count.
-
Constructor Details
-
CompositePipesReporter
public CompositePipesReporter()
-
-
Method Details
-
report
- Specified by:
reportin classPipesReporter
-
report
Description copied from class:PipesReporterNo-op implementation. Override for custom behavior and make sure to overridePipesReporter.supportsTotalCount()to returntrue- Overrides:
reportin classPipesReporter
-
supportsTotalCount
public boolean supportsTotalCount()Description copied from class:PipesReporterOverride this if your reporter supports total count.- Overrides:
supportsTotalCountin classPipesReporter- Returns:
falseas the baseline implementation
-
error
Description copied from class:PipesReporterThis is called if the process has crashed. Implementers should not rely on close() to be called after this.- Specified by:
errorin classPipesReporter
-
error
Description copied from class:PipesReporterThis is called if the process has crashed. Implementers should not rely on close() to be called after this.- Specified by:
errorin classPipesReporter
-
addPipesReporter
-
getPipesReporters
-
initialize
- Specified by:
initializein interfaceInitializable- Parameters:
params- params to use for initialization- Throws:
TikaConfigException
-
checkInitialization
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
checkInitializationin interfaceInitializable- Parameters:
problemHandler- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.- Throws:
TikaConfigException
-
close
Tries to close all resources. Throws the last encountered IOException if any are thrown by the component reporters.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classPipesReporter- Throws:
IOException
-