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 2021/01/19 12:33:53 UTC

[camel] branch master updated: CAMEL-16057: Renamed badly named events

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.git


The following commit(s) were added to refs/heads/master by this push:
     new 241e76f  CAMEL-16057: Renamed badly named events
241e76f is described below

commit 241e76f98aaf0e1505f97b777cf8f4d632bdb523
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jan 19 13:32:13 2021 +0100

    CAMEL-16057: Renamed badly named events
---
 .../main/java/org/apache/camel/spi/CamelEvent.java | 22 +++++++++++-----------
 .../ROOT/pages/camel-3x-upgrade-guide-3_8.adoc     | 10 +++++++++-
 2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/CamelEvent.java b/core/camel-api/src/main/java/org/apache/camel/spi/CamelEvent.java
index 40ede61..1de38c0 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/CamelEvent.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/CamelEvent.java
@@ -41,10 +41,6 @@ public interface CamelEvent {
         CamelContextStopping,
         CamelContextSuspended,
         CamelContextSuspending,
-        CamelContextRoutesStarting,
-        CamelContextRoutesStarted,
-        CamelContextRoutesStopping,
-        CamelContextRoutesStopped,
         ExchangeCompleted,
         ExchangeCreated,
         ExchangeFailed,
@@ -53,9 +49,10 @@ public interface CamelEvent {
         ExchangeRedelivery,
         ExchangeSending,
         ExchangeSent,
-        StepStarted,
-        StepCompleted,
-        StepFailed,
+        RoutesStarting,
+        RoutesStarted,
+        RoutesStopping,
+        RoutesStopped,
         RouteAdded,
         RouteRemoved,
         RouteStarting,
@@ -64,6 +61,9 @@ public interface CamelEvent {
         RouteStopped,
         ServiceStartupFailure,
         ServiceStopFailure,
+        StepStarted,
+        StepCompleted,
+        StepFailed,
         Custom
     }
 
@@ -186,28 +186,28 @@ public interface CamelEvent {
     interface CamelContextRoutesStartingEvent extends CamelContextEvent {
         @Override
         default Type getType() {
-            return Type.CamelContextRoutesStarting;
+            return Type.RoutesStarting;
         }
     }
 
     interface CamelContextRoutesStartedEvent extends CamelContextEvent {
         @Override
         default Type getType() {
-            return Type.CamelContextRoutesStarted;
+            return Type.RoutesStarted;
         }
     }
 
     interface CamelContextRoutesStoppingEvent extends CamelContextEvent {
         @Override
         default Type getType() {
-            return Type.CamelContextRoutesStopping;
+            return Type.RoutesStopping;
         }
     }
 
     interface CamelContextRoutesStoppedEvent extends CamelContextEvent {
         @Override
         default Type getType() {
-            return Type.CamelContextRoutesStopped;
+            return Type.RoutesStopped;
         }
     }
 
diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_8.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_8.adoc
index d7f1ce4..c65b180 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_8.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_8.adoc
@@ -6,11 +6,19 @@ from both 3.0 to 3.1 and 3.1 to 3.2.
 
 == Upgrading Camel 3.7 to 3.8
 
+=== API changes in Camel events
+
+The following type names are renamed in `CamelEvent.Type` enum:
+
+- `CamelContextRoutesStarting` to `RoutesStarting`
+- `CamelContextRoutesStarted` to `RoutesStarted`
+- `CamelContextRoutesStopping` to `RoutesStopping`
+- `CamelContextRoutesStopped` to `RoutesStopped`
+
 === OnCompletion EIP
 
 The `onCompletion` EIP has fixed it could trigger multiple completions for a given `Exchange`
 
-
 === camel-activemq and camel-jms
 
 The JMS and ActiveMQ component now supports optimized toD EIP pattern by using a single endpoint/producer for dynamic destination names.