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

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


The following commit(s) were added to refs/heads/CAMEL-13870 by this push:
     new d0cbf7a  CAMEL-13870: Fast property configuration of Camel endpoints. 
Work in progress.
d0cbf7a is described below

commit d0cbf7af68ec7c560193be4172584841cd6cdd43
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Aug 21 11:43:17 2019 +0200

    CAMEL-13870: Fast property configuration of Camel endpoints. Work in 
progress.
---
 .../src/main/docs/iec60870-client-component.adoc     |  2 +-
 .../src/main/docs/iec60870-server-component.adoc     |  2 +-
 .../component/iec60870/AbstractIecEndpoint.java      | 20 +++++++++++++++++++-
 .../apache/camel/component/iec60870/BaseOptions.java |  2 +-
 .../component/iec60870/client/ClientOptions.java     | 17 +++++++++--------
 .../endpoint/dsl/ClientEndpointBuilderFactory.java   | 19 +++++++++----------
 .../endpoint/dsl/ServerEndpointBuilderFactory.java   | 19 +++++++++----------
 7 files changed, 49 insertions(+), 32 deletions(-)

diff --git 
a/components/camel-iec60870/src/main/docs/iec60870-client-component.adoc 
b/components/camel-iec60870/src/main/docs/iec60870-client-component.adoc
index a7ba118..b953838 100644
--- a/components/camel-iec60870/src/main/docs/iec60870-client-component.adoc
+++ b/components/camel-iec60870/src/main/docs/iec60870-client-component.adoc
@@ -93,7 +93,7 @@ with the following path and query parameters:
 | *timeout1* (connection) | Timeout T1 in milliseconds. | 15000 | int
 | *timeout2* (connection) | Timeout T2 in milliseconds. | 10000 | int
 | *timeout3* (connection) | Timeout T3 in milliseconds. | 20000 | int
-| *causeSourceAddress* (data) | Whether to include the source address | true | 
boolean
+| *causeSourceAddress* (data) | Whether to include the source address |  | byte
 | *ignoreBackgroundScan* (data) | Whether background scan transmissions should 
be ignored. | true | boolean
 | *ignoreDaylightSavingTime* (data) | Whether to ignore or respect DST | false 
| boolean
 | *timeZone* (data) | The timezone to use. May be any Java time zone string | 
UTC | TimeZone
diff --git 
a/components/camel-iec60870/src/main/docs/iec60870-server-component.adoc 
b/components/camel-iec60870/src/main/docs/iec60870-server-component.adoc
index 0d5e39d..fb47c82 100644
--- a/components/camel-iec60870/src/main/docs/iec60870-server-component.adoc
+++ b/components/camel-iec60870/src/main/docs/iec60870-server-component.adoc
@@ -97,7 +97,7 @@ with the following path and query parameters:
 | *timeout1* (connection) | Timeout T1 in milliseconds. | 15000 | int
 | *timeout2* (connection) | Timeout T2 in milliseconds. | 10000 | int
 | *timeout3* (connection) | Timeout T3 in milliseconds. | 20000 | int
-| *causeSourceAddress* (data) | Whether to include the source address | true | 
boolean
+| *causeSourceAddress* (data) | Whether to include the source address |  | byte
 | *ignoreBackgroundScan* (data) | Whether background scan transmissions should 
be ignored. | true | boolean
 | *ignoreDaylightSavingTime* (data) | Whether to ignore or respect DST | false 
| boolean
 | *timeZone* (data) | The timezone to use. May be any Java time zone string | 
UTC | TimeZone
diff --git 
a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/AbstractIecEndpoint.java
 
b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/AbstractIecEndpoint.java
index 364953e..d912107 100644
--- 
a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/AbstractIecEndpoint.java
+++ 
b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/AbstractIecEndpoint.java
@@ -78,7 +78,25 @@ public abstract class AbstractIecEndpoint<T extends 
AbstractConnectionMultiplexo
         this.address = requireNonNull(address);
     }
 
-    
+    public ClientOptions getConnectionOptions() {
+        return connectionOptions;
+    }
+
+    public ProtocolOptions getProtocolOptions() {
+        return protocolOptions;
+    }
+
+    public DataModuleOptions getDataModuleOptions() {
+        return dataModuleOptions;
+    }
+
+    public String getConnectionId() {
+        return connectionId;
+    }
+
+    public void setConnectionId(String connectionId) {
+        this.connectionId = connectionId;
+    }
 
     public ObjectAddress getAddress() {
         return this.address;
diff --git 
a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/BaseOptions.java
 
b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/BaseOptions.java
index d0c8de6..0593a68 100644
--- 
a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/BaseOptions.java
+++ 
b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/BaseOptions.java
@@ -32,7 +32,7 @@ public abstract class BaseOptions<T extends BaseOptions<T>> {
     /**
      * Protocol options
      */
-    @UriParam(javaType = "ProtocolOptions")
+    @UriParam(javaType = 
"org.eclipse.neoscada.protocol.iec60870.ProtocolOptions")
     private ProtocolOptions.Builder protocolOptions;
 
     // dummy for doc generation
diff --git 
a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/client/ClientOptions.java
 
b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/client/ClientOptions.java
index 8330dcc..8ca8cd8 100644
--- 
a/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/client/ClientOptions.java
+++ 
b/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/client/ClientOptions.java
@@ -30,7 +30,7 @@ public class ClientOptions extends BaseOptions<ClientOptions> 
{
     /**
      * Data module options
      */
-    @UriParam(javaType = "DataModuleOptions")
+    @UriParam(javaType = 
"org.eclipse.neoscada.protocol.iec60870.client.data.DataModuleOptions")
     private DataModuleOptions.Builder dataModuleOptions;
 
     // dummy for doc generation
@@ -38,14 +38,14 @@ public class ClientOptions extends 
BaseOptions<ClientOptions> {
      * Whether background scan transmissions should be ignored.
      */
     @UriParam(label = "data", defaultValue = "true")
-    private boolean ignoreBackgroundScan;
+    private boolean ignoreBackgroundScan = true;
 
     // dummy for doc generation
     /**
      * Whether to include the source address
      */
-    @UriParam(label = "data", defaultValue = "true")
-    private boolean causeSourceAddress;
+    @UriParam(label = "data")
+    private byte causeSourceAddress;
 
     public ClientOptions() {
         this.dataModuleOptions = new DataModuleOptions.Builder();
@@ -80,12 +80,13 @@ public class ClientOptions extends 
BaseOptions<ClientOptions> {
 
     // wrapper methods - DataModuleOptions
 
-    public void setCauseSourceAddress(final Byte causeSourceAddress) {
-        this.dataModuleOptions.setCauseSourceAddress(causeSourceAddress);
+    public byte getCauseSourceAddress() {
+        return causeSourceAddress;
     }
 
-    public Byte getCauseSourceAddress() {
-        return this.dataModuleOptions.getCauseSourceAddress();
+    public void setCauseSourceAddress(final byte causeSourceAddress) {
+        this.causeSourceAddress = causeSourceAddress;
+        this.dataModuleOptions.setCauseSourceAddress(causeSourceAddress);
     }
 
     public void setIgnoreBackgroundScan(final boolean ignoreBackgroundScan) {
diff --git 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ClientEndpointBuilderFactory.java
 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ClientEndpointBuilderFactory.java
index 8dcd48f..e0a8bc5 100644
--- 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ClientEndpointBuilderFactory.java
+++ 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ClientEndpointBuilderFactory.java
@@ -331,19 +331,19 @@ public interface ClientEndpointBuilderFactory {
         /**
          * Whether to include the source address.
          * 
-         * The option is a: <code>boolean</code> type.
+         * The option is a: <code>byte</code> type.
          * 
          * Group: data
          */
         default ClientEndpointConsumerBuilder causeSourceAddress(
-                boolean causeSourceAddress) {
+                byte causeSourceAddress) {
             setProperty("causeSourceAddress", causeSourceAddress);
             return this;
         }
         /**
          * Whether to include the source address.
          * 
-         * The option will be converted to a <code>boolean</code> type.
+         * The option will be converted to a <code>byte</code> type.
          * 
          * Group: data
          */
@@ -857,19 +857,19 @@ public interface ClientEndpointBuilderFactory {
         /**
          * Whether to include the source address.
          * 
-         * The option is a: <code>boolean</code> type.
+         * The option is a: <code>byte</code> type.
          * 
          * Group: data
          */
         default ClientEndpointProducerBuilder causeSourceAddress(
-                boolean causeSourceAddress) {
+                byte causeSourceAddress) {
             setProperty("causeSourceAddress", causeSourceAddress);
             return this;
         }
         /**
          * Whether to include the source address.
          * 
-         * The option will be converted to a <code>boolean</code> type.
+         * The option will be converted to a <code>byte</code> type.
          * 
          * Group: data
          */
@@ -1277,19 +1277,18 @@ public interface ClientEndpointBuilderFactory {
         /**
          * Whether to include the source address.
          * 
-         * The option is a: <code>boolean</code> type.
+         * The option is a: <code>byte</code> type.
          * 
          * Group: data
          */
-        default ClientEndpointBuilder causeSourceAddress(
-                boolean causeSourceAddress) {
+        default ClientEndpointBuilder causeSourceAddress(byte 
causeSourceAddress) {
             setProperty("causeSourceAddress", causeSourceAddress);
             return this;
         }
         /**
          * Whether to include the source address.
          * 
-         * The option will be converted to a <code>boolean</code> type.
+         * The option will be converted to a <code>byte</code> type.
          * 
          * Group: data
          */
diff --git 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ServerEndpointBuilderFactory.java
 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ServerEndpointBuilderFactory.java
index 4676dd1..1111bf4 100644
--- 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ServerEndpointBuilderFactory.java
+++ 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ServerEndpointBuilderFactory.java
@@ -355,19 +355,19 @@ public interface ServerEndpointBuilderFactory {
         /**
          * Whether to include the source address.
          * 
-         * The option is a: <code>boolean</code> type.
+         * The option is a: <code>byte</code> type.
          * 
          * Group: data
          */
         default ServerEndpointConsumerBuilder causeSourceAddress(
-                boolean causeSourceAddress) {
+                byte causeSourceAddress) {
             setProperty("causeSourceAddress", causeSourceAddress);
             return this;
         }
         /**
          * Whether to include the source address.
          * 
-         * The option will be converted to a <code>boolean</code> type.
+         * The option will be converted to a <code>byte</code> type.
          * 
          * Group: data
          */
@@ -905,19 +905,19 @@ public interface ServerEndpointBuilderFactory {
         /**
          * Whether to include the source address.
          * 
-         * The option is a: <code>boolean</code> type.
+         * The option is a: <code>byte</code> type.
          * 
          * Group: data
          */
         default ServerEndpointProducerBuilder causeSourceAddress(
-                boolean causeSourceAddress) {
+                byte causeSourceAddress) {
             setProperty("causeSourceAddress", causeSourceAddress);
             return this;
         }
         /**
          * Whether to include the source address.
          * 
-         * The option will be converted to a <code>boolean</code> type.
+         * The option will be converted to a <code>byte</code> type.
          * 
          * Group: data
          */
@@ -1347,19 +1347,18 @@ public interface ServerEndpointBuilderFactory {
         /**
          * Whether to include the source address.
          * 
-         * The option is a: <code>boolean</code> type.
+         * The option is a: <code>byte</code> type.
          * 
          * Group: data
          */
-        default ServerEndpointBuilder causeSourceAddress(
-                boolean causeSourceAddress) {
+        default ServerEndpointBuilder causeSourceAddress(byte 
causeSourceAddress) {
             setProperty("causeSourceAddress", causeSourceAddress);
             return this;
         }
         /**
          * Whether to include the source address.
          * 
-         * The option will be converted to a <code>boolean</code> type.
+         * The option will be converted to a <code>byte</code> type.
          * 
          * Group: data
          */

Reply via email to