You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/10/22 18:25:10 UTC
[camel-examples] branch master updated: CAMEL-15739: camel-core -
Move AdviceWith from Reifier to Builder
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-examples.git
The following commit(s) were added to refs/heads/master by this push:
new 2119573 CAMEL-15739: camel-core - Move AdviceWith from Reifier to Builder
2119573 is described below
commit 2119573e3746687a0fc7d7ab424ca547f11878d6
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Oct 22 20:24:38 2020 +0200
CAMEL-15739: camel-core - Move AdviceWith from Reifier to Builder
---
.../camel/example/cdi/properties/CdiPropertiesTest.java | 4 ++--
.../java/org/apache/camel/example/cdi/xml/CdiXmlTest.java | 15 +++++++--------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/examples/camel-example-cdi-properties/src/test/java/org/apache/camel/example/cdi/properties/CdiPropertiesTest.java b/examples/camel-example-cdi-properties/src/test/java/org/apache/camel/example/cdi/properties/CdiPropertiesTest.java
index 5e94c9f..1b1687b 100644
--- a/examples/camel-example-cdi-properties/src/test/java/org/apache/camel/example/cdi/properties/CdiPropertiesTest.java
+++ b/examples/camel-example-cdi-properties/src/test/java/org/apache/camel/example/cdi/properties/CdiPropertiesTest.java
@@ -18,11 +18,11 @@ package org.apache.camel.example.cdi.properties;
import javax.enterprise.event.Observes;
+import org.apache.camel.builder.AdviceWith;
import org.apache.camel.builder.AdviceWithRouteBuilder;
import org.apache.camel.cdi.Uri;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.model.ModelCamelContext;
-import org.apache.camel.reifier.RouteReifier;
import org.apache.camel.spi.CamelEvent.CamelContextStartedEvent;
import org.apache.camel.test.cdi.CamelCdiRunner;
import org.apache.deltaspike.core.api.config.ConfigProperty;
@@ -40,7 +40,7 @@ public class CdiPropertiesTest {
static void advice(@Observes CamelContextStartedEvent event,
ModelCamelContext context) throws Exception {
// Add a mock endpoint to the end of the route
- RouteReifier.adviceWith(context.getRouteDefinitions().get(0), context, new AdviceWithRouteBuilder() {
+ AdviceWith.adviceWith(context.getRouteDefinitions().get(0), context, new AdviceWithRouteBuilder() {
@Override
public void configure() {
weaveAddLast().to("mock:outbound");
diff --git a/examples/camel-example-cdi-xml/src/test/java/org/apache/camel/example/cdi/xml/CdiXmlTest.java b/examples/camel-example-cdi-xml/src/test/java/org/apache/camel/example/cdi/xml/CdiXmlTest.java
index 042ff9c..dc3d621 100644
--- a/examples/camel-example-cdi-xml/src/test/java/org/apache/camel/example/cdi/xml/CdiXmlTest.java
+++ b/examples/camel-example-cdi-xml/src/test/java/org/apache/camel/example/cdi/xml/CdiXmlTest.java
@@ -26,12 +26,12 @@ import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.ServiceStatus;
+import org.apache.camel.builder.AdviceWith;
import org.apache.camel.builder.AdviceWithRouteBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.cdi.Uri;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.model.ModelCamelContext;
-import org.apache.camel.reifier.RouteReifier;
import org.apache.camel.spi.CamelEvent.CamelContextStartedEvent;
import org.apache.camel.test.cdi.CamelCdiRunner;
import org.apache.camel.test.cdi.Order;
@@ -55,13 +55,12 @@ public class CdiXmlTest {
void pipeMatrixStream(@Observes CamelContextStartedEvent event,
ModelCamelContext context) throws Exception {
- RouteReifier
- .adviceWith(context.getRouteDefinition("matrix"), context, new AdviceWithRouteBuilder() {
- @Override
- public void configure() {
- weaveAddLast().to("mock:matrix");
- }
- });
+ AdviceWith.adviceWith(context.getRouteDefinition("matrix"), context, new AdviceWithRouteBuilder() {
+ @Override
+ public void configure() {
+ weaveAddLast().to("mock:matrix");
+ }
+ });
}
static class RescueMission extends RouteBuilder {