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 2024/06/19 05:09:49 UTC

(camel) branch main updated: camel-timer: Polish description

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


The following commit(s) were added to refs/heads/main by this push:
     new 9c41605842b camel-timer: Polish description
9c41605842b is described below

commit 9c41605842ba8c62961658fe47bd3308647d4832
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jun 19 07:09:24 2024 +0200

    camel-timer: Polish description
---
 .../org/apache/camel/catalog/components/timer.json |  4 +--
 .../org/apache/camel/component/timer/timer.json    |  4 +--
 .../camel/component/timer/TimerEndpoint.java       | 29 +++++++++++++---------
 .../endpoint/dsl/TimerEndpointBuilderFactory.java  | 14 ++++++++---
 .../apache/camel/kotlin/components/TimerUriDsl.kt  |  6 +++--
 5 files changed, 35 insertions(+), 22 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/timer.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/timer.json
index 4dc8d22f1e7..2d4f735ca35 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/timer.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/timer.json
@@ -33,10 +33,10 @@
   },
   "properties": {
     "timerName": { "index": 0, "kind": "path", "displayName": "Timer Name", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the timer" },
-    "delay": { "index": 1, "kind": "parameter", "displayName": "Delay", "group": "consumer", "label": "", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "Delay before first event is triggered." },
+    "delay": { "index": 1, "kind": "parameter", "displayName": "Delay", "group": "consumer", "label": "", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "The number of milliseconds to wait before the first event is generated. Should not be used in conjunction with the time option. The default value is 1000." },
     "fixedRate": { "index": 2, "kind": "parameter", "displayName": "Fixed Rate", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Events take place at approximately regular intervals, separated by the specified period." },
     "includeMetadata": { "index": 3, "kind": "parameter", "displayName": "Include Metadata", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to include metadata in the exchange such as fired time, timer name, timer count etc." },
-    "period": { "index": 4, "kind": "parameter", "displayName": "Period", "group": "consumer", "label": "", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "If greater than 0, generate periodic events every period." },
+    "period": { "index": 4, "kind": "parameter", "displayName": "Period", "group": "consumer", "label": "", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "Generate periodic events every period. Must be zero or positive value. The default value is 1000." },
     "repeatCount": { "index": 5, "kind": "parameter", "displayName": "Repeat Count", "group": "consumer", "label": "", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "Specifies a maximum limit of number of fires. So if you set it to 1, the timer will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever." },
     "bridgeErrorHandler": { "index": 6, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming  [...]
     "exceptionHandler": { "index": 7, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By def [...]
diff --git a/components/camel-timer/src/generated/resources/META-INF/org/apache/camel/component/timer/timer.json b/components/camel-timer/src/generated/resources/META-INF/org/apache/camel/component/timer/timer.json
index 4dc8d22f1e7..2d4f735ca35 100644
--- a/components/camel-timer/src/generated/resources/META-INF/org/apache/camel/component/timer/timer.json
+++ b/components/camel-timer/src/generated/resources/META-INF/org/apache/camel/component/timer/timer.json
@@ -33,10 +33,10 @@
   },
   "properties": {
     "timerName": { "index": 0, "kind": "path", "displayName": "Timer Name", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the timer" },
-    "delay": { "index": 1, "kind": "parameter", "displayName": "Delay", "group": "consumer", "label": "", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "Delay before first event is triggered." },
+    "delay": { "index": 1, "kind": "parameter", "displayName": "Delay", "group": "consumer", "label": "", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "The number of milliseconds to wait before the first event is generated. Should not be used in conjunction with the time option. The default value is 1000." },
     "fixedRate": { "index": 2, "kind": "parameter", "displayName": "Fixed Rate", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Events take place at approximately regular intervals, separated by the specified period." },
     "includeMetadata": { "index": 3, "kind": "parameter", "displayName": "Include Metadata", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to include metadata in the exchange such as fired time, timer name, timer count etc." },
-    "period": { "index": 4, "kind": "parameter", "displayName": "Period", "group": "consumer", "label": "", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "If greater than 0, generate periodic events every period." },
+    "period": { "index": 4, "kind": "parameter", "displayName": "Period", "group": "consumer", "label": "", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "Generate periodic events every period. Must be zero or positive value. The default value is 1000." },
     "repeatCount": { "index": 5, "kind": "parameter", "displayName": "Repeat Count", "group": "consumer", "label": "", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "Specifies a maximum limit of number of fires. So if you set it to 1, the timer will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever." },
     "bridgeErrorHandler": { "index": 6, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming  [...]
     "exceptionHandler": { "index": 7, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By def [...]
diff --git a/components/camel-timer/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java b/components/camel-timer/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
index 1c54c653a6a..1c3ea39159e 100644
--- a/components/camel-timer/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
+++ b/components/camel-timer/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
@@ -47,19 +47,19 @@ public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersS
     @UriPath
     @Metadata(required = true)
     private String timerName;
-    @UriParam(defaultValue = "1000", description = "If greater than 0, generate periodic events every period.",
-              javaType = "java.time.Duration")
+    @UriParam(defaultValue = "1000", javaType = "java.time.Duration")
     private long period = 1000;
-    @UriParam(defaultValue = "1000", description = "Delay before first event is triggered.", javaType = "java.time.Duration")
+    @UriParam(defaultValue = "1000", javaType = "java.time.Duration")
     private long delay = 1000;
     @UriParam
     private long repeatCount;
-    @UriParam(defaultValue = "TRACE", label = "consumer,scheduler",
-              description = "The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.")
-    private LoggingLevel runLoggingLevel = LoggingLevel.TRACE;
     @UriParam
     private boolean fixedRate;
-    @UriParam(defaultValue = "true", label = "advanced")
+    @UriParam
+    private boolean includeMetadata;
+    @UriParam(defaultValue = "TRACE", label = "consumer,scheduler")
+    private LoggingLevel runLoggingLevel = LoggingLevel.TRACE;
+    @UriParam(label = "advanced", defaultValue = "true")
     private boolean daemon = true;
     @UriParam(label = "advanced")
     private Date time;
@@ -67,10 +67,7 @@ public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersS
     private String pattern;
     @UriParam(label = "advanced")
     private Timer timer;
-    @UriParam
-    private boolean includeMetadata;
-    @UriParam(defaultValue = "false", label = "advanced",
-              description = "Sets whether synchronous processing should be strictly used")
+    @UriParam(label = "advanced")
     private boolean synchronous;
 
     public TimerEndpoint() {
@@ -190,6 +187,10 @@ public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersS
         return runLoggingLevel;
     }
 
+    /**
+     * The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level
+     * for that.
+     */
     @ManagedAttribute(description = "The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.")
     public void setRunLoggingLevel(LoggingLevel runLoggingLevel) {
         this.runLoggingLevel = runLoggingLevel;
@@ -201,7 +202,7 @@ public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersS
     }
 
     /**
-     * If greater than 0, generate periodic events every period milliseconds.
+     * Generate periodic events every period. Must be zero or positive value.
      * <p/>
      * The default value is 1000.
      */
@@ -279,10 +280,14 @@ public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersS
         this.includeMetadata = includeMetadata;
     }
 
+    @ManagedAttribute(description = "Whether synchronous processing should be strictly used")
     public boolean isSynchronous() {
         return synchronous;
     }
 
+    /**
+     * Sets whether synchronous processing should be strictly used
+     */
     public void setSynchronous(boolean synchronous) {
         this.synchronous = synchronous;
     }
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/TimerEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/TimerEndpointBuilderFactory.java
index 0270cafae01..bcb87610f08 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/TimerEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/TimerEndpointBuilderFactory.java
@@ -45,7 +45,9 @@ public interface TimerEndpointBuilderFactory {
         }
 
         /**
-         * Delay before first event is triggered.
+         * The number of milliseconds to wait before the first event is
+         * generated. Should not be used in conjunction with the time option.
+         * The default value is 1000.
          * 
          * The option is a: <code>long</code> type.
          * 
@@ -60,7 +62,9 @@ public interface TimerEndpointBuilderFactory {
             return this;
         }
         /**
-         * Delay before first event is triggered.
+         * The number of milliseconds to wait before the first event is
+         * generated. Should not be used in conjunction with the time option.
+         * The default value is 1000.
          * 
          * The option will be converted to a <code>long</code> type.
          * 
@@ -139,7 +143,8 @@ public interface TimerEndpointBuilderFactory {
             return this;
         }
         /**
-         * If greater than 0, generate periodic events every period.
+         * Generate periodic events every period. Must be zero or positive
+         * value. The default value is 1000.
          * 
          * The option is a: <code>long</code> type.
          * 
@@ -154,7 +159,8 @@ public interface TimerEndpointBuilderFactory {
             return this;
         }
         /**
-         * If greater than 0, generate periodic events every period.
+         * Generate periodic events every period. Must be zero or positive
+         * value. The default value is 1000.
          * 
          * The option will be converted to a <code>long</code> type.
          * 
diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TimerUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TimerUriDsl.kt
index abfe0b68fe3..be5db50ffe1 100644
--- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TimerUriDsl.kt
+++ b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TimerUriDsl.kt
@@ -52,7 +52,8 @@ public class TimerUriDsl(
   }
 
   /**
-   * Delay before first event is triggered.
+   * The number of milliseconds to wait before the first event is generated. Should not be used in
+   * conjunction with the time option. The default value is 1000.
    */
   public fun delay(delay: String) {
     it.property("delay", delay)
@@ -87,7 +88,8 @@ public class TimerUriDsl(
   }
 
   /**
-   * If greater than 0, generate periodic events every period.
+   * Generate periodic events every period. Must be zero or positive value. The default value is
+   * 1000.
    */
   public fun period(period: String) {
     it.property("period", period)