You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/06/11 11:44:23 UTC

[camel] branch master updated: camel-main - Include new options in metadata

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 838f35d  camel-main - Include new options in metadata
838f35d is described below

commit 838f35d39d46da6ec2213750780e84f8cd95fdab
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Jun 11 13:43:55 2020 +0200

    camel-main - Include new options in metadata
---
 .../camel-main-configuration-metadata.json         | 12 ++++---
 .../camel/main/LraConfigurationProperties.java     | 37 ++++++++++++++++++++++
 2 files changed, 44 insertions(+), 5 deletions(-)

diff --git a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 87df318..ab6d83a 100644
--- a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -4,7 +4,9 @@
     { "name": "camel.faulttolerance", "description": "camel-fault-tolerance configurations.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties" },
     { "name": "camel.hystrix", "description": "camel-hystrix configurations.", "sourceType": "org.apache.camel.main.HystrixConfigurationProperties" },
     { "name": "camel.resilience4j", "description": "camel-resilience4j configurations.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties" },
-    { "name": "camel.rest", "description": "camel-rest configurations.", "sourceType": "org.apache.camel.spi.RestConfiguration" }
+    { "name": "camel.rest", "description": "camel-rest configurations.", "sourceType": "org.apache.camel.spi.RestConfiguration" },
+    { "name": "camel.health", "description": "camel-health configurations.", "sourceType": "org.apache.camel.main.HealthCheckConfigurationProperties" },
+    { "name": "camel.lra", "description": "camel-lra configurations.", "sourceType": "org.apache.camel.main.LraConfigurationProperties" }
   ],
   "properties": [
     { "name": "camel.main.allowUseOriginalMessage", "description": "Sets whether to allow access to the original message from Camel's error handler, or from org.apache.camel.spi.UnitOfWork.getOriginalInMessage(). Turning this off can optimize performance, as defensive copy of the original message is not needed. Default is false.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" },
@@ -26,8 +28,6 @@
     { "name": "camel.main.configurations", "description": "Sets the configuration objects used to configure the camel context.", "sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": "object", "javaType": "java.util.List", "defaultValue": "new ArrayList<>()" },
     { "name": "camel.main.consumerTemplateCacheSize", "description": "Consumer template endpoints cache size.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": 1000 },
     { "name": "camel.main.contextEnabled", "description": "Whether context health check is enabled Is default enabled", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" },
-    { "name": "camel.main.coordinatorContextPath", "description": "The context-path for the LRA coordinator. Is default \/lra-coordinator", "sourceType": "org.apache.camel.main.LraConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/lra-coordinator" },
-    { "name": "camel.main.coordinatorUrl", "description": "The URL for the LRA coordinator service that orchestrates the transactions", "sourceType": "org.apache.camel.main.LraConfigurationProperties", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.main.durationHitExitCode", "description": "Sets the exit code for the application if duration was hit", "sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": "integer", "javaType": "int" },
     { "name": "camel.main.durationMaxIdleSeconds", "description": "To specify for how long time in seconds Camel can be idle before automatic terminating the JVM. You can use this to run Camel for a short while.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int" },
     { "name": "camel.main.durationMaxMessages", "description": "To specify how many messages to process by Camel before automatic terminating the JVM. You can use this to run Camel for a short while.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int" },
@@ -46,8 +46,6 @@
     { "name": "camel.main.jmxManagementStatisticsLevel", "description": "Sets the JMX statistics level The level can be set to Extended to gather additional information The default value is Default.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.ManagementStatisticsLevel", "defaultValue": "ManagementStatisticsLevel.Default", "enum": [ "Extended", "Default", "RoutesOnly", "Off" ] },
     { "name": "camel.main.lightweight", "description": "Experimental: Configure the context to be lightweight. This will trigger some optimizations and memory reduction options. Lightweight context have some limitations. At this moment, dynamic endpoint destinations are not supported.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" },
     { "name": "camel.main.loadTypeConverters", "description": "Whether to load custom type converters by scanning classpath. This is used for backwards compatibility with Camel 2.x. Its recommended to migrate to use fast type converter loading by setting Converter(loader = true) on your custom type converter classes.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" },
-    { "name": "camel.main.localParticipantContextPath", "description": "The context-path for the local participant. Is default \/lra-participant", "sourceType": "org.apache.camel.main.LraConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/lra-participant" },
-    { "name": "camel.main.localParticipantUrl", "description": "The URL for the local participant", "sourceType": "org.apache.camel.main.LraConfigurationProperties", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.main.logDebugMaxChars", "description": "Is used to limit the maximum length of the logging Camel message bodies. If the message body is longer than the limit, the log message is clipped. Use -1 to have unlimited length. Use for example 1000 to log at most 1000 characters.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int" },
     { "name": "camel.main.logExhaustedMessageBody", "description": "Sets whether to log exhausted message body with message history. Default is false.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" },
     { "name": "camel.main.logMask", "description": "Sets whether log mask is enabled or not. Default is false.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" },
@@ -142,6 +140,10 @@
     { "name": "camel.hystrix.threadPoolKey", "description": "Sets the thread pool key to use. Will by default use the same value as groupKey has been configured to use.", "sourceType": "org.apache.camel.main.HystrixConfigurationProperties", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.hystrix.threadPoolRollingNumberStatisticalWindowBuckets", "description": "Number of buckets the rolling statistical window is broken into. This is passed into HystrixRollingNumber inside each HystrixThreadPoolMetrics instance.", "sourceType": "org.apache.camel.main.HystrixConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" },
     { "name": "camel.hystrix.threadPoolRollingNumberStatisticalWindowInMilliseconds", "description": "Duration of statistical rolling window in milliseconds. This is passed into HystrixRollingNumber inside each HystrixThreadPoolMetrics instance.", "sourceType": "org.apache.camel.main.HystrixConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" },
+    { "name": "camel.lra.coordinatorContextPath", "description": "The context-path for the LRA coordinator. Is default \/lra-coordinator", "sourceType": "org.apache.camel.main.LraConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/lra-coordinator" },
+    { "name": "camel.lra.coordinatorUrl", "description": "The URL for the LRA coordinator service that orchestrates the transactions", "sourceType": "org.apache.camel.main.LraConfigurationProperties", "type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.lra.localParticipantContextPath", "description": "The context-path for the local participant. Is default \/lra-participant", "sourceType": "org.apache.camel.main.LraConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/lra-participant" },
+    { "name": "camel.lra.localParticipantUrl", "description": "The URL for the local participant", "sourceType": "org.apache.camel.main.LraConfigurationProperties", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.resilience4j.automaticTransitionFromOpenToHalfOpenEnabled", "description": "Enables automatic transition from OPEN to HALF_OPEN state once the waitDurationInOpenState has passed.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" },
     { "name": "camel.resilience4j.bulkheadEnabled", "description": "Whether bulkhead is enabled or not on the circuit breaker.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" },
     { "name": "camel.resilience4j.bulkheadMaxConcurrentCalls", "description": "Configures the max amount of concurrent calls the bulkhead will support.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" },
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/LraConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/LraConfigurationProperties.java
index aa0184b..c9963db 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/LraConfigurationProperties.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/LraConfigurationProperties.java
@@ -86,4 +86,41 @@ public class LraConfigurationProperties {
     public void setLocalParticipantContextPath(String localParticipantContextPath) {
         this.localParticipantContextPath = localParticipantContextPath;
     }
+
+    /**
+     * The URL for the LRA coordinator service that orchestrates the transactions
+     */
+    public LraConfigurationProperties withCoordinatorUrl(String coordinatorUrl) {
+        this.coordinatorUrl = coordinatorUrl;
+        return this;
+    }
+
+    /**
+     * The context-path for the LRA coordinator.
+     *
+     * Is default /lra-coordinator
+     */
+    public LraConfigurationProperties withCoordinatorContextPath(String coordinatorContextPath) {
+        this.coordinatorContextPath = coordinatorContextPath;
+        return this;
+    }
+
+    /**
+     * The URL for the local participant
+     */
+    public LraConfigurationProperties withLocalParticipantUrl(String localParticipantUrl) {
+        this.localParticipantUrl = localParticipantUrl;
+        return this;
+    }
+
+    /**
+     * The context-path for the local participant.
+     *
+     * Is default /lra-participant
+     */
+    public LraConfigurationProperties withLocalParticipantContextPath(String localParticipantContextPath) {
+        this.localParticipantContextPath = localParticipantContextPath;
+        return this;
+    }
+
 }