Class DataSetSupport
- java.lang.Object
-
- org.apache.camel.component.dataset.DataSetSupport
-
- All Implemented Interfaces:
DataSet
- Direct Known Subclasses:
ListDataSet
,SimpleDataSet
public abstract class DataSetSupport extends Object implements DataSet
Base class for DataSet
-
-
Constructor Summary
Constructors Constructor Description DataSetSupport()
DataSetSupport(int size)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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)
Map<String,Object>
getDefaultHeaders()
org.apache.camel.Processor
getOutputTransformer()
long
getReportCount()
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
populateDefaultHeaders(Map<String,Object> map)
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)
-
-
-
Method Detail
-
populateMessage
public void populateMessage(org.apache.camel.Exchange exchange, long messageIndex) throws Exception
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.
-
getOutputTransformer
public org.apache.camel.Processor getOutputTransformer()
-
setOutputTransformer
public void setOutputTransformer(org.apache.camel.Processor outputTransformer)
-
createMessageBody
protected abstract Object createMessageBody(long messageIndex)
-
applyHeaders
protected void applyHeaders(org.apache.camel.Exchange exchange, long messageIndex)
Allows derived classes to add some custom headers for a given message
-
-