camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Make it easier to know if a component is verifable via JMX
Date Mon, 20 Mar 2017 13:29:41 GMT
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 <davsclaus@apache.org>
Authored: Mon Mar 20 14:29:32 2017 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
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);


Mime
View raw message