Class ListDataSet
- java.lang.Object
-
- org.apache.camel.component.dataset.DataSetSupport
-
- org.apache.camel.component.dataset.ListDataSet
-
- All Implemented Interfaces:
DataSet
- Direct Known Subclasses:
FileDataSet
public class ListDataSet extends DataSetSupport
A DataSet that allows a list of static payloads to be used to create each message exchange along with using a pluggable transformer to customize the messages.
-
-
Constructor Summary
Constructors Constructor Description ListDataSet()
ListDataSet(List<Object> defaultBodies)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
createMessageBody(long messageIndex)
Creates the message body for a given message.List<Object>
getDefaultBodies()
void
setDefaultBodies(List<Object> defaultBodies)
-
Methods inherited from class org.apache.camel.component.dataset.DataSetSupport
applyHeaders, assertMessageExpected, getDefaultHeaders, getOutputTransformer, getReportCount, getSize, populateDefaultHeaders, populateMessage, setDefaultHeaders, setOutputTransformer, setReportCount, setSize
-
-
-
-
Method Detail
-
createMessageBody
protected Object createMessageBody(long messageIndex)
Creates the message body for a given message. If the messageIndex is greater than the size of the list, use the modulus.- Specified by:
createMessageBody
in classDataSetSupport
-
-