this.endpoint = endpoint;
}
public void process(Exchange exchange) throws Exception {
Parser parser = endpoint.createParser(exchange);
DataSet dataSet = parser.parse();
if (endpoint.isSplitRows()) {
int counter = 0;
while (dataSet.next()) {
endpoint.processDataSet(dataSet, counter++);
}
} else {
endpoint.processDataSet(dataSet, dataSet.getRowCount());
}
}