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
public class CompositePipesReporter extends PipesReporter implements Initializable
-
-
Field Summary
-
Fields inherited from class org.apache.tika.pipes.PipesReporter
NO_OP_REPORTER
-
-
Constructor Summary
Constructors Constructor Description CompositePipesReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addPipesReporter(PipesReporter pipesReporter)
void
checkInitialization(InitializableProblemHandler problemHandler)
void
close()
Tries to close all resources.void
error(String msg)
This is called if the process has crashed.void
error(Throwable t)
This is called if the process has crashed.List<PipesReporter>
getPipesReporters()
void
initialize(Map<String,Param> params)
void
report(FetchEmitTuple t, PipesResult result, long elapsed)
void
report(TotalCountResult totalCountResult)
No-op implementation.void
setPipesReporters(List<PipesReporter> pipesReporters)
Deprecated.boolean
supportsTotalCount()
Override this if your reporter supports total count.
-
-
-
Method Detail
-
report
public void report(FetchEmitTuple t, PipesResult result, long elapsed)
- Specified by:
report
in classPipesReporter
-
report
public void report(TotalCountResult totalCountResult)
Description copied from class:PipesReporter
No-op implementation. Override for custom behavior and make sure to overridePipesReporter.supportsTotalCount()
to returntrue
- Overrides:
report
in classPipesReporter
-
supportsTotalCount
public boolean supportsTotalCount()
Description copied from class:PipesReporter
Override this if your reporter supports total count.- Overrides:
supportsTotalCount
in classPipesReporter
- Returns:
false
as the baseline implementation
-
error
public void error(Throwable t)
Description copied from class:PipesReporter
This is called if the process has crashed. Implementers should not rely on close() to be called after this.- Specified by:
error
in classPipesReporter
-
error
public void error(String msg)
Description copied from class:PipesReporter
This is called if the process has crashed. Implementers should not rely on close() to be called after this.- Specified by:
error
in classPipesReporter
-
setPipesReporters
@Field @Deprecated public void setPipesReporters(List<PipesReporter> pipesReporters)
Deprecated.- Parameters:
pipesReporters
-
-
addPipesReporter
@Field public void addPipesReporter(PipesReporter pipesReporter)
-
getPipesReporters
public List<PipesReporter> getPipesReporters()
-
initialize
public void initialize(Map<String,Param> params) throws TikaConfigException
- Specified by:
initialize
in interfaceInitializable
- Parameters:
params
- params to use for initialization- Throws:
TikaConfigException
-
checkInitialization
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException
- Specified by:
checkInitialization
in 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
public void close() throws IOException
Tries to close all resources. Throws the last encountered IOException if any are thrown by the component reporters.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classPipesReporter
- Throws:
IOException
-
-