Class DataSetSupport
java.lang.Object
org.apache.camel.component.dataset.DataSetSupport
- All Implemented Interfaces:
DataSet
- Direct Known Subclasses:
ListDataSet
,SimpleDataSet
Base class for DataSet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyHeaders
(org.apache.camel.Exchange exchange, long messageIndex) Allows derived classes to add some custom headers for a given messagevoid
assertMessageExpected
(DataSetEndpoint dataSetEndpoint, org.apache.camel.Exchange expected, org.apache.camel.Exchange actual, long index) Asserts that the expected message has been received for the given indexprotected abstract Object
createMessageBody
(long messageIndex) org.apache.camel.Processor
long
Returns the number of messages which should be received before reporting on the progress of the testlong
getSize()
Returns the size of the datasetprotected void
Allows derived classes to customize a default set of propertiesvoid
populateMessage
(org.apache.camel.Exchange exchange, long messageIndex) Populates a message exchange when using the DataSet as a source of messagesvoid
setDefaultHeaders
(Map<String, Object> defaultHeaders) void
setOutputTransformer
(org.apache.camel.Processor outputTransformer) void
setReportCount
(long reportCount) Sets the number of messages in a group on which we will report that messages have been received.void
setSize
(long size)
-
Constructor Details
-
DataSetSupport
protected DataSetSupport() -
DataSetSupport
protected DataSetSupport(int size)
-
-
Method Details
-
populateMessage
Description copied from interface:DataSet
Populates a message exchange when using the DataSet as a source of messages- Specified by:
populateMessage
in interfaceDataSet
- Throws:
Exception
-
assertMessageExpected
public void assertMessageExpected(DataSetEndpoint dataSetEndpoint, org.apache.camel.Exchange expected, org.apache.camel.Exchange actual, long index) throws Exception Description copied from interface:DataSet
Asserts that the expected message has been received for the given index- Specified by:
assertMessageExpected
in interfaceDataSet
- Throws:
Exception
-
getSize
public long getSize()Description copied from interface:DataSet
Returns the size of the dataset -
setSize
public void setSize(long size) -
getReportCount
public long getReportCount()Description copied from interface:DataSet
Returns the number of messages which should be received before reporting on the progress of the test- Specified by:
getReportCount
in interfaceDataSet
-
setReportCount
public void setReportCount(long reportCount) Sets the number of messages in a group on which we will report that messages have been received. -
getDefaultHeaders
-
setDefaultHeaders
-
getOutputTransformer
public org.apache.camel.Processor getOutputTransformer() -
setOutputTransformer
public void setOutputTransformer(org.apache.camel.Processor outputTransformer) -
createMessageBody
-
applyHeaders
protected void applyHeaders(org.apache.camel.Exchange exchange, long messageIndex) Allows derived classes to add some custom headers for a given message -
populateDefaultHeaders
Allows derived classes to customize a default set of properties
-