This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 7ae650788ed81ab0afa9f811e4e0302165be0745
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue Nov 30 21:12:23 2021 +0100

    CAMEL-15133: camel-health - Resolve health-checks from classpath and make 
it friendlier to provide custom health checks.
---
 .../org/apache/camel/cdi/xml/CamelContextFactoryBean.java | 12 ++++++++++++
 .../org/apache/camel/spring/xml/camelContext.json         |  1 +
 .../apache/camel/spring/xml/CamelContextFactoryBean.java  | 15 +++++++++++++++
 3 files changed, 28 insertions(+)

diff --git 
a/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
 
b/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
index 318f1d3..4eceb35 100644
--- 
a/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
+++ 
b/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
@@ -170,6 +170,9 @@ public class CamelContextFactoryBean extends 
AbstractCamelContextFactoryBean<Def
     private String typeConverterStatisticsEnabled;
 
     @XmlAttribute
+    private String loadHealthChecks;
+
+    @XmlAttribute
     private String inflightRepositoryBrowseEnabled;
 
     @XmlAttribute
@@ -894,6 +897,15 @@ public class CamelContextFactoryBean extends 
AbstractCamelContextFactoryBean<Def
     }
 
     @Override
+    public String getLoadHealthChecks() {
+        return loadHealthChecks;
+    }
+
+    public void setLoadHealthChecks(String loadHealthChecks) {
+        this.loadHealthChecks = loadHealthChecks;
+    }
+
+    @Override
     public String getInflightRepositoryBrowseEnabled() {
         return inflightRepositoryBrowseEnabled;
     }
diff --git 
a/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json
 
b/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json
index 9a6507f..42cb0b3 100644
--- 
a/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json
+++ 
b/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json
@@ -41,6 +41,7 @@
     "shutdownRunningTask": { "kind": "attribute", "displayName": "Shutdown 
Running Task", "required": false, "type": "enum", "javaType": 
"org.apache.camel.ShutdownRunningTask", "enum": [ "complete-all-tasks", 
"complete-current-task-only" ], "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "CompleteCurrentTaskOnly", "description": 
"Sets the ShutdownRunningTask option to use when shutting down a route." },
     "loadTypeConverters": { "kind": "attribute", "displayName": "Load Type 
Converters", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "true", "description": "Sets whether to load custom type 
converters by scanning classpath. This can be turned off if you are only using 
Camel components that does not provide type converters which is needed at 
runtime. In such situations setting this option to  [...]
     "typeConverterStatisticsEnabled": { "kind": "attribute", "displayName": 
"Type Converter Statistics Enabled", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Sets whether or not type converter statistics 
is enabled. By default the type converter utilization statistics is disabled. 
Notice: If enabled then there is a slight performance impact under very heavy 
load. You can enable\/disable the  [...]
+    "loadHealthChecks": { "kind": "attribute", "displayName": "Load Health 
Checks", "required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"false", "description": "Whether to load custom health checks by scanning 
classpath." },
     "inflightRepositoryBrowseEnabled": { "kind": "attribute", "displayName": 
"Inflight Repository Browse Enabled", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Sets whether the inflight repository should 
allow browsing each inflight exchange. This is by default disabled as there is 
a very slight performance overhead when enabled." },
     "typeConverterExists": { "kind": "attribute", "displayName": "Type 
Converter Exists", "required": false, "type": "enum", "javaType": 
"org.apache.camel.TypeConverterExists", "enum": [ "fail", "ignore", "override" 
], "deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"Override", "description": "What should happen when attempting to add a 
duplicate type converter. The default behavior is to override the existing." },
     "typeConverterExistsLoggingLevel": { "kind": "attribute", "displayName": 
"Type Converter Exists Logging Level", "required": false, "type": "enum", 
"javaType": "org.apache.camel.LoggingLevel", "enum": [ "debug", "error", 
"info", "off", "trace", "warn" ], "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "WARN", "description": "The logging level to 
use when logging that a type converter already exists when attempting to add a 
duplicate type converter. The defaul [...]
diff --git 
a/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
 
b/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
index f617817..6c2bca3 100644
--- 
a/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
+++ 
b/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
@@ -180,6 +180,9 @@ public class CamelContextFactoryBean extends 
AbstractCamelContextFactoryBean<Spr
     @XmlAttribute
     private String typeConverterStatisticsEnabled;
     @XmlAttribute
+    @Metadata(defaultValue = "false")
+    private String loadHealthChecks;
+    @XmlAttribute
     private String inflightRepositoryBrowseEnabled;
     @XmlAttribute
     @Metadata(defaultValue = "Override")
@@ -1157,6 +1160,18 @@ public class CamelContextFactoryBean extends 
AbstractCamelContextFactoryBean<Spr
     }
 
     @Override
+    public String getLoadHealthChecks() {
+        return loadHealthChecks;
+    }
+
+    /**
+     * Whether to load custom health checks by scanning classpath.
+     */
+    public void setLoadHealthChecks(String loadHealthChecks) {
+        this.loadHealthChecks = loadHealthChecks;
+    }
+
+    @Override
     public String getTypeConverterStatisticsEnabled() {
         return typeConverterStatisticsEnabled;
     }

Reply via email to