camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/3] git commit: CAMEL-6792: Added CamelManagementName attribute to mbeans that had CamelId attribute, so we have both. And added missing CamelId attribute to components having custom jmx operations.
Date Tue, 19 Nov 2013 09:22:53 GMT
CAMEL-6792: Added CamelManagementName attribute to mbeans that had CamelId attribute, so we
have both. And added missing CamelId attribute to components having custom jmx operations.


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

Branch: refs/heads/master
Commit: d96372c55f043d430fe1ebb5d4e0d9fdf35fa636
Parents: a46217d
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Nov 18 17:58:38 2013 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Nov 19 10:24:26 2013 +0100

----------------------------------------------------------------------
 .../management/mbean/ManagedComponentMBean.java |  3 +
 .../management/mbean/ManagedEndpointMBean.java  |  3 +
 .../mbean/ManagedErrorHandlerMBean.java         |  3 +
 .../management/mbean/ManagedProcessorMBean.java |  3 +
 .../mbean/ManagedResourceEndpointMBean.java     |  9 +++
 .../api/management/mbean/ManagedRouteMBean.java |  3 +
 .../management/mbean/ManagedServiceMBean.java   |  3 +
 .../camel/component/ResourceEndpoint.java       | 15 +++++
 .../camel/component/seda/SedaEndpoint.java      |  7 ++-
 .../camel/component/timer/TimerEndpoint.java    |  5 ++
 .../camel/component/xslt/XsltEndpoint.java      |  5 ++
 .../management/mbean/ManagedComponent.java      |  4 ++
 .../camel/management/mbean/ManagedEndpoint.java |  5 ++
 .../management/mbean/ManagedErrorHandler.java   |  4 ++
 .../management/mbean/ManagedProcessor.java      |  4 ++
 .../camel/management/mbean/ManagedRoute.java    |  4 ++
 .../camel/management/mbean/ManagedService.java  |  4 ++
 .../component/disruptor/DisruptorEndpoint.java  | 59 +++++++++++---------
 .../apache/camel/component/jms/JmsEndpoint.java |  7 ++-
 .../component/zookeeper/ZooKeeperEndpoint.java  | 27 +++++++++
 20 files changed, 148 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedComponentMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedComponentMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedComponentMBean.java
index 60f065e..0b1c9a7 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedComponentMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedComponentMBean.java
@@ -29,4 +29,7 @@ public interface ManagedComponentMBean {
     @ManagedAttribute(description = "Camel ID")
     String getCamelId();
 
+    @ManagedAttribute(description = "Camel ManagementName")
+    String getCamelManagementName();
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedEndpointMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedEndpointMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedEndpointMBean.java
index 6b9c9b8..69206b6 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedEndpointMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedEndpointMBean.java
@@ -23,6 +23,9 @@ public interface ManagedEndpointMBean {
     @ManagedAttribute(description = "Camel ID")
     String getCamelId();
 
+    @ManagedAttribute(description = "Camel ManagementName")
+    String getCamelManagementName();
+
     @ManagedAttribute(description = "Endpoint URI", mask = true)
     String getEndpointUri();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedErrorHandlerMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedErrorHandlerMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedErrorHandlerMBean.java
index 9d0c95c..56ed78d 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedErrorHandlerMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedErrorHandlerMBean.java
@@ -23,6 +23,9 @@ public interface ManagedErrorHandlerMBean {
     @ManagedAttribute(description = "Camel ID")
     String getCamelId();
 
+    @ManagedAttribute(description = "Camel ManagementName")
+    String getCamelManagementName();
+
     @ManagedAttribute(description = "Does the error handler support redelivery")
     boolean isSupportRedelivery();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedProcessorMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedProcessorMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedProcessorMBean.java
index f31ed70..eaf16d5 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedProcessorMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedProcessorMBean.java
@@ -27,6 +27,9 @@ public interface ManagedProcessorMBean extends ManagedPerformanceCounterMBean
{
     @ManagedAttribute(description = "Camel ID")
     String getCamelId();
 
+    @ManagedAttribute(description = "Camel ManagementName")
+    String getCamelManagementName();
+
     @ManagedAttribute(description = "Route ID")
     String getRouteId();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedResourceEndpointMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedResourceEndpointMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedResourceEndpointMBean.java
index dbe54fa..26601e9 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedResourceEndpointMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedResourceEndpointMBean.java
@@ -21,6 +21,15 @@ import org.apache.camel.api.management.ManagedOperation;
 
 public interface ManagedResourceEndpointMBean {
 
+    @ManagedAttribute(description = "Camel context ID")
+    String getCamelId();
+
+    @ManagedAttribute(description = "Camel ManagementName")
+    String getCamelManagementName();
+
+    @ManagedAttribute(description = "Endpoint service state")
+    String getState();
+
     @ManagedAttribute(description = "Whether the content is cached")
     boolean isContentCache();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
index 7f90e12..0fb7ff0 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
@@ -39,6 +39,9 @@ public interface ManagedRouteMBean extends ManagedPerformanceCounterMBean
{
     @ManagedAttribute(description = "Camel ID")
     String getCamelId();
 
+    @ManagedAttribute(description = "Camel ManagementName")
+    String getCamelManagementName();
+
     @ManagedAttribute(description = "Tracing")
     Boolean getTracing();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedServiceMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedServiceMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedServiceMBean.java
index 7f04c84..0ef03d1 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedServiceMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedServiceMBean.java
@@ -27,6 +27,9 @@ public interface ManagedServiceMBean {
     @ManagedAttribute(description = "Camel ID")
     String getCamelId();
 
+    @ManagedAttribute(description = "Camel ManagementName")
+    String getCamelManagementName();
+
     @ManagedAttribute(description = "Route ID")
     String getRouteId();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java
index 9b3af1d..8060c40 100644
--- a/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java
@@ -111,6 +111,21 @@ public abstract class ResourceEndpoint extends ProcessorEndpoint implements
Mana
         return buffer == null;
     }
 
+    @ManagedAttribute(description = "Camel context ID")
+    public String getCamelId() {
+        return getCamelContext().getName();
+    }
+
+    @ManagedAttribute(description = "Camel ManagementName")
+    public String getCamelManagementName() {
+        return getCamelContext().getManagementName();
+    }
+
+    @ManagedAttribute(description = "Endpoint service state")
+    public String getState() {
+        return getStatus().name();
+    }
+
     /**
      * Sets whether to use resource content cache or not - default is <tt>false</tt>.
      *

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
index f2c5fca..9d4ade2 100644
--- a/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
@@ -415,11 +415,16 @@ public class SedaEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
         return EndpointHelper.browseRangeMessagesAsXml(this, fromIndex, toIndex, includeBody);
     }
 
-    @ManagedAttribute(description = "Camel context name")
+    @ManagedAttribute(description = "Camel context ID")
     public String getCamelId() {
         return getCamelContext().getName();
     }
 
+    @ManagedAttribute(description = "Camel ManagementName")
+    public String getCamelManagementName() {
+        return getCamelContext().getManagementName();
+    }
+
     @ManagedAttribute(description = "Endpoint service state")
     public String getState() {
         return getStatus().name();

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
index 61e3b88..5b4dc3f 100644
--- a/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
@@ -184,6 +184,11 @@ public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersS
         return this.getCamelContext().getName();
     }
 
+    @ManagedAttribute(description = "Camel ManagementName")
+    public String getCamelManagementName() {
+        return this.getCamelContext().getManagementName();
+    }
+
     @ManagedAttribute(description = "Endpoint Uri")
     public String getEndpointUri() {
         return super.getEndpointUri();

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
index aa91b1a..f6f505c 100644
--- a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
@@ -68,6 +68,11 @@ public class XsltEndpoint extends ProcessorEndpoint {
         return getCamelContext().getName();
     }
 
+    @ManagedAttribute(description = "Camel ManagementName")
+    public String getCamelManagementName() {
+        return getCamelContext().getManagementName();
+    }
+
     public XsltEndpoint findOrCreateEndpoint(String uri, String newResourceUri) {
         String newUri = uri.replace(resourceUri, newResourceUri);
         LOG.trace("Getting endpoint with URI: {}", newUri);

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedComponent.java
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedComponent.java
index b301d66..1696391 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedComponent.java
@@ -64,6 +64,10 @@ public class ManagedComponent implements ManagedInstance, ManagedComponentMBean
         return component.getCamelContext().getName();
     }
 
+    public String getCamelManagementName() {
+        return component.getCamelContext().getManagementName();
+    }
+
     public Object getInstance() {
         return component;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java
index 83771a4..deffddf 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java
@@ -46,6 +46,11 @@ public class ManagedEndpoint implements ManagedInstance, ManagedEndpointMBean
{
     }
 
     @Override
+    public String getCamelManagementName() {
+        return endpoint.getCamelContext().getManagementName();
+    }
+
+    @Override
     public String getEndpointUri() {
         return endpoint.getEndpointUri();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java
index 69cb4bf..d4fe005 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java
@@ -61,6 +61,10 @@ public class ManagedErrorHandler implements ManagedErrorHandlerMBean {
         return routeContext.getCamelContext().getName();
     }
 
+    public String getCamelManagementName() {
+        return routeContext.getCamelContext().getManagementName();
+    }
+
     public boolean isSupportRedelivery() {
         return errorHandler instanceof RedeliveryErrorHandler;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProcessor.java
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProcessor.java
index 885bc3b..c3d6dd3 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProcessor.java
@@ -93,6 +93,10 @@ public class ManagedProcessor extends ManagedPerformanceCounter implements
Manag
         return context.getName();
     }
 
+    public String getCamelManagementName() {
+        return context.getManagementName();
+    }
+
     public String getRouteId() {
         if (route != null) {
             return route.getId();

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
index 1c6495a..b58b49c 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
@@ -108,6 +108,10 @@ public class ManagedRoute extends ManagedPerformanceCounter implements
TimerList
         return context.getName();
     }
 
+    public String getCamelManagementName() {
+        return context.getManagementName();
+    }
+
     public Boolean getTracing() {
         return route.getRouteContext().isTracing();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedService.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedService.java
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedService.java
index 1eb11b7..b5dffe0 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedService.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedService.java
@@ -78,6 +78,10 @@ public class ManagedService implements ManagedInstance, ManagedServiceMBean
{
         return context.getName();
     }
 
+    public String getCamelManagementName() {
+        return context.getManagementName();
+    }
+
     public String getRouteId() {
         if (route != null) {
             return route.getId();

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/DisruptorEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/DisruptorEndpoint.java
b/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/DisruptorEndpoint.java
index 9ed263c..9ad8cfb 100644
--- a/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/DisruptorEndpoint.java
+++ b/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/DisruptorEndpoint.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.camel.component.disruptor;
 
 import java.util.Collection;
@@ -32,8 +31,10 @@ import org.apache.camel.Exchange;
 import org.apache.camel.MultipleConsumersSupport;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
+import org.apache.camel.ServiceStatus;
 import org.apache.camel.WaitForTaskToComplete;
 import org.apache.camel.api.management.ManagedAttribute;
+import org.apache.camel.api.management.ManagedResource;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -43,20 +44,16 @@ import org.slf4j.LoggerFactory;
  * for asynchronous SEDA exchanges on an
  * <a href="https://github.com/LMAX-Exchange/disruptor">LMAX Disruptor</a> within
a CamelContext
  */
-
+@ManagedResource(description = "Managed Disruptor Endpoint")
 public class DisruptorEndpoint extends DefaultEndpoint implements MultipleConsumersSupport
{
     public static final String DISRUPTOR_IGNORE_EXCHANGE = "disruptor.ignoreExchange";
     private static final Logger LOGGER = LoggerFactory.getLogger(DisruptorEndpoint.class);
-    
 
     private final int concurrentConsumers;
     private final boolean multipleConsumers;
     private WaitForTaskToComplete waitForTaskToComplete = WaitForTaskToComplete.IfReplyExpected;
-
     private long timeout = 30000;
-
     private boolean blockWhenFull;
-
     private final Set<DisruptorProducer> producers = new CopyOnWriteArraySet<DisruptorProducer>();
     private final Set<DisruptorConsumer> consumers = new CopyOnWriteArraySet<DisruptorConsumer>();
 
@@ -72,6 +69,31 @@ public class DisruptorEndpoint extends DefaultEndpoint implements MultipleConsum
         this.blockWhenFull = blockWhenFull;
     }
 
+    @ManagedAttribute(description = "Camel ID")
+    public String getCamelId() {
+        return getCamelContext().getName();
+    }
+
+    @ManagedAttribute(description = "Camel ManagementName")
+    public String getCamelManagementName() {
+        return getCamelContext().getManagementName();
+    }
+
+    @ManagedAttribute(description = "Endpoint Uri", mask = true)
+    public String getEndpointUri() {
+        return super.getEndpointUri();
+    }
+
+    @ManagedAttribute(description = "Service State")
+    public String getState() {
+        ServiceStatus status = this.getStatus();
+        // if no status exists then its stopped
+        if (status == null) {
+            status = ServiceStatus.Stopped;
+        }
+        return status.name();
+    }
+
     @ManagedAttribute(description = "Buffer max capacity")
     public int getBufferSize() {
         return disruptorReference.getBufferSize();
@@ -87,7 +109,6 @@ public class DisruptorEndpoint extends DefaultEndpoint implements MultipleConsum
         return getDisruptor().getPendingExchangeCount();
     }
 
-
     @ManagedAttribute(description = "Number of concurrent consumers")
     public int getConcurrentConsumers() {
         return concurrentConsumers;
@@ -165,23 +186,18 @@ public class DisruptorEndpoint extends DefaultEndpoint implements MultipleConsum
 
     @Override
     protected void doStart() throws Exception {
-        LOGGER.debug("Start enpoint {}", this);
         // notify reference we are shutting down this endpoint
         disruptorReference.addEndpoint(this);
-
-        super.doStart();    //To change body of overridden methods use File | Settings |
File Templates.
+        super.doStart();
     }
 
     @Override
     protected void doStop() throws Exception {
-        LOGGER.debug("Stop enpoint {}", this);
         // notify reference we are shutting down this endpoint
         disruptorReference.removeEndpoint(this);
-
-        super.doStop();    //To change body of overridden methods use File | Settings | File
Templates.
+        super.doStop();
     }
 
-
     @Override
     protected void doShutdown() throws Exception {
         // notify component we are shutting down this endpoint
@@ -204,35 +220,24 @@ public class DisruptorEndpoint extends DefaultEndpoint implements MultipleConsum
                 throw new IllegalStateException(
                         "Multiple consumers for the same endpoint is not allowed: " + this);
             }
-
             if (consumers.add(consumer)) {
                 LOGGER.debug("Starting consumer {} on endpoint {}", consumer, getEndpointUri());
-
                 getDisruptor().reconfigure();
-
             } else {
-                LOGGER.debug("Tried to start Consumer {} on endpoint {} but it was already
started", consumer,
-                        getEndpointUri());
+                LOGGER.debug("Tried to start Consumer {} on endpoint {} but it was already
started", consumer, getEndpointUri());
             }
         }
-
     }
 
 
     void onStopped(final DisruptorConsumer consumer) throws Exception {
         synchronized (this) {
-
             if (consumers.remove(consumer)) {
                 LOGGER.debug("Stopping consumer {} on endpoint {}", consumer, getEndpointUri());
-
                 getDisruptor().reconfigure();
-
             } else {
-                LOGGER.debug("Tried to stop Consumer {} on endpoint {} but it was already
stopped", consumer,
-                        getEndpointUri());
+                LOGGER.debug("Tried to stop Consumer {} on endpoint {} but it was already
stopped", consumer, getEndpointUri());
             }
-
-
         }
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
index 17204b5..af15397 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
@@ -1148,11 +1148,16 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
         configuration.setReplyToType(type);
     }
 
-    @ManagedAttribute(description = "Camel id")
+    @ManagedAttribute(description = "Camel ID")
     public String getCamelId() {
         return getCamelContext().getName();
     }
 
+    @ManagedAttribute(description = "Camel ManagementName")
+    public String getCamelManagementName() {
+        return getCamelContext().getManagementName();
+    }
+
     @ManagedAttribute(description = "Endpoint Uri", mask = true)
     @Override
     public String getEndpointUri() {

http://git-wip-us.apache.org/repos/asf/camel/blob/d96372c5/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperEndpoint.java
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperEndpoint.java
index 0e26004..5200366 100644
--- a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperEndpoint.java
+++ b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperEndpoint.java
@@ -21,6 +21,7 @@ import java.util.List;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
+import org.apache.camel.ServiceStatus;
 import org.apache.camel.api.management.ManagedAttribute;
 import org.apache.camel.api.management.ManagedOperation;
 import org.apache.camel.api.management.ManagedResource;
@@ -66,6 +67,32 @@ public class ZooKeeperEndpoint extends DefaultEndpoint {
         return connectionManager;
     }
 
+    @ManagedAttribute(description = "Camel ID")
+    public String getCamelId() {
+        return getCamelContext().getName();
+    }
+
+    @ManagedAttribute(description = "Camel ManagementName")
+    public String getCamelManagementName() {
+        return getCamelContext().getManagementName();
+    }
+
+    @ManagedAttribute(description = "Endpoint Uri", mask = true)
+    @Override
+    public String getEndpointUri() {
+        return super.getEndpointUri();
+    }
+
+    @ManagedAttribute(description = "Service State")
+    public String getState() {
+        ServiceStatus status = this.getStatus();
+        // if no status exists then its stopped
+        if (status == null) {
+            status = ServiceStatus.Stopped;
+        }
+        return status.name();
+    }
+
     @ManagedAttribute
     public void setPath(String path) {
         getConfiguration().setPath(path);


Mime
View raw message