BATCH-63: added beginning of <chunk-oriented> element and parsing
This commit is contained in:
@@ -57,6 +57,6 @@ public class StepWithTaskJobParserTests {
|
||||
JobExecution jobExecution = jobRepository.createJobExecution(job.getName(), new JobParameters());
|
||||
job.execute(jobExecution);
|
||||
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
|
||||
assertEquals(2, jobExecution.getStepExecutions().size());
|
||||
assertEquals(3, jobExecution.getStepExecutions().size());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.springframework.batch.core.configuration.xml;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.ParseException;
|
||||
import org.springframework.batch.item.UnexpectedInputException;
|
||||
|
||||
public class TestReader implements ItemReader<String> {
|
||||
|
||||
List<String> items = null;
|
||||
|
||||
{
|
||||
List<String> l = new ArrayList<String>();
|
||||
l.add("Item *** 1 ***");
|
||||
l.add("Item *** 2 ***");
|
||||
this.items = Collections.synchronizedList(l);
|
||||
}
|
||||
|
||||
public String read() throws Exception, UnexpectedInputException,
|
||||
ParseException {
|
||||
if (items.size() > 0) {
|
||||
String item = items.remove(0);
|
||||
return item;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.springframework.batch.core.configuration.xml;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
|
||||
public class TestWriter implements ItemWriter<String> {
|
||||
|
||||
public void write(List<? extends String> items) throws Exception {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user