D
- Type of descriptors handledpublic final class ParsedDescriptorResultHandler<D extends Descriptor> extends Object implements ResultHandler<String,ParsedDescriptorResult<D>>, ErrorHandler<String>
Descriptor
s.
Note that callback methods are invoked from the main thread in the order of inputs.Constructor and Description |
---|
ParsedDescriptorResultHandler(PagedDescriptorStorage<D> storage,
IndexProjectors.IndexProjectorBuilder projectorBuilder,
MasterStorages.MasterStorageBuilder<String> idStorageBuilder,
boolean failOnError)
Create new handler.
|
Modifier and Type | Method and Description |
---|---|
long |
error(int sourceIndex,
String s,
Throwable t)
Process error report.
|
long |
result(int sourceIndex,
String s,
ParsedDescriptorResult<D> res)
Report process result.
|
public ParsedDescriptorResultHandler(PagedDescriptorStorage<D> storage, IndexProjectors.IndexProjectorBuilder projectorBuilder, MasterStorages.MasterStorageBuilder<String> idStorageBuilder, boolean failOnError)
storage
- Storage to import toprojectorBuilder
- Builder for IDProjectoridStorageBuilder
- Builder for IDs or nullfailOnError
- If true a reported error will cause an exception in results processingpublic long result(int sourceIndex, String s, ParsedDescriptorResult<D> res)
ResultHandler
result
in interface ResultHandler<String,ParsedDescriptorResult<D extends Descriptor>>
sourceIndex
- 0-based index of the processed sources
- The processed sourceres
- The resultpublic long error(int sourceIndex, String s, Throwable t)
ErrorHandler
error
in interface ErrorHandler<String>
sourceIndex
- Index (0-based) of the source structure (input) provoked this errors
- Source caused the reported errort
- The error thrown