SMILA 1.0 API documentation

org.eclipse.smila.processing.util
Class ResultCollector

java.lang.Object
  extended by org.eclipse.smila.processing.util.ResultCollector

public class ResultCollector
extends java.lang.Object

Helper class that can/should be used by pipelets for collecting their processed record results. Takes into account that error results may cause an exception ("_failOnError" parameter) or may be dropped from pipelet result (see dropRecordOnError).

Author:
aweber

Constructor Summary
ResultCollector(ParameterAccessor paramAccessor, Log log, boolean dropRecordOnError)
           
 
Method Summary
 void addFailedResult(java.lang.String recordId, java.lang.Exception ex)
           
 void addResult(java.lang.String recordId)
           
 java.lang.String[] getResultIds()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultCollector

public ResultCollector(ParameterAccessor paramAccessor,
                       Log log,
                       boolean dropRecordOnError)
Parameters:
paramAccessor - of the hosting config, needed to access failOnError parameter
log - the log for which to log the error results
dropRecordOnError -
Method Detail

addResult

public void addResult(java.lang.String recordId)
Parameters:
recordId - record id of successful result

addFailedResult

public void addFailedResult(java.lang.String recordId,
                            java.lang.Exception ex)
                     throws ProcessingException
Parameters:
recordId - record id of failed result
ex - exception that will be logged resp. thrown if failOnError=true
Throws:
ProcessingException - will be thrown if failOnError=true

getResultIds

public java.lang.String[] getResultIds()
Returns:
record ids that should be used as pipelet result

SMILA 1.0 API documentation