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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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) org.apache.camel.ProcessorlongReturns the number of messages which should be received before reporting on the progress of the testlonggetSize()Returns the size of the datasetprotected voidAllows 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)
-
Constructor Details
-
DataSetSupport
protected DataSetSupport() -
DataSetSupport
protected DataSetSupport(int size)
-
-
Method Details
-
populateMessage
Description 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. -
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
-