camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gzurow...@apache.org
Subject [1/3] camel git commit: CAMEL-11335: Add route state details
Date Wed, 31 May 2017 07:54:31 GMT
Repository: camel
Updated Branches:
  refs/heads/master 4d62cc71d -> a229f53d0


CAMEL-11335: Add route state details

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/394c00e5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/394c00e5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/394c00e5

Branch: refs/heads/master
Commit: 394c00e56f724a83ca714a0f5ef1396327a39475
Parents: 4d62cc7
Author: Gregor Zurowski <gregor@zurowski.org>
Authored: Wed May 31 07:10:06 2017 +0200
Committer: Gregor Zurowski <gregor@zurowski.org>
Committed: Wed May 31 07:10:06 2017 +0200

----------------------------------------------------------------------
 .../actuate/endpoint/CamelRoutesEndpoint.java   | 47 ++++++++++++++++++++
 1 file changed, 47 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/394c00e5/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesEndpoint.java
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesEndpoint.java
index 3f44320..3cce647 100644
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesEndpoint.java
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesEndpoint.java
@@ -24,6 +24,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Route;
+import org.apache.camel.StatefulService;
 import org.apache.camel.spring.boot.actuate.endpoint.CamelRoutesEndpoint.RouteEndpointInfo;
 import org.springframework.boot.actuate.endpoint.AbstractEndpoint;
 import org.springframework.boot.actuate.endpoint.Endpoint;
@@ -66,11 +67,33 @@ public class CamelRoutesEndpoint extends AbstractEndpoint<List<RouteEndpointInfo
 
         private final long uptimeMillis;
 
+        private Boolean started;
+
+        private Boolean starting;
+
+        private Boolean stopped;
+
+        private Boolean stopping;
+
+        private Boolean suspended;
+
+        private Boolean suspending;
+
         public RouteEndpointInfo(Route route) {
             this.id = route.getId();
             this.description = route.getDescription();
             this.uptime = route.getUptime();
             this.uptimeMillis = route.getUptimeMillis();
+
+            if (route instanceof StatefulService) {
+                StatefulService statefulService = (StatefulService) route;
+                this.started = statefulService.isStarted();
+                this.starting = statefulService.isStarting();
+                this.stopped = statefulService.isStopped();
+                this.stopping = statefulService.isStopping();
+                this.suspended = statefulService.isSuspended();
+                this.suspending = statefulService.isSuspending();
+            }
         }
 
         public String getId() {
@@ -89,6 +112,30 @@ public class CamelRoutesEndpoint extends AbstractEndpoint<List<RouteEndpointInfo
             return uptimeMillis;
         }
 
+        public Boolean getStarted() {
+            return started;
+        }
+
+        public Boolean getStarting() {
+            return starting;
+        }
+
+        public Boolean getStopped() {
+            return stopped;
+        }
+
+        public Boolean getStopping() {
+            return stopping;
+        }
+
+        public Boolean getSuspended() {
+            return suspended;
+        }
+
+        public Boolean getSuspending() {
+            return suspending;
+        }
+
     }
 
 }


Mime
View raw message