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 voidapplyHeaders(org.apache.camel.Exchange exchange, long messageIndex)Allows derived classes to add some custom headers for a given messagevoidassertMessageExpected(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 ObjectcreateMessageBody(long messageIndex)Map<String,Object>getDefaultHeaders()org.apache.camel.ProcessorgetOutputTransformer()longgetReportCount()Returns the number of messages which should be received before reporting on the progress of the testlonggetSize()Returns the size of the datasetprotected voidpopulateDefaultHeaders(Map<String,Object> map)Allows derived classes to customize a default set of propertiesvoidpopulateMessage(org.apache.camel.Exchange exchange, long messageIndex)Populates a message exchange when using the DataSet as a source of messagesvoidsetDefaultHeaders(Map<String,Object> defaultHeaders)voidsetOutputTransformer(org.apache.camel.Processor outputTransformer)voidsetReportCount(long reportCount)Sets the number of messages in a group on which we will report that messages have been received.voidsetSize(long size)
-
-
-
Method Detail
-
populateMessage
public void populateMessage(org.apache.camel.Exchange exchange, long messageIndex) throws ExceptionDescription copied from interface:DataSetPopulates a message exchange when using the DataSet as a source of messages- Specified by:
populateMessagein 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:DataSetAsserts that the expected message has been received for the given index- Specified by:
assertMessageExpectedin interfaceDataSet- Throws:
Exception
-
getSize
public long getSize()
Description copied from interface:DataSetReturns the size of the dataset
-
setSize
public void setSize(long size)
-
getReportCount
public long getReportCount()
Description copied from interface:DataSetReturns the number of messages which should be received before reporting on the progress of the test- Specified by:
getReportCountin 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
-
-