Class DataSetSupport

    • Constructor Detail

      • DataSetSupport

        public DataSetSupport()
      • DataSetSupport

        public DataSetSupport​(int 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 interface DataSet
        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 interface DataSet
        Throws:
        Exception
      • getSize

        public long getSize()
        Description copied from interface: DataSet
        Returns the size of the dataset
        Specified by:
        getSize in interface 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 interface DataSet
      • setReportCount

        public void setReportCount​(long reportCount)
        Sets the number of messages in a group on which we will report that messages have been received.
      • setDefaultHeaders

        public void setDefaultHeaders​(Map<String,​Object> defaultHeaders)
      • 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
      • populateDefaultHeaders

        protected void populateDefaultHeaders​(Map<String,​Object> map)
        Allows derived classes to customize a default set of properties