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 c6876c46dff CAMEL-20808: camel-etcd - Setting endpoint should be tooling friendly c6876c46dff is described below commit c6876c46dff28eb545590432b3aa68c9f0427b66 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed May 29 08:58:28 2024 +0200 CAMEL-20808: camel-etcd - Setting endpoint should be tooling friendly --- .../org/apache/camel/catalog/components/etcd3.json | 4 +- .../component/etcd3/Etcd3ComponentConfigurer.java | 4 +- .../component/etcd3/Etcd3EndpointConfigurer.java | 4 +- .../Etcd3ServiceDiscoveryFactoryConfigurer.java | 4 +- .../org/apache/camel/component/etcd3/etcd3.json | 4 +- .../camel/component/etcd3/Etcd3Configuration.java | 14 +++-- .../camel/component/etcd3/Etcd3Constants.java | 2 +- .../camel/component/etcd3/Etcd3Endpoint.java | 6 +-- .../etcd3/cloud/Etcd3ServiceDiscoveryFactory.java | 6 +-- .../etcd3/cloud/Etcd3WatchServiceDiscovery.java | 4 +- .../dsl/Etcd3ComponentBuilderFactory.java | 9 ++-- .../endpoint/dsl/Etcd3EndpointBuilderFactory.java | 63 ++++------------------ .../apache/camel/kotlin/components/Etcd3UriDsl.kt | 3 +- 13 files changed, 45 insertions(+), 82 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/etcd3.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/etcd3.json index b6c4b242513..776a9278f51 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/etcd3.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/etcd3.json @@ -24,7 +24,7 @@ }, "componentProperties": { "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.etcd3.Etcd3Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration." }, - "endpoints": { "index": 1, "kind": "property", "displayName": "Endpoints", "group": "common", "label": "common", "required": false, "type": "array", "javaType": "java.lang.String[]", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "http:\/\/localhost:2379", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure etcd server endpoints using the IPNameResolver." }, + "endpoints": { "index": 1, "kind": "property", "displayName": "Endpoints", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "http:\/\/localhost:2379", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure etcd server endpoints using the IPNameResolver. Multiple endpoi [...] "keyCharset": { "index": 2, "kind": "property", "displayName": "Key Charset", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "UTF-8", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure the charset to use for the keys." }, "namespace": { "index": 3, "kind": "property", "displayName": "Namespace", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure the namespace of keys used. \/ will be treated as no namespace." }, "prefix": { "index": 4, "kind": "property", "displayName": "Prefix", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "To apply an action on all the key-value pairs whose key that starts with the target path." }, @@ -58,7 +58,7 @@ }, "properties": { "path": { "index": 0, "kind": "path", "displayName": "Path", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The path the endpoint refers to" }, - "endpoints": { "index": 1, "kind": "parameter", "displayName": "Endpoints", "group": "common", "label": "common", "required": false, "type": "array", "javaType": "java.lang.String[]", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "http:\/\/localhost:2379", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure etcd server endpoints using the IPNameResolver." }, + "endpoints": { "index": 1, "kind": "parameter", "displayName": "Endpoints", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "http:\/\/localhost:2379", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure etcd server endpoints using the IPNameResolver. Multiple endpo [...] "keyCharset": { "index": 2, "kind": "parameter", "displayName": "Key Charset", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "UTF-8", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure the charset to use for the keys." }, "namespace": { "index": 3, "kind": "parameter", "displayName": "Namespace", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure the namespace of keys used. \/ will be treated as no namespace." }, "prefix": { "index": 4, "kind": "parameter", "displayName": "Prefix", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "To apply an action on all the key-value pairs whose key that starts with the target path." }, diff --git a/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/Etcd3ComponentConfigurer.java b/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/Etcd3ComponentConfigurer.java index 3ef54782b20..01f6cdd8bb6 100644 --- a/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/Etcd3ComponentConfigurer.java +++ b/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/Etcd3ComponentConfigurer.java @@ -40,7 +40,7 @@ public class Etcd3ComponentConfigurer extends PropertyConfigurerSupport implemen case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.etcd3.Etcd3Configuration.class, value)); return true; case "connectiontimeout": case "connectionTimeout": getOrCreateConfiguration(target).setConnectionTimeout(property(camelContext, java.time.Duration.class, value)); return true; - case "endpoints": getOrCreateConfiguration(target).setEndpoints(property(camelContext, java.lang.String[].class, value)); return true; + case "endpoints": getOrCreateConfiguration(target).setEndpoints(property(camelContext, java.lang.String.class, value)); return true; case "fromindex": case "fromIndex": getOrCreateConfiguration(target).setFromIndex(property(camelContext, long.class, value)); return true; case "headers": getOrCreateConfiguration(target).setHeaders(property(camelContext, java.util.Map.class, value)); return true; @@ -90,7 +90,7 @@ public class Etcd3ComponentConfigurer extends PropertyConfigurerSupport implemen case "configuration": return org.apache.camel.component.etcd3.Etcd3Configuration.class; case "connectiontimeout": case "connectionTimeout": return java.time.Duration.class; - case "endpoints": return java.lang.String[].class; + case "endpoints": return java.lang.String.class; case "fromindex": case "fromIndex": return long.class; case "headers": return java.util.Map.class; diff --git a/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/Etcd3EndpointConfigurer.java b/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/Etcd3EndpointConfigurer.java index bec09110cf2..652aa21dd7f 100644 --- a/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/Etcd3EndpointConfigurer.java +++ b/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/Etcd3EndpointConfigurer.java @@ -30,7 +30,7 @@ public class Etcd3EndpointConfigurer extends PropertyConfigurerSupport implement case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; case "connectiontimeout": case "connectionTimeout": target.getConfiguration().setConnectionTimeout(property(camelContext, java.time.Duration.class, value)); return true; - case "endpoints": target.getConfiguration().setEndpoints(property(camelContext, java.lang.String[].class, value)); return true; + case "endpoints": target.getConfiguration().setEndpoints(property(camelContext, java.lang.String.class, value)); return true; case "exceptionhandler": case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true; case "exchangepattern": @@ -81,7 +81,7 @@ public class Etcd3EndpointConfigurer extends PropertyConfigurerSupport implement case "bridgeErrorHandler": return boolean.class; case "connectiontimeout": case "connectionTimeout": return java.time.Duration.class; - case "endpoints": return java.lang.String[].class; + case "endpoints": return java.lang.String.class; case "exceptionhandler": case "exceptionHandler": return org.apache.camel.spi.ExceptionHandler.class; case "exchangepattern": diff --git a/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/cloud/Etcd3ServiceDiscoveryFactoryConfigurer.java b/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/cloud/Etcd3ServiceDiscoveryFactoryConfigurer.java index d9a84172f6a..c74f509e7ae 100644 --- a/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/cloud/Etcd3ServiceDiscoveryFactoryConfigurer.java +++ b/components/camel-etcd3/src/generated/java/org/apache/camel/component/etcd3/cloud/Etcd3ServiceDiscoveryFactoryConfigurer.java @@ -28,7 +28,7 @@ public class Etcd3ServiceDiscoveryFactoryConfigurer extends org.apache.camel.sup case "authority": target.setAuthority(property(camelContext, java.lang.String.class, value)); return true; case "connectiontimeout": case "connectionTimeout": target.setConnectionTimeout(property(camelContext, java.time.Duration.class, value)); return true; - case "endpoints": target.setEndpoints(property(camelContext, java.lang.String[].class, value)); return true; + case "endpoints": target.setEndpoints(property(camelContext, java.lang.String.class, value)); return true; case "headers": target.setHeaders(property(camelContext, java.util.Map.class, value)); return true; case "keepalivetime": case "keepAliveTime": target.setKeepAliveTime(property(camelContext, java.time.Duration.class, value)); return true; @@ -69,7 +69,7 @@ public class Etcd3ServiceDiscoveryFactoryConfigurer extends org.apache.camel.sup case "authority": return java.lang.String.class; case "connectiontimeout": case "connectionTimeout": return java.time.Duration.class; - case "endpoints": return java.lang.String[].class; + case "endpoints": return java.lang.String.class; case "headers": return java.util.Map.class; case "keepalivetime": case "keepAliveTime": return java.time.Duration.class; diff --git a/components/camel-etcd3/src/generated/resources/META-INF/org/apache/camel/component/etcd3/etcd3.json b/components/camel-etcd3/src/generated/resources/META-INF/org/apache/camel/component/etcd3/etcd3.json index b6c4b242513..776a9278f51 100644 --- a/components/camel-etcd3/src/generated/resources/META-INF/org/apache/camel/component/etcd3/etcd3.json +++ b/components/camel-etcd3/src/generated/resources/META-INF/org/apache/camel/component/etcd3/etcd3.json @@ -24,7 +24,7 @@ }, "componentProperties": { "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.etcd3.Etcd3Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration." }, - "endpoints": { "index": 1, "kind": "property", "displayName": "Endpoints", "group": "common", "label": "common", "required": false, "type": "array", "javaType": "java.lang.String[]", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "http:\/\/localhost:2379", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure etcd server endpoints using the IPNameResolver." }, + "endpoints": { "index": 1, "kind": "property", "displayName": "Endpoints", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "http:\/\/localhost:2379", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure etcd server endpoints using the IPNameResolver. Multiple endpoi [...] "keyCharset": { "index": 2, "kind": "property", "displayName": "Key Charset", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "UTF-8", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure the charset to use for the keys." }, "namespace": { "index": 3, "kind": "property", "displayName": "Namespace", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure the namespace of keys used. \/ will be treated as no namespace." }, "prefix": { "index": 4, "kind": "property", "displayName": "Prefix", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "To apply an action on all the key-value pairs whose key that starts with the target path." }, @@ -58,7 +58,7 @@ }, "properties": { "path": { "index": 0, "kind": "path", "displayName": "Path", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The path the endpoint refers to" }, - "endpoints": { "index": 1, "kind": "parameter", "displayName": "Endpoints", "group": "common", "label": "common", "required": false, "type": "array", "javaType": "java.lang.String[]", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "http:\/\/localhost:2379", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure etcd server endpoints using the IPNameResolver." }, + "endpoints": { "index": 1, "kind": "parameter", "displayName": "Endpoints", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "http:\/\/localhost:2379", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure etcd server endpoints using the IPNameResolver. Multiple endpo [...] "keyCharset": { "index": 2, "kind": "parameter", "displayName": "Key Charset", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "UTF-8", "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure the charset to use for the keys." }, "namespace": { "index": 3, "kind": "parameter", "displayName": "Namespace", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "Configure the namespace of keys used. \/ will be treated as no namespace." }, "prefix": { "index": 4, "kind": "parameter", "displayName": "Prefix", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.etcd3.Etcd3Configuration", "configurationField": "configuration", "description": "To apply an action on all the key-value pairs whose key that starts with the target path." }, diff --git a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Configuration.java b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Configuration.java index e25994030ea..cdf3b36407d 100644 --- a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Configuration.java +++ b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Configuration.java @@ -34,7 +34,7 @@ import static org.apache.camel.component.etcd3.Etcd3Constants.ETCD_DEFAULT_ENDPO public class Etcd3Configuration implements Cloneable { @UriParam(label = "common", defaultValue = "http://localhost:2379") - private String[] endpoints = ETCD_DEFAULT_ENDPOINTS; + private String endpoints = ETCD_DEFAULT_ENDPOINTS; @UriParam(label = "security", secret = true) private String userName; @UriParam(label = "security", secret = true) @@ -76,14 +76,18 @@ public class Etcd3Configuration implements Cloneable { @UriParam(label = "producer", defaultValue = "UTF-8") private String valueCharset = "UTF-8"; - public String[] getEndpoints() { + public String getEndpoints() { return endpoints; } + String[] getEndpointsAsArray() { + return endpoints.split(","); + } + /** - * Configure etcd server endpoints using the IPNameResolver. + * Configure etcd server endpoints using the IPNameResolver. Multiple endpoints can be separated by comma. */ - public void setEndpoints(String... endpoints) { + public void setEndpoints(String endpoints) { this.endpoints = endpoints; } @@ -312,7 +316,7 @@ public class Etcd3Configuration implements Cloneable { */ public Client createClient() { final ClientBuilder builder = Client.builder() - .endpoints(endpoints) + .endpoints(getEndpointsAsArray()) .sslContext(sslContext) .authority(authority) .maxInboundMessageSize(maxInboundMessageSize) diff --git a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Constants.java b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Constants.java index 694bc6b3308..b2f10e9890c 100644 --- a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Constants.java +++ b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Constants.java @@ -43,7 +43,7 @@ public abstract class Etcd3Constants { public static final String ETCD_KEYS_ACTION_DELETE = "delete"; public static final String ETCD_KEYS_ACTION_GET = "get"; - public static final String[] ETCD_DEFAULT_ENDPOINTS = new String[] { "http://localhost:2379" }; + public static final String ETCD_DEFAULT_ENDPOINTS = "http://localhost:2379"; private Etcd3Constants() { } diff --git a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Endpoint.java b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Endpoint.java index 00d2fd5aa2c..af2cb2f3bcb 100644 --- a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Endpoint.java +++ b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/Etcd3Endpoint.java @@ -16,6 +16,8 @@ */ package org.apache.camel.component.etcd3; +import java.util.Map; + import org.apache.camel.Category; import org.apache.camel.Consumer; import org.apache.camel.Processor; @@ -26,8 +28,6 @@ import org.apache.camel.spi.UriParam; import org.apache.camel.spi.UriPath; import org.apache.camel.support.DefaultEndpoint; -import java.util.Map; - /** * Get, set, delete or watch keys in etcd key-value store. */ @@ -49,7 +49,7 @@ public class Etcd3Endpoint extends DefaultEndpoint implements EndpointServiceLoc @Override public String getServiceUrl() { - return configuration.getEndpoints()[0]; + return configuration.getEndpoints(); } @Override diff --git a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/cloud/Etcd3ServiceDiscoveryFactory.java b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/cloud/Etcd3ServiceDiscoveryFactory.java index 352256e9430..8f1c6a49e67 100644 --- a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/cloud/Etcd3ServiceDiscoveryFactory.java +++ b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/cloud/Etcd3ServiceDiscoveryFactory.java @@ -52,14 +52,14 @@ public class Etcd3ServiceDiscoveryFactory implements ServiceDiscoveryFactory { // Properties // ************************************************************************* - public String[] getEndpoints() { + public String getEndpoints() { return configuration.getEndpoints(); } /** - * Configure etcd server endpoints using the IPNameResolver. + * Configure etcd server endpoints using the IPNameResolver. Multiple endpoints can be separated by comma. */ - public void setEndpoints(String... endpoints) { + public void setEndpoints(String endpoints) { configuration.setEndpoints(endpoints); } diff --git a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/cloud/Etcd3WatchServiceDiscovery.java b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/cloud/Etcd3WatchServiceDiscovery.java index 9f1b3334993..08947a3c5ba 100644 --- a/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/cloud/Etcd3WatchServiceDiscovery.java +++ b/components/camel-etcd3/src/main/java/org/apache/camel/component/etcd3/cloud/Etcd3WatchServiceDiscovery.java @@ -97,7 +97,9 @@ public class Etcd3WatchServiceDiscovery extends Etcd3ServiceDiscovery @Override protected void doStop() throws Exception { try { - client.close(); + if (client != null) { + client.close(); + } } finally { super.doStop(); } diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Etcd3ComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Etcd3ComponentBuilderFactory.java index 12edd6be167..dc6be16fba6 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Etcd3ComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Etcd3ComponentBuilderFactory.java @@ -68,9 +68,10 @@ public interface Etcd3ComponentBuilderFactory { /** - * Configure etcd server endpoints using the IPNameResolver. + * Configure etcd server endpoints using the IPNameResolver. Multiple + * endpoints can be separated by comma. * - * The option is a: <code>java.lang.String[]</code> type. + * The option is a: <code>java.lang.String</code> type. * * Default: http://localhost:2379 * Group: common @@ -78,7 +79,7 @@ public interface Etcd3ComponentBuilderFactory { * @param endpoints the value to set * @return the dsl builder */ - default Etcd3ComponentBuilder endpoints(java.lang.String[] endpoints) { + default Etcd3ComponentBuilder endpoints(java.lang.String endpoints) { doSetProperty("endpoints", endpoints); return this; } @@ -501,7 +502,7 @@ public interface Etcd3ComponentBuilderFactory { Object value) { switch (name) { case "configuration": ((Etcd3Component) component).setConfiguration((org.apache.camel.component.etcd3.Etcd3Configuration) value); return true; - case "endpoints": getOrCreateConfiguration((Etcd3Component) component).setEndpoints((java.lang.String[]) value); return true; + case "endpoints": getOrCreateConfiguration((Etcd3Component) component).setEndpoints((java.lang.String) value); return true; case "keyCharset": getOrCreateConfiguration((Etcd3Component) component).setKeyCharset((java.lang.String) value); return true; case "namespace": getOrCreateConfiguration((Etcd3Component) component).setNamespace((java.lang.String) value); return true; case "prefix": getOrCreateConfiguration((Etcd3Component) component).setPrefix((boolean) value); return true; diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Etcd3EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Etcd3EndpointBuilderFactory.java index 6cb4f4381df..05e1757ea95 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Etcd3EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Etcd3EndpointBuilderFactory.java @@ -44,25 +44,10 @@ public interface Etcd3EndpointBuilderFactory { return (AdvancedEtcd3EndpointConsumerBuilder) this; } /** - * Configure etcd server endpoints using the IPNameResolver. + * Configure etcd server endpoints using the IPNameResolver. Multiple + * endpoints can be separated by comma. * - * The option is a: <code>java.lang.String[]</code> type. - * - * Default: http://localhost:2379 - * Group: common - * - * @param endpoints the value to set - * @return the dsl builder - */ - default Etcd3EndpointConsumerBuilder endpoints(String[] endpoints) { - doSetProperty("endpoints", endpoints); - return this; - } - /** - * Configure etcd server endpoints using the IPNameResolver. - * - * The option will be converted to a <code>java.lang.String[]</code> - * type. + * The option is a: <code>java.lang.String</code> type. * * Default: http://localhost:2379 * Group: common @@ -692,25 +677,10 @@ public interface Etcd3EndpointBuilderFactory { } /** - * Configure etcd server endpoints using the IPNameResolver. - * - * The option is a: <code>java.lang.String[]</code> type. - * - * Default: http://localhost:2379 - * Group: common - * - * @param endpoints the value to set - * @return the dsl builder - */ - default Etcd3EndpointProducerBuilder endpoints(String[] endpoints) { - doSetProperty("endpoints", endpoints); - return this; - } - /** - * Configure etcd server endpoints using the IPNameResolver. + * Configure etcd server endpoints using the IPNameResolver. Multiple + * endpoints can be separated by comma. * - * The option will be converted to a <code>java.lang.String[]</code> - * type. + * The option is a: <code>java.lang.String</code> type. * * Default: http://localhost:2379 * Group: common @@ -1254,25 +1224,10 @@ public interface Etcd3EndpointBuilderFactory { } /** - * Configure etcd server endpoints using the IPNameResolver. - * - * The option is a: <code>java.lang.String[]</code> type. - * - * Default: http://localhost:2379 - * Group: common + * Configure etcd server endpoints using the IPNameResolver. Multiple + * endpoints can be separated by comma. * - * @param endpoints the value to set - * @return the dsl builder - */ - default Etcd3EndpointBuilder endpoints(String[] endpoints) { - doSetProperty("endpoints", endpoints); - return this; - } - /** - * Configure etcd server endpoints using the IPNameResolver. - * - * The option will be converted to a <code>java.lang.String[]</code> - * type. + * The option is a: <code>java.lang.String</code> type. * * Default: http://localhost:2379 * Group: common diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Etcd3UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Etcd3UriDsl.kt index 4ea378b2017..2c585ed498a 100644 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Etcd3UriDsl.kt +++ b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Etcd3UriDsl.kt @@ -52,7 +52,8 @@ public class Etcd3UriDsl( } /** - * Configure etcd server endpoints using the IPNameResolver. + * Configure etcd server endpoints using the IPNameResolver. Multiple endpoints can be separated + * by comma. */ public fun endpoints(endpoints: String) { it.property("endpoints", endpoints)