camel git commit: Make it easier to know if a component is verifable via JMX

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

camel git commit: Make it easier to know if a component is verifable via JMX

davsclaus-2
Repository: camel
Updated Branches:
  refs/heads/master 9c3e4574c -> 901b44eab


Make it easier to know if a component is verifable via JMX


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

Branch: refs/heads/master
Commit: 901b44eab33a71c3d49911e0e8d3ca9357a3edde
Parents: 9c3e457
Author: Claus Ibsen <[hidden email]>
Authored: Mon Mar 20 14:29:32 2017 +0100
Committer: Claus Ibsen <[hidden email]>
Committed: Mon Mar 20 14:29:32 2017 +0100

----------------------------------------------------------------------
 .../camel/api/management/mbean/ManagedComponentMBean.java       | 3 +++
 .../org/apache/camel/management/mbean/ManagedComponent.java     | 5 +++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/901b44ea/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 79ebd2e..b19479a 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
@@ -43,6 +43,9 @@ public interface ManagedComponentMBean {
     @ManagedOperation(description = "Explain how this component is configured")
     TabularData explain(boolean allOptions);
 
+    @ManagedAttribute(description = "Whether this component support verification (parameters or connectivity)")
+    boolean isVerifySupported();
+
     @ManagedOperation(description = "Verify options against a given scope")
     ComponentVerifier.Result verify(String scope, Map<String, String> options);
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/901b44ea/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 37a3f65..90081ae 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
@@ -139,6 +139,11 @@ public class ManagedComponent implements ManagedInstance, ManagedComponentMBean
     }
 
     @Override
+    public boolean isVerifySupported() {
+        return component instanceof VerifiableComponent;
+    }
+
+    @Override
     public ComponentVerifier.Result verify(String scope, Map<String, String> options) {
         try {
             ComponentVerifier.Scope scopeEnum = ComponentVerifier.Scope.valueOf(scope);

Loading...