Interface DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder
- All Superinterfaces:
org.apache.camel.builder.EndpointProducerBuilder
,org.apache.camel.EndpointProducerResolver
- All Known Subinterfaces:
DataSetEndpointBuilderFactory.DataSetEndpointBuilder
- Enclosing interface:
- DataSetEndpointBuilderFactory
public static interface DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder
extends org.apache.camel.builder.EndpointProducerBuilder
Builder for endpoint producers for the Dataset component.
-
Method Summary
Modifier and TypeMethodDescriptionadvanced()
assertPeriod
(long assertPeriod) Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary assertion is still valid.assertPeriod
(String assertPeriod) Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary assertion is still valid.consumeDelay
(long consumeDelay) Allows a delay to be specified which causes a delay when a message is consumed by the producer (to simulate slow processing).consumeDelay
(String consumeDelay) Allows a delay to be specified which causes a delay when a message is consumed by the producer (to simulate slow processing).dataSetIndex
(String dataSetIndex) Controls the behaviour of the CamelDataSetIndex header.expectedCount
(int expectedCount) Specifies the expected number of message exchanges that should be received by this endpoint.expectedCount
(String expectedCount) Specifies the expected number of message exchanges that should be received by this endpoint.failFast
(boolean failFast) Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation while it may otherwise wait for all expected messages to arrive before performing expectations verifications.Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation while it may otherwise wait for all expected messages to arrive before performing expectations verifications.log
(boolean log) To turn on logging when the mock receives an incoming message.To turn on logging when the mock receives an incoming message.reportGroup
(int reportGroup) A number that is used to turn on throughput logging based on groups of the size.reportGroup
(String reportGroup) A number that is used to turn on throughput logging based on groups of the size.resultMinimumWaitTime
(long resultMinimumWaitTime) Sets the minimum expected amount of time (in millis) the assertIsSatisfied() will wait on a latch until it is satisfied.resultMinimumWaitTime
(String resultMinimumWaitTime) Sets the minimum expected amount of time (in millis) the assertIsSatisfied() will wait on a latch until it is satisfied.resultWaitTime
(long resultWaitTime) Sets the maximum amount of time (in millis) the assertIsSatisfied() will wait on a latch until it is satisfied.resultWaitTime
(String resultWaitTime) Sets the maximum amount of time (in millis) the assertIsSatisfied() will wait on a latch until it is satisfied.retainFirst
(int retainFirst) Specifies to only retain the first nth number of received Exchanges.retainFirst
(String retainFirst) Specifies to only retain the first nth number of received Exchanges.retainLast
(int retainLast) Specifies to only retain the last nth number of received Exchanges.retainLast
(String retainLast) Specifies to only retain the last nth number of received Exchanges.sleepForEmptyTest
(long sleepForEmptyTest) Allows a sleep to be specified to wait to check that this endpoint really is empty when expectedMessageCount(int) is called with zero.sleepForEmptyTest
(String sleepForEmptyTest) Allows a sleep to be specified to wait to check that this endpoint really is empty when expectedMessageCount(int) is called with zero.Methods inherited from interface org.apache.camel.builder.EndpointProducerBuilder
doSetMultiValueProperties, doSetMultiValueProperty, doSetProperty, expr, getRawUri, getUri
Methods inherited from interface org.apache.camel.EndpointProducerResolver
resolve, resolve
-
Method Details
-
advanced
-
dataSetIndex
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder dataSetIndex(String dataSetIndex) Controls the behaviour of the CamelDataSetIndex header. off (consumer) the header will not be set. strict (consumer) the header will be set. lenient (consumer) the header will be set. off (producer) the header value will not be verified, and will not be set if it is not present. strict (producer) the header value must be present and will be verified. lenient (producer) the header value will be verified if it is present, and will be set if it is not present. The option is a: <code>java.lang.String</code> type. Default: lenient Group: common- Parameters:
dataSetIndex
- the value to set- Returns:
- the dsl builder
-
assertPeriod
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder assertPeriod(long assertPeriod) Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary assertion is still valid. This is used for example to assert that exactly a number of messages arrives. For example if expected count was set to 5, then the assertion is satisfied when 5 or more message arrives. To ensure that exactly 5 messages arrives, then you would need to wait a little period to ensure no further message arrives. This is what you can use this method for. By default this period is disabled. The option is a: <code>long</code> type. Group: producer- Parameters:
assertPeriod
- the value to set- Returns:
- the dsl builder
-
assertPeriod
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder assertPeriod(String assertPeriod) Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary assertion is still valid. This is used for example to assert that exactly a number of messages arrives. For example if expected count was set to 5, then the assertion is satisfied when 5 or more message arrives. To ensure that exactly 5 messages arrives, then you would need to wait a little period to ensure no further message arrives. This is what you can use this method for. By default this period is disabled. The option will be converted to a <code>long</code> type. Group: producer- Parameters:
assertPeriod
- the value to set- Returns:
- the dsl builder
-
consumeDelay
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder consumeDelay(long consumeDelay) Allows a delay to be specified which causes a delay when a message is consumed by the producer (to simulate slow processing). The option is a: <code>long</code> type. Default: 0 Group: producer- Parameters:
consumeDelay
- the value to set- Returns:
- the dsl builder
-
consumeDelay
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder consumeDelay(String consumeDelay) Allows a delay to be specified which causes a delay when a message is consumed by the producer (to simulate slow processing). The option will be converted to a <code>long</code> type. Default: 0 Group: producer- Parameters:
consumeDelay
- the value to set- Returns:
- the dsl builder
-
expectedCount
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder expectedCount(int expectedCount) Specifies the expected number of message exchanges that should be received by this endpoint. Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests starts, so you need to set a assert period time to let the test run for a while to make sure there are still no messages arrived; for that use setAssertPeriod(long). An alternative is to use NotifyBuilder, and use the notifier to know when Camel is done routing some messages, before you call the assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert period, to speedup testing times. If you want to assert that exactly nth message arrives to this mock endpoint, then see also the setAssertPeriod(long) method for further details. The option is a: <code>int</code> type. Default: -1 Group: producer- Parameters:
expectedCount
- the value to set- Returns:
- the dsl builder
-
expectedCount
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder expectedCount(String expectedCount) Specifies the expected number of message exchanges that should be received by this endpoint. Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests starts, so you need to set a assert period time to let the test run for a while to make sure there are still no messages arrived; for that use setAssertPeriod(long). An alternative is to use NotifyBuilder, and use the notifier to know when Camel is done routing some messages, before you call the assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert period, to speedup testing times. If you want to assert that exactly nth message arrives to this mock endpoint, then see also the setAssertPeriod(long) method for further details. The option will be converted to a <code>int</code> type. Default: -1 Group: producer- Parameters:
expectedCount
- the value to set- Returns:
- the dsl builder
-
failFast
Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation while it may otherwise wait for all expected messages to arrive before performing expectations verifications. Is by default true. Set to false to use behavior as in Camel 2.x. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
failFast
- the value to set- Returns:
- the dsl builder
-
failFast
Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation while it may otherwise wait for all expected messages to arrive before performing expectations verifications. Is by default true. Set to false to use behavior as in Camel 2.x. The option will be converted to a <code>boolean</code> type. Default: false Group: producer- Parameters:
failFast
- the value to set- Returns:
- the dsl builder
-
log
To turn on logging when the mock receives an incoming message. This will log only one time at INFO level for the incoming message. For more detailed logging then set the logger to DEBUG level for the org.apache.camel.component.mock.MockEndpoint class. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
log
- the value to set- Returns:
- the dsl builder
-
log
To turn on logging when the mock receives an incoming message. This will log only one time at INFO level for the incoming message. For more detailed logging then set the logger to DEBUG level for the org.apache.camel.component.mock.MockEndpoint class. The option will be converted to a <code>boolean</code> type. Default: false Group: producer- Parameters:
log
- the value to set- Returns:
- the dsl builder
-
reportGroup
A number that is used to turn on throughput logging based on groups of the size. The option is a: <code>int</code> type. Group: producer- Parameters:
reportGroup
- the value to set- Returns:
- the dsl builder
-
reportGroup
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder reportGroup(String reportGroup) A number that is used to turn on throughput logging based on groups of the size. The option will be converted to a <code>int</code> type. Group: producer- Parameters:
reportGroup
- the value to set- Returns:
- the dsl builder
-
resultMinimumWaitTime
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder resultMinimumWaitTime(long resultMinimumWaitTime) Sets the minimum expected amount of time (in millis) the assertIsSatisfied() will wait on a latch until it is satisfied. The option is a: <code>long</code> type. Group: producer- Parameters:
resultMinimumWaitTime
- the value to set- Returns:
- the dsl builder
-
resultMinimumWaitTime
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder resultMinimumWaitTime(String resultMinimumWaitTime) Sets the minimum expected amount of time (in millis) the assertIsSatisfied() will wait on a latch until it is satisfied. The option will be converted to a <code>long</code> type. Group: producer- Parameters:
resultMinimumWaitTime
- the value to set- Returns:
- the dsl builder
-
resultWaitTime
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder resultWaitTime(long resultWaitTime) Sets the maximum amount of time (in millis) the assertIsSatisfied() will wait on a latch until it is satisfied. The option is a: <code>long</code> type. Group: producer- Parameters:
resultWaitTime
- the value to set- Returns:
- the dsl builder
-
resultWaitTime
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder resultWaitTime(String resultWaitTime) Sets the maximum amount of time (in millis) the assertIsSatisfied() will wait on a latch until it is satisfied. The option will be converted to a <code>long</code> type. Group: producer- Parameters:
resultWaitTime
- the value to set- Returns:
- the dsl builder
-
retainFirst
Specifies to only retain the first nth number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges, and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the first 10 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) methods, to limit both the first and last received. The option is a: <code>int</code> type. Default: -1 Group: producer- Parameters:
retainFirst
- the value to set- Returns:
- the dsl builder
-
retainFirst
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder retainFirst(String retainFirst) Specifies to only retain the first nth number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges, and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the first 10 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) methods, to limit both the first and last received. The option will be converted to a <code>int</code> type. Default: -1 Group: producer- Parameters:
retainFirst
- the value to set- Returns:
- the dsl builder
-
retainLast
Specifies to only retain the last nth number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges, and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the last 20 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) methods, to limit both the first and last received. The option is a: <code>int</code> type. Default: -1 Group: producer- Parameters:
retainLast
- the value to set- Returns:
- the dsl builder
-
retainLast
Specifies to only retain the last nth number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges, and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the last 20 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) methods, to limit both the first and last received. The option will be converted to a <code>int</code> type. Default: -1 Group: producer- Parameters:
retainLast
- the value to set- Returns:
- the dsl builder
-
sleepForEmptyTest
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder sleepForEmptyTest(long sleepForEmptyTest) Allows a sleep to be specified to wait to check that this endpoint really is empty when expectedMessageCount(int) is called with zero. The option is a: <code>long</code> type. Group: producer- Parameters:
sleepForEmptyTest
- the value to set- Returns:
- the dsl builder
-
sleepForEmptyTest
default DataSetEndpointBuilderFactory.DataSetEndpointProducerBuilder sleepForEmptyTest(String sleepForEmptyTest) Allows a sleep to be specified to wait to check that this endpoint really is empty when expectedMessageCount(int) is called with zero. The option will be converted to a <code>long</code> type. Group: producer- Parameters:
sleepForEmptyTest
- the value to set- Returns:
- the dsl builder
-