You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2024/05/13 14:54:44 UTC
(camel) branch main updated (87686381b97 -> 9b24ccdae92)
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
from 87686381b97 Bump opentelemetry-version from 1.37.0 to 1.38.0 (#14118)
new d1398a134ad (chores) camel-mock: code cleanup
new 4116edbe084 (chores) camel-mock: code cleanup
new 0143203fa33 (chores) camel-mock: use final fields when possible
new 9b24ccdae92 (chores) camel-mock: documentation fixes
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../camel/catalog/components/dataset-test.json | 4 +-
.../apache/camel/catalog/components/dataset.json | 4 +-
.../org/apache/camel/catalog/components/mock.json | 4 +-
.../camel/component/dataset/dataset-test.json | 4 +-
.../apache/camel/component/dataset/dataset.json | 4 +-
.../org/apache/camel/component/mock/mock.json | 4 +-
.../camel/component/mock/AssertionClause.java | 4 +-
.../mock/InterceptSendToMockEndpointStrategy.java | 6 +-
.../apache/camel/component/mock/MockComponent.java | 4 +-
.../apache/camel/component/mock/MockEndpoint.java | 361 ++++++++++++---------
.../camel/component/mock/MockExpressionClause.java | 6 +-
.../mock/MockExpressionClauseSupport.java | 8 +-
.../camel/component/mock/MockValueBuilder.java | 8 +-
.../apache/camel/component/mock/TimeClause.java | 55 ++--
.../dsl/DatasetComponentBuilderFactory.java | 2 +-
.../dsl/DatasetTestComponentBuilderFactory.java | 2 +-
.../component/dsl/MockComponentBuilderFactory.java | 2 +-
.../dsl/DataSetEndpointBuilderFactory.java | 24 +-
.../dsl/DataSetTestEndpointBuilderFactory.java | 24 +-
.../endpoint/dsl/MockEndpointBuilderFactory.java | 24 +-
.../camel/kotlin/components/DatasetTestUriDsl.kt | 8 +-
.../camel/kotlin/components/DatasetUriDsl.kt | 8 +-
.../apache/camel/kotlin/components/MockUriDsl.kt | 8 +-
23 files changed, 315 insertions(+), 263 deletions(-)
(camel) 03/04: (chores) camel-mock: use final fields when possible
Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 0143203fa334c67ea96571a92df479cd1cdd3d68
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri May 10 14:26:20 2024 +0200
(chores) camel-mock: use final fields when possible
---
.../camel/component/mock/InterceptSendToMockEndpointStrategy.java | 2 +-
.../java/org/apache/camel/component/mock/MockExpressionClause.java | 2 +-
.../org/apache/camel/component/mock/MockExpressionClauseSupport.java | 2 +-
.../main/java/org/apache/camel/component/mock/MockValueBuilder.java | 2 +-
.../src/main/java/org/apache/camel/component/mock/TimeClause.java | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/InterceptSendToMockEndpointStrategy.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/InterceptSendToMockEndpointStrategy.java
index c9fa98ca282..96f3e2754ae 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/InterceptSendToMockEndpointStrategy.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/InterceptSendToMockEndpointStrategy.java
@@ -38,7 +38,7 @@ public class InterceptSendToMockEndpointStrategy implements EndpointStrategy {
private static final Logger LOG = LoggerFactory.getLogger(InterceptSendToMockEndpointStrategy.class);
private final String pattern;
- private boolean skip;
+ private final boolean skip;
/**
* Mock all endpoints.
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClause.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClause.java
index 422dfcb7289..4ee316409f7 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClause.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClause.java
@@ -38,7 +38,7 @@ import org.apache.camel.support.ExpressionToPredicateAdapter;
* are specialized for being used with the mock component and separated from camel-core.
*/
public class MockExpressionClause<T> implements Expression, Predicate {
- private MockExpressionClauseSupport<T> delegate;
+ private final MockExpressionClauseSupport<T> delegate;
private volatile Expression expr;
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClauseSupport.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClauseSupport.java
index b21a8958e20..5110dfb2ad0 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClauseSupport.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClauseSupport.java
@@ -29,7 +29,7 @@ import org.apache.camel.support.builder.ExpressionBuilder;
*/
public class MockExpressionClauseSupport<T> {
- private T result;
+ private final T result;
private Expression expressionValue;
private ExpressionFactory expressionType;
private volatile boolean initDone;
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockValueBuilder.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockValueBuilder.java
index dd384f87150..3d7fbc87d11 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockValueBuilder.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockValueBuilder.java
@@ -37,7 +37,7 @@ import org.apache.camel.support.builder.PredicateBuilder;
* specialized for being used with the mock component and separated from camel-core.
*/
public class MockValueBuilder implements Expression, Predicate {
- private Expression expression;
+ private final Expression expression;
private boolean not;
public MockValueBuilder(Expression expression) {
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java
index 4350990d1a1..f2ac4f3e8f5 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java
@@ -53,8 +53,8 @@ public class TimeClause implements BinaryPredicate {
public class TimeClassUnit {
private final TimeClause clause;
- private int from;
- private int to;
+ private final int from;
+ private final int to;
public TimeClassUnit(TimeClause clause, int to) {
this(clause, -1, to);
(camel) 01/04: (chores) camel-mock: code cleanup
Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit d1398a134adc467798c57e7fb3170223af55bc15
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri May 10 13:21:07 2024 +0200
(chores) camel-mock: code cleanup
- break large and complex methods
---
.../apache/camel/component/mock/MockEndpoint.java | 273 ++++++++++++---------
1 file changed, 160 insertions(+), 113 deletions(-)
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
index a3f3dd6d515..0483553aa23 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
@@ -462,14 +462,12 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
expectedMinimumCount <= receivedCounter);
}
- for (Runnable test : tests) {
- // skip tasks which we have already been running in fail fast mode
- boolean skip = failFast && test instanceof AssertionTask;
- if (!skip) {
- test.run();
- }
- }
+ runTests();
+ evalFailures();
+ }
+
+ private void evalFailures() {
for (Throwable failure : failures) {
if (failure != null) {
LOG.error("Caught exception on {} due to: {}", getEndpointUri(), failure.getMessage(), failure);
@@ -478,6 +476,16 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
}
}
+ private void runTests() {
+ for (Runnable test : tests) {
+ // skip tasks which we have already been running in fail fast mode
+ boolean skip = failFast && test instanceof AssertionTask;
+ if (!skip) {
+ test.run();
+ }
+ }
+ }
+
/**
* Validates that the assertions fail on this endpoint
*/
@@ -587,36 +595,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
// should not really happen but some tests don't start camel context
expectedHeaderValues = new HashMap<>();
}
- // we just wants to expect to be called once
- expects(new AssertionTask() {
- @Override
- public void assertOnIndex(int i) {
- final Exchange exchange = getReceivedExchange(i);
-
- for (Map.Entry<String, Object> entry : expectedHeaderValues.entrySet()) {
- String key = entry.getKey();
- Object expectedValue = entry.getValue();
-
- // we accept that an expectedValue of null also means that the header may be absent
- if (expectedValue != null) {
- assertTrue("Exchange " + i + " has no headers", exchange.getIn().hasHeaders());
- boolean hasKey = exchange.getIn().getHeaders().containsKey(key);
- assertTrue("No header with name " + key + " found for message: " + i, hasKey);
- }
-
- Object actualValue = exchange.getIn().getHeader(key);
- actualValue = extractActualValue(exchange, actualValue, expectedValue);
-
- assertEquals("Header with name " + key + " for message: " + i, expectedValue, actualValue);
- }
- }
-
- public void run() {
- for (int i = 0; i < getReceivedExchanges().size(); i++) {
- assertOnIndex(i);
- }
- }
- });
+ // we just want to expect to be called once
+ expects(new MockAssertionTask());
}
expectedHeaderValues.put(name, value);
}
@@ -1696,27 +1676,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
performAssertions(exchange, copy);
if (failFast) {
- // fail fast mode so check nth expectations as soon as possible
- int index = getReceivedCounter() - 1;
- for (Runnable test : tests) {
- // only assertion tasks can support fail fast mode
- if (test instanceof AssertionTask) {
- AssertionTask task = (AssertionTask) test;
- try {
- LOG.debug("Running assertOnIndex({}) on task: {}", index, task);
- task.assertOnIndex(index);
- } catch (AssertionError e) {
- failFastAssertionError = e;
- // signal latch we are done as we are failing fast
- LOG.debug("Assertion failed fast on {} received exchange due to {}", index, e.getMessage());
- while (latch != null && latch.getCount() > 0) {
- latch.countDown();
- }
- // we are failing fast
- break;
- }
- }
- }
+ doFailFast();
}
} catch (AssertionError | Exception e) {
// AssertionError extends java.lang.Error
@@ -1729,6 +1689,29 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
}
}
+ private void doFailFast() {
+ // fail fast mode so check nth expectations as soon as possible
+ int index = getReceivedCounter() - 1;
+ for (Runnable test : tests) {
+ // only assertion tasks can support fail fast mode
+ if (test instanceof AssertionTask task) {
+ try {
+ LOG.debug("Running assertOnIndex({}) on task: {}", index, task);
+ task.assertOnIndex(index);
+ } catch (AssertionError e) {
+ failFastAssertionError = e;
+ // signal latch we are done as we are failing fast
+ LOG.debug("Assertion failed fast on {} received exchange due to {}", index, e.getMessage());
+ while (latch != null && latch.getCount() > 0) {
+ latch.countDown();
+ }
+ // we are failing fast
+ break;
+ }
+ }
+ }
+ }
+
/**
* Performs the assertions on the incoming exchange.
*
@@ -1737,46 +1720,21 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
* @throws Exception can be thrown if something went wrong
*/
protected void performAssertions(Exchange exchange, Exchange copy) throws Exception {
- Message in = copy.getIn();
- Object actualBody = in.getBody();
+ final Message in = copy.getIn();
if (expectedHeaderValues != null) {
- if (actualHeaderValues == null) {
- HeadersMapFactory factory = getCamelContext().getCamelContextExtension().getHeadersMapFactory();
- if (factory != null) {
- actualHeaderValues = factory.newMap();
- } else {
- // should not really happen but some tests don't start camel context
- actualHeaderValues = new HashMap<>();
- }
- }
- if (in.hasHeaders()) {
- actualHeaderValues.putAll(in.getHeaders());
- }
+ assertExpectedHeaderValues(in);
}
+ Object actualBody = in.getBody();
+
if (expectedBodyValues != null) {
- int index = actualBodyValues.size();
- if (expectedBodyValues.size() > index) {
- Object expectedBody = expectedBodyValues.get(index);
- if (expectedBody != null) {
- // prefer to convert body early, for example when using files
- // we need to read the content at this time
- Object body = in.getBody(expectedBody.getClass());
- if (body != null) {
- actualBody = body;
- }
- }
- actualBodyValues.add(actualBody);
- }
+ actualBody = assertExpectedBodyValues(in, actualBody);
}
// let counter be 0 index-based in the logs
if (LOG.isDebugEnabled()) {
- String msg = getEndpointUri() + " >>>> " + counter + " : " + copy + " with body: " + actualBody;
- if (copy.getIn().hasHeaders()) {
- msg += " and headers:" + copy.getIn().getHeaders();
- }
+ final String msg = buildLogMessage(getEndpointUri(), counter, copy, actualBody);
LOG.debug(msg);
}
@@ -1792,15 +1750,60 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
? processors.get(receivedCounter) : defaultProcessor;
if (processor != null) {
- try {
- // must process the incoming exchange and NOT the copy as the idea
- // is the end user can manipulate the exchange
- processor.process(exchange);
- } catch (Exception e) {
- // set exceptions on exchange so we can throw exceptions to simulate errors
- exchange.setException(e);
+ tryProcessing(exchange, processor);
+ }
+ }
+
+ private static void tryProcessing(Exchange exchange, Processor processor) {
+ try {
+ // must process the incoming exchange and NOT the copy as the idea
+ // is the end user can manipulate the exchange
+ processor.process(exchange);
+ } catch (Exception e) {
+ // set exceptions on exchange, so we can throw exceptions to simulate errors
+ exchange.setException(e);
+ }
+ }
+
+ private static String buildLogMessage(String endpontUri, AtomicInteger counter, Exchange copy, Object actualBody) {
+ String msg = endpontUri + " >>>> " + counter + " : " + copy
+ + (actualBody != null ? " with body: " + actualBody : "null body");
+ if (copy.getIn().hasHeaders()) {
+ msg += " and headers:" + copy.getIn().getHeaders();
+ }
+ return msg;
+ }
+
+ private Object assertExpectedBodyValues(Message in, Object actualBody) {
+ int index = actualBodyValues.size();
+ if (expectedBodyValues.size() > index) {
+ Object expectedBody = expectedBodyValues.get(index);
+ if (expectedBody != null) {
+ // prefer to convert body early, for example when using files
+ // we need to read the content at this time
+ Object body = in.getBody(expectedBody.getClass());
+ if (body != null) {
+ actualBody = body;
+ }
+ }
+ actualBodyValues.add(actualBody);
+ }
+ return actualBody;
+ }
+
+ private void assertExpectedHeaderValues(Message in) {
+ if (actualHeaderValues == null) {
+ HeadersMapFactory factory = getCamelContext().getCamelContextExtension().getHeadersMapFactory();
+ if (factory != null) {
+ actualHeaderValues = factory.newMap();
+ } else {
+ // should not really happen but some tests don't start camel context
+ actualHeaderValues = new HashMap<>();
}
}
+ if (in.hasHeaders()) {
+ actualHeaderValues.putAll(in.getHeaders());
+ }
}
/**
@@ -1809,32 +1812,47 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
* @param copy a copy of the received exchange
*/
protected void addReceivedExchange(Exchange copy) {
- if (retainFirst == 0 && retainLast == 0) {
+ if (isNotRetain()) {
// do not retain any messages at all
- } else if (retainFirst < 0 && retainLast < 0) {
+ return;
+ }
+
+ if (retainAll()) {
// no limitation so keep them all
receivedExchanges.add(copy);
} else {
- // okay there is some sort of limitations, so figure out what to retain
- if (retainFirst > 0 && counter.get() < retainFirst) {
- // store a copy as it is within the retain first limitation
- receivedExchanges.add(copy);
- } else if (retainLast > 0) {
- // remove the oldest from the last retained boundary,
- int index = receivedExchanges.size() - retainLast;
- if (index >= 0) {
- // but must be outside the first range as well
- // otherwise we should not remove the oldest
- if (retainFirst <= 0 || retainFirst <= index) {
- receivedExchanges.remove(index);
- }
+ retainSome(copy);
+ }
+ }
+
+ private void retainSome(Exchange copy) {
+ // okay there is some sort of limitations, so figure out what to retain
+ if (retainFirst > 0 && counter.get() < retainFirst) {
+ // store a copy as it is within the retain first limitation
+ receivedExchanges.add(copy);
+ } else if (retainLast > 0) {
+ // remove the oldest from the last retained boundary,
+ int index = receivedExchanges.size() - retainLast;
+ if (index >= 0) {
+ // but must be outside the first range as well
+ // otherwise we should not remove the oldest
+ if (retainFirst <= 0 || retainFirst <= index) {
+ receivedExchanges.remove(index);
}
- // store a copy of the last nth received
- receivedExchanges.add(copy);
}
+ // store a copy of the last nth received
+ receivedExchanges.add(copy);
}
}
+ private boolean retainAll() {
+ return retainFirst < 0 && retainLast < 0;
+ }
+
+ private boolean isNotRetain() {
+ return retainFirst == 0 && retainLast == 0;
+ }
+
/**
* Reset the latch to {@code null} if it was not {@code null} but before, wait until the latch is released to ensure
* that all expected messages are fully processed (until the latch countDown) to prevent conflicts with subsequent
@@ -1985,4 +2003,33 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
}
}
+ private class MockAssertionTask implements AssertionTask {
+ @Override
+ public void assertOnIndex(int i) {
+ final Exchange exchange = getReceivedExchange(i);
+
+ for (Map.Entry<String, Object> entry : expectedHeaderValues.entrySet()) {
+ String key = entry.getKey();
+ Object expectedValue = entry.getValue();
+
+ // we accept that an expectedValue of null also means that the header may be absent
+ if (expectedValue != null) {
+ assertTrue("Exchange " + i + " has no headers", exchange.getIn().hasHeaders());
+ boolean hasKey = exchange.getIn().getHeaders().containsKey(key);
+ assertTrue("No header with name " + key + " found for message: " + i, hasKey);
+ }
+
+ Object actualValue = exchange.getIn().getHeader(key);
+ actualValue = extractActualValue(exchange, actualValue, expectedValue);
+
+ assertEquals("Header with name " + key + " for message: " + i, expectedValue, actualValue);
+ }
+ }
+
+ public void run() {
+ for (int i = 0; i < getReceivedExchanges().size(); i++) {
+ assertOnIndex(i);
+ }
+ }
+ }
}
(camel) 02/04: (chores) camel-mock: code cleanup
Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4116edbe084709898cdee3f1d9b147631f3ad86f
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri May 10 14:25:01 2024 +0200
(chores) camel-mock: code cleanup
- break large and complex methods
---
.../apache/camel/component/mock/TimeClause.java | 43 ++++++++++++----------
1 file changed, 24 insertions(+), 19 deletions(-)
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java
index 2328e39cdc4..4350990d1a1 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java
@@ -153,25 +153,7 @@ public class TimeClause implements BinaryPredicate {
Date currentDate = exchange.getProperty(Exchange.RECEIVED_TIMESTAMP, Date.class);
- // the other date is either the previous or the next
- Date otherDate;
- if (beforeNext) {
- // grab the previous value (left)
- if (leftValue != null) {
- otherDate = (Date) leftValue;
- } else {
- // we hit a boundary so grab the other
- otherDate = (Date) rightValue;
- }
- } else {
- // grab the next value (right)
- if (rightValue != null) {
- otherDate = (Date) rightValue;
- } else {
- // we hit a boundary so grab the other
- otherDate = (Date) leftValue;
- }
- }
+ final Date otherDate = getOtherDate(leftValue, rightValue);
// if we could not grab the value, we hit a boundary (ie. either 0 message or last message)
if (otherDate == null) {
@@ -202,6 +184,29 @@ public class TimeClause implements BinaryPredicate {
return answer;
}
+ private Date getOtherDate(Object leftValue, Object rightValue) {
+ // the other date is either the previous or the next
+ Date otherDate;
+ if (beforeNext) {
+ // grab the previous value (left)
+ if (leftValue != null) {
+ otherDate = (Date) leftValue;
+ } else {
+ // we hit a boundary so grab the other
+ otherDate = (Date) rightValue;
+ }
+ } else {
+ // grab the next value (right)
+ if (rightValue != null) {
+ otherDate = (Date) rightValue;
+ } else {
+ // we hit a boundary so grab the other
+ otherDate = (Date) leftValue;
+ }
+ }
+ return otherDate;
+ }
+
@Override
public String getOperator() {
return getOperationText();
(camel) 04/04: (chores) camel-mock: documentation fixes
Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 9b24ccdae924d9be7345cd0237c686e956a22e79
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri May 10 14:18:55 2024 +0200
(chores) camel-mock: documentation fixes
---
.../camel/catalog/components/dataset-test.json | 4 +-
.../apache/camel/catalog/components/dataset.json | 4 +-
.../org/apache/camel/catalog/components/mock.json | 4 +-
.../camel/component/dataset/dataset-test.json | 4 +-
.../apache/camel/component/dataset/dataset.json | 4 +-
.../org/apache/camel/component/mock/mock.json | 4 +-
.../camel/component/mock/AssertionClause.java | 4 +-
.../mock/InterceptSendToMockEndpointStrategy.java | 4 +-
.../apache/camel/component/mock/MockComponent.java | 4 +-
.../apache/camel/component/mock/MockEndpoint.java | 88 +++++++++++-----------
.../camel/component/mock/MockExpressionClause.java | 4 +-
.../mock/MockExpressionClauseSupport.java | 6 +-
.../camel/component/mock/MockValueBuilder.java | 6 +-
.../apache/camel/component/mock/TimeClause.java | 8 +-
.../dsl/DatasetComponentBuilderFactory.java | 2 +-
.../dsl/DatasetTestComponentBuilderFactory.java | 2 +-
.../component/dsl/MockComponentBuilderFactory.java | 2 +-
.../dsl/DataSetEndpointBuilderFactory.java | 24 +++---
.../dsl/DataSetTestEndpointBuilderFactory.java | 24 +++---
.../endpoint/dsl/MockEndpointBuilderFactory.java | 24 +++---
.../camel/kotlin/components/DatasetTestUriDsl.kt | 8 +-
.../camel/kotlin/components/DatasetUriDsl.kt | 8 +-
.../apache/camel/kotlin/components/MockUriDsl.kt | 8 +-
23 files changed, 125 insertions(+), 125 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dataset-test.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dataset-test.json
index d9133b797d6..b684b1e07d0 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dataset-test.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dataset-test.json
@@ -24,14 +24,14 @@
},
"componentProperties": {
"lazyStartProducer": { "index": 0, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
- "log": { "index": 1, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.componen [...]
+ "log": { "index": 1, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.compone [...]
"autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
"exchangeFormatter": { "index": 3, "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." }
},
"properties": {
"name": { "index": 0, "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of endpoint to lookup in the registry to use for polling messages used for testing" },
"anyOrder": { "index": 1, "kind": "parameter", "displayName": "Any Order", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the expected messages should arrive in the same order or can be in any order." },
- "assertPeriod": { "index": 2, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 s [...]
+ "assertPeriod": { "index": 2, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 arrive. For example, if the expected count [...]
"delimiter": { "index": 3, "kind": "parameter", "displayName": "Delimiter", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The split delimiter to use when split is enabled. By default the delimiter is new line based. The delimiter can be a regular expression." },
"expectedCount": { "index": 4, "kind": "parameter", "displayName": "Expected Count", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "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 [...]
"failFast": { "index": 5, "kind": "parameter", "displayName": "Fail Fast", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 defaul [...]
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dataset.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dataset.json
index 22d385e7feb..4aea601a895 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dataset.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/dataset.json
@@ -25,7 +25,7 @@
"componentProperties": {
"bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the like [...]
"lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
- "log": { "index": 2, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.componen [...]
+ "log": { "index": 2, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.compone [...]
"autowiredEnabled": { "index": 3, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
"exchangeFormatter": { "index": 4, "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." }
},
@@ -42,7 +42,7 @@
"bridgeErrorHandler": { "index": 6, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming [...]
"exceptionHandler": { "index": 7, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By def [...]
"exchangePattern": { "index": 8, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
- "assertPeriod": { "index": 9, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 s [...]
+ "assertPeriod": { "index": 9, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 arrive. For example, if the expected count [...]
"consumeDelay": { "index": 10, "kind": "parameter", "displayName": "Consume Delay", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0", "description": "Allows a delay to be specified which causes a delay when a message is consumed by the producer (to simulate slow processing)" },
"expectedCount": { "index": 11, "kind": "parameter", "displayName": "Expected Count", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "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 [...]
"failFast": { "index": 12, "kind": "parameter", "displayName": "Fail Fast", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 defau [...]
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mock.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mock.json
index 6942bc3a175..9156c82b1b9 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mock.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mock.json
@@ -24,13 +24,13 @@
},
"componentProperties": {
"lazyStartProducer": { "index": 0, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
- "log": { "index": 1, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.componen [...]
+ "log": { "index": 1, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.compone [...]
"autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
"exchangeFormatter": { "index": 3, "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." }
},
"properties": {
"name": { "index": 0, "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of mock endpoint" },
- "assertPeriod": { "index": 1, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 s [...]
+ "assertPeriod": { "index": 1, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 arrive. For example, if the expected count [...]
"expectedCount": { "index": 2, "kind": "parameter", "displayName": "Expected Count", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "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 [...]
"failFast": { "index": 3, "kind": "parameter", "displayName": "Fail Fast", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 defaul [...]
"log": { "index": 4, "kind": "parameter", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.compone [...]
diff --git a/components/camel-dataset/src/generated/resources/META-INF/org/apache/camel/component/dataset/dataset-test.json b/components/camel-dataset/src/generated/resources/META-INF/org/apache/camel/component/dataset/dataset-test.json
index d9133b797d6..b684b1e07d0 100644
--- a/components/camel-dataset/src/generated/resources/META-INF/org/apache/camel/component/dataset/dataset-test.json
+++ b/components/camel-dataset/src/generated/resources/META-INF/org/apache/camel/component/dataset/dataset-test.json
@@ -24,14 +24,14 @@
},
"componentProperties": {
"lazyStartProducer": { "index": 0, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
- "log": { "index": 1, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.componen [...]
+ "log": { "index": 1, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.compone [...]
"autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
"exchangeFormatter": { "index": 3, "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." }
},
"properties": {
"name": { "index": 0, "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of endpoint to lookup in the registry to use for polling messages used for testing" },
"anyOrder": { "index": 1, "kind": "parameter", "displayName": "Any Order", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the expected messages should arrive in the same order or can be in any order." },
- "assertPeriod": { "index": 2, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 s [...]
+ "assertPeriod": { "index": 2, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 arrive. For example, if the expected count [...]
"delimiter": { "index": 3, "kind": "parameter", "displayName": "Delimiter", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The split delimiter to use when split is enabled. By default the delimiter is new line based. The delimiter can be a regular expression." },
"expectedCount": { "index": 4, "kind": "parameter", "displayName": "Expected Count", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "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 [...]
"failFast": { "index": 5, "kind": "parameter", "displayName": "Fail Fast", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 defaul [...]
diff --git a/components/camel-dataset/src/generated/resources/META-INF/org/apache/camel/component/dataset/dataset.json b/components/camel-dataset/src/generated/resources/META-INF/org/apache/camel/component/dataset/dataset.json
index 22d385e7feb..4aea601a895 100644
--- a/components/camel-dataset/src/generated/resources/META-INF/org/apache/camel/component/dataset/dataset.json
+++ b/components/camel-dataset/src/generated/resources/META-INF/org/apache/camel/component/dataset/dataset.json
@@ -25,7 +25,7 @@
"componentProperties": {
"bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the like [...]
"lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
- "log": { "index": 2, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.componen [...]
+ "log": { "index": 2, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.compone [...]
"autowiredEnabled": { "index": 3, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
"exchangeFormatter": { "index": 4, "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." }
},
@@ -42,7 +42,7 @@
"bridgeErrorHandler": { "index": 6, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming [...]
"exceptionHandler": { "index": 7, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By def [...]
"exchangePattern": { "index": 8, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
- "assertPeriod": { "index": 9, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 s [...]
+ "assertPeriod": { "index": 9, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 arrive. For example, if the expected count [...]
"consumeDelay": { "index": 10, "kind": "parameter", "displayName": "Consume Delay", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0", "description": "Allows a delay to be specified which causes a delay when a message is consumed by the producer (to simulate slow processing)" },
"expectedCount": { "index": 11, "kind": "parameter", "displayName": "Expected Count", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "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 [...]
"failFast": { "index": 12, "kind": "parameter", "displayName": "Fail Fast", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 defau [...]
diff --git a/components/camel-mock/src/generated/resources/META-INF/org/apache/camel/component/mock/mock.json b/components/camel-mock/src/generated/resources/META-INF/org/apache/camel/component/mock/mock.json
index 6942bc3a175..9156c82b1b9 100644
--- a/components/camel-mock/src/generated/resources/META-INF/org/apache/camel/component/mock/mock.json
+++ b/components/camel-mock/src/generated/resources/META-INF/org/apache/camel/component/mock/mock.json
@@ -24,13 +24,13 @@
},
"componentProperties": {
"lazyStartProducer": { "index": 0, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
- "log": { "index": 1, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.componen [...]
+ "log": { "index": 1, "kind": "property", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.compone [...]
"autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
"exchangeFormatter": { "index": 3, "kind": "property", "displayName": "Exchange Formatter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExchangeFormatter", "deprecated": false, "autowired": true, "secret": false, "description": "Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified, we default to DefaultExchangeFormatter." }
},
"properties": {
"name": { "index": 0, "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of mock endpoint" },
- "assertPeriod": { "index": 1, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 s [...]
+ "assertPeriod": { "index": 1, "kind": "parameter", "displayName": "Assert Period", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "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 arrive. For example, if the expected count [...]
"expectedCount": { "index": 2, "kind": "parameter", "displayName": "Expected Count", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "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 [...]
"failFast": { "index": 3, "kind": "parameter", "displayName": "Fail Fast", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 defaul [...]
"log": { "index": 4, "kind": "parameter", "displayName": "Log", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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.compone [...]
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/AssertionClause.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/AssertionClause.java
index 7f21f5737c2..21b8fc2aa62 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/AssertionClause.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/AssertionClause.java
@@ -78,7 +78,7 @@ public abstract class AssertionClause extends MockExpressionClauseSupport<MockVa
}
/**
- * Adds a {@link TimeClause} predicate for message arriving.
+ * Adds a {@link TimeClause} predicate for the message arriving.
*/
public TimeClause arrives() {
final TimeClause clause = new TimeClause(previous, next);
@@ -104,7 +104,7 @@ public abstract class AssertionClause extends MockExpressionClauseSupport<MockVa
if (exchange != null) {
Object value = exchange.getMessage().getBody();
- // if the value is StreamCache then ensure its readable before evaluating any predicates
+ // if the value is StreamCache then ensure It's readable before evaluating any predicates
// by resetting it (this is also what StreamCachingAdvice does)
if (value instanceof StreamCache) {
((StreamCache) value).reset();
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/InterceptSendToMockEndpointStrategy.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/InterceptSendToMockEndpointStrategy.java
index 96f3e2754ae..f52ae516bf8 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/InterceptSendToMockEndpointStrategy.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/InterceptSendToMockEndpointStrategy.java
@@ -78,14 +78,14 @@ public class InterceptSendToMockEndpointStrategy implements EndpointStrategy {
// we should not intercept mock endpoints
return endpoint;
} else if (matchPattern(uri, endpoint, pattern)) {
- // if pattern is null then it mean to match all
+ // if a pattern is null, then it means to match all
// only proxy if the uri is matched decorate endpoint with our proxy
// should be false by default
InterceptSendToEndpoint proxy = new DefaultInterceptSendToEndpoint(endpoint, skip);
// create mock endpoint which we will use as interceptor
- // replace :// from scheme to make it easy to lookup the mock endpoint without having double :// in uri
+ // replace :// from scheme to make it easy to look up the mock endpoint without having double :// in uri
String key = "mock:" + endpoint.getEndpointKey().replaceFirst("://", ":");
// strip off parameters as well
if (key.contains("?")) {
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockComponent.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockComponent.java
index 429dd5a904d..3667f3686d4 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockComponent.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockComponent.java
@@ -84,8 +84,8 @@ public class MockComponent extends DefaultComponent {
/**
* To turn on logging when the mock receives an incoming message.
* <p/>
- * 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.
+ * 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.
*/
public void setLog(boolean log) {
this.log = log;
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
index 0483553aa23..4caf337da71 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
@@ -72,26 +72,26 @@ import org.slf4j.LoggerFactory;
* A Mock endpoint which provides a literate, fluent API for testing routes using a <a href="http://jmock.org/">JMock
* style</a> API.
* <p/>
- * The mock endpoint have two set of methods
+ * The mock endpoint have two sets of methods
* <ul>
* <li>expectedXXX or expectsXXX - To set pre conditions, before the test is executed</li>
* <li>assertXXX - To assert assertions, after the test has been executed</li>
* </ul>
- * Its <b>important</b> to know the difference between the two set. The former is used to set expectations before the
- * test is being started (eg before the mock receives messages). The latter is used after the test has been executed, to
- * verify the expectations; or other assertions which you can perform after the test has been completed.
+ * Its <b>important</b> to know the difference between the two sets. The former is used to set expectations before the
+ * test is being started (e.g., before the mock receives messages). The latter is used after the test has been executed,
+ * to verify the expectations; or other assertions which you can perform after the test has been completed.
* <p/>
* <b>Beware:</b> If you want to expect a mock does not receive any messages, by calling
* {@link #setExpectedMessageCount(int)} with <tt>0</tt>, then take extra care, as <tt>0</tt> 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
+ * start, so you need to set an assert period time to let the test run for a while to make sure there are still no
* messages arrived; for that use {@link #setAssertPeriod(long)}. An alternative is to use
* <a href="http://camel.apache.org/notifybuilder.html">NotifyBuilder</a>, and use the notifier to know when Camel is
* done routing some messages, before you call the {@link #assertIsSatisfied()} method on the mocks. This allows you to
- * not use a fixed assert period, to speedup testing times.
+ * not use a fixed assertion period to speed up testing times.
* <p/>
* <b>Important:</b> If using {@link #expectedMessageCount(int)} and also
* {@link #expectedBodiesReceived(java.util.List)} or {@link #expectedHeaderReceived(String, Object)} then the latter
- * overrides the number of expected message based on the number of values provided in the bodies/headers.
+ * overrides the number of expected messages based on the number of values provided in the bodies/headers.
*/
@UriEndpoint(firstVersion = "1.0.0", scheme = "mock", title = "Mock", syntax = "mock:name", producerOnly = true,
remote = false, category = { Category.CORE, Category.TESTING }, lenientProperties = true)
@@ -99,7 +99,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
private static final Logger LOG = LoggerFactory.getLogger(MockEndpoint.class);
- // must be volatile so changes is visible between the thread which performs the assertions
+ // must be volatile so changes are visible between the thread which performs the assertions
// and the threads which process the exchanges when routing messages in Camel
protected volatile Processor reporter;
@@ -158,7 +158,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* A helper method to resolve the mock endpoint of the given URI on the given context
*
- * @param context the camel context to try resolve the mock endpoint from
+ * @param context the camel context to try to resolve the mock endpoint from
* @param uri the uri of the endpoint to resolve
* @return the endpoint
*/
@@ -204,7 +204,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
ObjectHelper.notNull(context, "camelContext");
Collection<Endpoint> endpoints = context.getEndpoints();
for (Endpoint endpoint : endpoints) {
- // if the endpoint was intercepted we should get the delegate
+ // if the endpoint was intercepted, we should get the delegate
if (endpoint instanceof InterceptSendToEndpoint) {
endpoint = ((InterceptSendToEndpoint) endpoint).getOriginalEndpoint();
}
@@ -228,7 +228,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
Collection<Endpoint> endpoints = context.getEndpoints();
long millis = unit.toMillis(timeout);
for (Endpoint endpoint : endpoints) {
- // if the endpoint was intercepted we should get the delegate
+ // if the endpoint was intercepted, we should get the delegate
if (endpoint instanceof InterceptSendToEndpoint) {
endpoint = ((InterceptSendToEndpoint) endpoint).getOriginalEndpoint();
}
@@ -241,7 +241,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
}
/**
- * Sets the assert period on all the expectations on any {@link MockEndpoint} instances registered in the given
+ * Sets the assertion period on all the expectations on any {@link MockEndpoint} instances registered in the given
* context.
*
* @param context the camel context used to find all the available endpoints
@@ -251,7 +251,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
ObjectHelper.notNull(context, "camelContext");
Collection<Endpoint> endpoints = context.getEndpoints();
for (Endpoint endpoint : endpoints) {
- // if the endpoint was intercepted we should get the delegate
+ // if the endpoint was intercepted, we should get the delegate
if (endpoint instanceof InterceptSendToEndpoint) {
endpoint = ((InterceptSendToEndpoint) endpoint).getOriginalEndpoint();
}
@@ -271,7 +271,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
ObjectHelper.notNull(context, "camelContext");
Collection<Endpoint> endpoints = context.getEndpoints();
for (Endpoint endpoint : endpoints) {
- // if the endpoint was intercepted we should get the delegate
+ // if the endpoint was intercepted, we should get the delegate
if (endpoint instanceof InterceptSendToEndpoint) {
endpoint = ((InterceptSendToEndpoint) endpoint).getOriginalEndpoint();
}
@@ -359,7 +359,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
}
/**
- * Set the processor that will be invoked when the some message is received.
+ * Set the processor that will be invoked when some message is received.
*
* This processor could be overwritten by {@link #whenExchangeReceived(int, Processor)} method.
*/
@@ -370,7 +370,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Set the expression which value will be set to the message body
*
- * @param expression which is use to set the message body
+ * @param expression expression used to set the message body
*/
public void returnReplyBody(Expression expression) {
this.defaultProcessor = new Processor() {
@@ -392,7 +392,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
* Set the expression which value will be set to the message header
*
* @param headerName that will be set value
- * @param expression which is use to set the message header
+ * @param expression expression used to set the message header
*/
public void returnReplyHeader(String headerName, Expression expression) {
this.defaultProcessor = new Processor() {
@@ -426,7 +426,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
LOG.info("Asserting: {} is satisfied", this);
doAssertIsSatisfied(timeoutForEmptyEndpoints);
if (assertPeriod > 0) {
- // if an assert period was set then re-assert again to ensure the assertion is still valid
+ // if an assertion period was set, then re-assert again to ensure the assertion is still valid
Thread.sleep(assertPeriod);
LOG.info("Re-asserting: {} is satisfied after {} millis", this, assertPeriod);
// do not use timeout when we re-assert
@@ -537,7 +537,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Specifies the expected number of message exchanges that should be received by this endpoint
*
- * If you want to assert that <b>exactly</b> n messages arrives to this mock endpoint, then see also the
+ * If you want to assert that <b>exactly</b> n messages arrive to this mock endpoint, then see also the
* {@link #setAssertPeriod(long)} method for further details.
*
* @param expectedCount the number of message exchanges that should be expected by this endpoint
@@ -555,12 +555,12 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
* Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary assertion is still
* valid.
* <p/>
- * This is used for example to assert that <b>exactly</b> 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.
+ * This is used, for example, to assert that <b>exactly</b> a number of messages arrive. For example, if the
+ * expected count was set to 5, then the assertion is satisfied when five or more messages arrive. To ensure that
+ * exactly 5 messages arrive, then you would need to wait a little period to ensure no further message arrives. This
+ * is what you can use this method for.
* <p/>
- * By default this period is disabled.
+ * By default, this period is disabled.
*
* @param period grace period in millis
*/
@@ -628,8 +628,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Adds an expectation that this endpoint receives the given header values in any order.
* <p/>
- * <b>Important:</b> The number of values must match the expected number of messages, so if you expect 3 messages,
- * then there must be 3 values.
+ * <b>Important:</b> The number of values must match the expected number of messages, so if you expect three
+ * messages, then there must be three values.
* <p/>
* <b>Important:</b> This overrides any previous set value using {@link #expectedMessageCount(int)}
*/
@@ -662,8 +662,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Adds an expectation that this endpoint receives the given header values in any order
* <p/>
- * <b>Important:</b> The number of values must match the expected number of messages, so if you expect 3 messages,
- * then there must be 3 values.
+ * <b>Important:</b> The number of values must match the expected number of messages, so if you expect three
+ * messages, then there must be three values.
* <p/>
* <b>Important:</b> This overrides any previous set value using {@link #expectedMessageCount(int)}
*/
@@ -716,8 +716,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Adds an expectation that this endpoint receives the given variable values in any order.
* <p/>
- * <b>Important:</b> The number of variable must match the expected number of messages, so if you expect 3 messages,
- * then there must be 3 values.
+ * <b>Important:</b> The number of variable must match the expected number of messages, so if you expect three
+ * messages, then there must be three values.
* <p/>
* <b>Important:</b> This overrides any previous set value using {@link #expectedMessageCount(int)}
*/
@@ -750,8 +750,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Adds an expectation that this endpoint receives the given variable values in any order
* <p/>
- * <b>Important:</b> The number of values must match the expected number of messages, so if you expect 3 messages,
- * then there must be 3 values.
+ * <b>Important:</b> The number of values must match the expected number of messages, so if you expect three
+ * messages, then there must be three values.
* <p/>
* <b>Important:</b> This overrides any previous set value using {@link #expectedMessageCount(int)}
*/
@@ -804,8 +804,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Adds an expectation that this endpoint receives the given property values in any order.
* <p/>
- * <b>Important:</b> The number of values must match the expected number of messages, so if you expect 3 messages,
- * then there must be 3 values.
+ * <b>Important:</b> The number of values must match the expected number of messages, so if you expect three
+ * messages, then there must be three values.
* <p/>
* <b>Important:</b> This overrides any previous set value using {@link #expectedMessageCount(int)}
*/
@@ -838,8 +838,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Adds an expectation that this endpoint receives the given property values in any order
* <p/>
- * <b>Important:</b> The number of values must match the expected number of messages, so if you expect 3 messages,
- * then there must be 3 values.
+ * <b>Important:</b> The number of values must match the expected number of messages, so if you expect three
+ * messages, then there must be three values.
* <p/>
* <b>Important:</b> This overrides any previous set value using {@link #expectedMessageCount(int)}
*/
@@ -851,8 +851,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Adds an expectation that this endpoint receives the given body values in the specified order
* <p/>
- * <b>Important:</b> The number of values must match the expected number of messages, so if you expect 3 messages,
- * then there must be 3 values.
+ * <b>Important:</b> The number of values must match the expected number of messages, so if you expect three
+ * messages, then there must be three values.
* <p/>
* <b>Important:</b> This overrides any previous set value using {@link #expectedMessageCount(int)}
*/
@@ -927,8 +927,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Sets an expectation that the given body values are received by this endpoint
* <p/>
- * <b>Important:</b> The number of bodies must match the expected number of messages, so if you expect 3 messages,
- * then there must be 3 bodies.
+ * <b>Important:</b> The number of bodies must match the expected number of messages, so if you expect three
+ * messages, then there must be three bodies.
* <p/>
* <b>Important:</b> This overrides any previous set value using {@link #expectedMessageCount(int)}
*/
@@ -967,8 +967,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Adds an expectation that this endpoint receives the given body values in any order
* <p/>
- * <b>Important:</b> The number of bodies must match the expected number of messages, so if you expect 3 messages,
- * then there must be 3 bodies.
+ * <b>Important:</b> The number of bodies must match the expected number of messages, so if you expect three
+ * messages, then there must be three bodies.
* <p/>
* <b>Important:</b> This overrides any previous set value using {@link #expectedMessageCount(int)}
*/
@@ -992,8 +992,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
/**
* Adds an expectation that this endpoint receives the given body values in any order
* <p/>
- * <b>Important:</b> The number of bodies must match the expected number of messages, so if you expect 3 messages,
- * then there must be 3 bodies.
+ * <b>Important:</b> The number of bodies must match the expected number of messages, so if you expect three
+ * messages, then there must be three bodies.
* <p/>
* <b>Important:</b> This overrides any previous set value using {@link #expectedMessageCount(int)}
*/
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClause.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClause.java
index 4ee316409f7..0138366f431 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClause.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClause.java
@@ -261,7 +261,7 @@ public class MockExpressionClause<T> implements Expression, Predicate {
}
/**
- * An expression of an inbound message header of the given name
+ * An expression of an inbound message header with the given name
*/
public T header(String name) {
return delegate.header(name);
@@ -275,7 +275,7 @@ public class MockExpressionClause<T> implements Expression, Predicate {
}
/**
- * An expression of an exchange property of the given name
+ * An expression of an exchange property with the given name
*/
public T exchangeProperty(String name) {
return delegate.exchangeProperty(name);
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClauseSupport.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClauseSupport.java
index 5110dfb2ad0..c53e5fe23aa 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClauseSupport.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClauseSupport.java
@@ -99,7 +99,7 @@ public class MockExpressionClauseSupport<T> {
}
/**
- * An expression of an inbound message header of the given name
+ * An expression of an inbound message header with the given name
*/
public T header(String name) {
return expression(ExpressionBuilder.headerExpression(name));
@@ -120,7 +120,7 @@ public class MockExpressionClauseSupport<T> {
}
/**
- * An expression of an exchange property of the given name
+ * An expression of an exchange property with the given name
*/
public T exchangeProperty(String name) {
return expression(ExpressionBuilder.exchangePropertyExpression(name));
@@ -276,7 +276,7 @@ public class MockExpressionClauseSupport<T> {
}
/**
- * An expression of a variable of the given name
+ * An expression of a variable with the given name
*/
public T variable(String name) {
return expression(ExpressionBuilder.variableExpression(name));
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockValueBuilder.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockValueBuilder.java
index 3d7fbc87d11..a10eaf92375 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockValueBuilder.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockValueBuilder.java
@@ -104,7 +104,7 @@ public class MockValueBuilder implements Expression, Predicate {
return answer.evaluate(exchange, Object.class);
}
};
- // okay now we can set the reference to the right-hand-side
+ // okay, now we can set the reference to the right-hand-side
ref.set(right);
return answer;
@@ -187,7 +187,7 @@ public class MockValueBuilder implements Expression, Predicate {
}
/**
- * Create a predicate that the left hand expression contains the value of the right hand expression
+ * Create a predicate that the left-hand expression contains the value of the right-hand expression
*
* @param value the element which is compared to be contained within this expression
* @return a predicate which evaluates to true if the given value expression is contained within this
@@ -227,7 +227,7 @@ public class MockValueBuilder implements Expression, Predicate {
public MockValueBuilder tokenize(String token, String group, boolean skipFirst) {
Expression newExp = ExpressionBuilder.tokenizeExpression(expression, token);
if (group == null && skipFirst) {
- // wrap in skip first (if group then it has its own skip first logic)
+ // wrap in skip first (if group then it has its own skip-first logic)
newExp = ExpressionBuilder.skipFirstExpression(newExp);
}
newExp = ExpressionBuilder.groupIteratorExpression(newExp, token, group, skipFirst);
diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java
index f2ac4f3e8f5..064b65a2599 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/TimeClause.java
@@ -27,7 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Represents time based clauses for setting expectations on the mocks. Such as time constrains for the received
+ * Represents time-based clauses for setting expectations on the mocks. Such as time constrains for the received
* messages.
*/
public class TimeClause implements BinaryPredicate {
@@ -128,7 +128,7 @@ public class TimeClause implements BinaryPredicate {
@Override
public String matchesReturningFailureMessage(Exchange exchange) {
- // we must not store any state, so we can be thread safe
+ // we must not store any state, so we can be thread-safe,
// and thus we offer this method which returns a failure message if
// we did not match
String answer = null;
@@ -155,7 +155,7 @@ public class TimeClause implements BinaryPredicate {
final Date otherDate = getOtherDate(leftValue, rightValue);
- // if we could not grab the value, we hit a boundary (ie. either 0 message or last message)
+ // if we could not grab the value, we hit a boundary (i.e., either 0 message or last message)
if (otherDate == null) {
return true;
}
@@ -163,7 +163,7 @@ public class TimeClause implements BinaryPredicate {
// compute if we were within the allowed time range
Time current = new Time(currentDate.getTime(), TimeUnit.MILLISECONDS);
Time other = new Time(otherDate.getTime(), TimeUnit.MILLISECONDS);
- // must absolute delta as when we hit the boundaries the delta would negative
+ // must absolute delta as when we hit the boundaries, the delta would negative
long delta = Math.abs(other.toMillis() - current.toMillis());
was = "delta: " + delta + " millis";
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DatasetComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DatasetComponentBuilderFactory.java
index 98c2365d517..a1b1c63955e 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DatasetComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DatasetComponentBuilderFactory.java
@@ -107,7 +107,7 @@ public interface DatasetComponentBuilderFactory {
/**
* 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
+ * 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.
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DatasetTestComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DatasetTestComponentBuilderFactory.java
index 9b9c538a8e8..7bb60893b0f 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DatasetTestComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DatasetTestComponentBuilderFactory.java
@@ -81,7 +81,7 @@ public interface DatasetTestComponentBuilderFactory {
/**
* 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
+ * 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.
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/MockComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/MockComponentBuilderFactory.java
index d6f626eaed6..e11e890514f 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/MockComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/MockComponentBuilderFactory.java
@@ -79,7 +79,7 @@ public interface MockComponentBuilderFactory {
/**
* 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
+ * 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.
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataSetEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataSetEndpointBuilderFactory.java
index 01fcd62f91c..7327f6407ed 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataSetEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataSetEndpointBuilderFactory.java
@@ -353,13 +353,13 @@ public interface DataSetEndpointBuilderFactory {
}
/**
* 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 the preliminary assertion is still valid. This is used, for
+ * example, to assert that exactly a number of messages arrive. For
+ * example, if the expected count was set to 5, then the assertion is
+ * satisfied when five or more messages arrive. To ensure that exactly 5
+ * messages arrive, 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.
+ * method for. By default, this period is disabled.
*
* The option is a: <code>long</code> type.
*
@@ -374,13 +374,13 @@ public interface DataSetEndpointBuilderFactory {
}
/**
* 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 the preliminary assertion is still valid. This is used, for
+ * example, to assert that exactly a number of messages arrive. For
+ * example, if the expected count was set to 5, then the assertion is
+ * satisfied when five or more messages arrive. To ensure that exactly 5
+ * messages arrive, 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.
+ * method for. By default, this period is disabled.
*
* The option will be converted to a <code>long</code> type.
*
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataSetTestEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataSetTestEndpointBuilderFactory.java
index 3b27117b23d..c702fa94c52 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataSetTestEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataSetTestEndpointBuilderFactory.java
@@ -79,13 +79,13 @@ public interface DataSetTestEndpointBuilderFactory {
}
/**
* 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 the preliminary assertion is still valid. This is used, for
+ * example, to assert that exactly a number of messages arrive. For
+ * example, if the expected count was set to 5, then the assertion is
+ * satisfied when five or more messages arrive. To ensure that exactly 5
+ * messages arrive, 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.
+ * method for. By default, this period is disabled.
*
* The option is a: <code>long</code> type.
*
@@ -100,13 +100,13 @@ public interface DataSetTestEndpointBuilderFactory {
}
/**
* 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 the preliminary assertion is still valid. This is used, for
+ * example, to assert that exactly a number of messages arrive. For
+ * example, if the expected count was set to 5, then the assertion is
+ * satisfied when five or more messages arrive. To ensure that exactly 5
+ * messages arrive, 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.
+ * method for. By default, this period is disabled.
*
* The option will be converted to a <code>long</code> type.
*
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MockEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MockEndpointBuilderFactory.java
index 9614a6640b3..76165d4bde7 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MockEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MockEndpointBuilderFactory.java
@@ -46,13 +46,13 @@ public interface MockEndpointBuilderFactory {
/**
* 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 the preliminary assertion is still valid. This is used, for
+ * example, to assert that exactly a number of messages arrive. For
+ * example, if the expected count was set to 5, then the assertion is
+ * satisfied when five or more messages arrive. To ensure that exactly 5
+ * messages arrive, 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.
+ * method for. By default, this period is disabled.
*
* The option is a: <code>long</code> type.
*
@@ -67,13 +67,13 @@ public interface MockEndpointBuilderFactory {
}
/**
* 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 the preliminary assertion is still valid. This is used, for
+ * example, to assert that exactly a number of messages arrive. For
+ * example, if the expected count was set to 5, then the assertion is
+ * satisfied when five or more messages arrive. To ensure that exactly 5
+ * messages arrive, 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.
+ * method for. By default, this period is disabled.
*
* The option will be converted to a <code>long</code> type.
*
diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetTestUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetTestUriDsl.kt
index 7985be3cab9..b2f025cbecc 100644
--- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetTestUriDsl.kt
+++ b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetTestUriDsl.kt
@@ -68,11 +68,11 @@ public class DatasetTestUriDsl(
/**
* 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
+ * assertion is still valid. This is used, for example, to assert that exactly a number of messages
+ * arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five
+ * or more messages arrive. To ensure that exactly 5 messages arrive, 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.
+ * default, this period is disabled.
*/
public fun assertPeriod(assertPeriod: String) {
it.property("assertPeriod", assertPeriod)
diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetUriDsl.kt
index 452ea410cff..50cbc2c769e 100644
--- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetUriDsl.kt
+++ b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetUriDsl.kt
@@ -153,11 +153,11 @@ public class DatasetUriDsl(
/**
* 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
+ * assertion is still valid. This is used, for example, to assert that exactly a number of messages
+ * arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five
+ * or more messages arrive. To ensure that exactly 5 messages arrive, 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.
+ * default, this period is disabled.
*/
public fun assertPeriod(assertPeriod: String) {
it.property("assertPeriod", assertPeriod)
diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MockUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MockUriDsl.kt
index 76c6e9423d6..b4dc5ad37c8 100644
--- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MockUriDsl.kt
+++ b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MockUriDsl.kt
@@ -53,11 +53,11 @@ public class MockUriDsl(
/**
* 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
+ * assertion is still valid. This is used, for example, to assert that exactly a number of messages
+ * arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five
+ * or more messages arrive. To ensure that exactly 5 messages arrive, 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.
+ * default, this period is disabled.
*/
public fun assertPeriod(assertPeriod: String) {
it.property("assertPeriod", assertPeriod)