This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 9b596d7a548506a8cfe344835a4df63014c9597e Author: Andrea Cosentino <[email protected]> AuthorDate: Mon Mar 8 14:59:44 2021 +0100 CAMEL-16315 - Camel-Netty: Support Hostname verification even though we are on Netty 4.1.x --- .../camel/catalog/components/netty-http.json | 2 + .../org/apache/camel/catalog/components/netty.json | 2 + .../camel/catalog/docs/netty-http-component.adoc | 6 +- .../http/NettyHttpConfigurationConfigurer.java | 6 ++ .../netty/http/NettyHttpEndpointUriFactory.java | 3 +- .../camel/component/netty/http/netty-http.json | 2 + .../src/main/docs/netty-http-component.adoc | 6 +- .../dsl/NettyHttpComponentBuilderFactory.java | 17 ++++ .../dsl/NettyHttpEndpointBuilderFactory.java | 99 ++++++++++++++++++++++ .../modules/ROOT/pages/netty-http-component.adoc | 6 +- 10 files changed, 142 insertions(+), 7 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty-http.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty-http.json index 9844149..54a9273 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty-http.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty-http.json @@ -25,6 +25,7 @@ "componentProperties": { "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.netty.NettyConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the NettyConfiguration as configuration when creating endpoints." }, "disconnect": { "kind": "property", "displayName": "Disconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer." }, + "hostnameVerification": { "kind": "property", "displayName": "Hostname Verification", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "To enable\/disable hostname verification on SSLEngine" }, "keepAlive": { "kind": "property", "displayName": "Keep Alive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to ensure socket is not closed due to inactivity" }, "reuseAddress": { "kind": "property", "displayName": "Reuse Address", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to facilitate socket multiplexing" }, "reuseChannel": { "kind": "property", "displayName": "Reuse Channel", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecy [...] @@ -106,6 +107,7 @@ "path": { "kind": "path", "displayName": "Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "Resource path" }, "bridgeEndpoint": { "kind": "parameter", "displayName": "Bridge Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "If the option is true, the producer will ignore the Exchange.HTTP_URI header, and use the endpoint [...] "disconnect": { "kind": "parameter", "displayName": "Disconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and p [...] + "hostnameVerification": { "kind": "parameter", "displayName": "Hostname Verification", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "To enable\/disable hostname verification on SSLEngine" }, "keepAlive": { "kind": "parameter", "displayName": "Keep Alive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "Setting to ensure socket is not closed due to inactivity" }, "reuseAddress": { "kind": "parameter", "displayName": "Reuse Address", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "Setting to facilitate socket multiplexing" }, "reuseChannel": { "kind": "parameter", "displayName": "Reuse Channel", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "This option allows producers and consumers (in client mode) to reuse the same Netty Channel for [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty.json index 1c1958d..de5f869 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/netty.json @@ -24,6 +24,7 @@ "componentProperties": { "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.netty.NettyConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the NettyConfiguration as configuration when creating endpoints." }, "disconnect": { "kind": "property", "displayName": "Disconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer." }, + "hostnameVerification": { "kind": "property", "displayName": "Hostname Verification", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "To enable\/disable hostname verification on SSLEngine" }, "keepAlive": { "kind": "property", "displayName": "Keep Alive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to ensure socket is not closed due to inactivity" }, "reuseAddress": { "kind": "property", "displayName": "Reuse Address", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to facilitate socket multiplexing" }, "reuseChannel": { "kind": "property", "displayName": "Reuse Channel", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecy [...] @@ -100,6 +101,7 @@ "host": { "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "The hostname. For the consumer the hostname is localhost or 0.0.0.0. For the producer the hostname is the remote host to conne [...] "port": { "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": true, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "The host port number" }, "disconnect": { "kind": "parameter", "displayName": "Disconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer." }, + "hostnameVerification": { "kind": "parameter", "displayName": "Hostname Verification", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "To enable\/disable hostname verification on SSLEngine" }, "keepAlive": { "kind": "parameter", "displayName": "Keep Alive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to ensure socket is not closed due to inactivity" }, "reuseAddress": { "kind": "parameter", "displayName": "Reuse Address", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to facilitate socket multiplexing" }, "reuseChannel": { "kind": "parameter", "displayName": "Reuse Channel", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifec [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/netty-http-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/netty-http-component.adoc index 8bf47e3..22a8021 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/netty-http-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/netty-http-component.adoc @@ -97,7 +97,7 @@ related to UDP transport. // component options: START -The Netty HTTP component supports 75 options, which are listed below. +The Netty HTTP component supports 76 options, which are listed below. @@ -106,6 +106,7 @@ The Netty HTTP component supports 75 options, which are listed below. | Name | Description | Default | Type | *configuration* (common) | To use the NettyConfiguration as configuration when creating endpoints. | | NettyConfiguration | *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean +| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean | *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean | *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean | *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...] @@ -213,7 +214,7 @@ with the following path and query parameters: |=== -=== Query Parameters (79 parameters): +=== Query Parameters (80 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -221,6 +222,7 @@ with the following path and query parameters: | Name | Description | Default | Type | *bridgeEndpoint* (common) | If the option is true, the producer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the throwExceptionOnFailure to be false to let the producer send all the fault response back. The consumer working in the bridge mode will skip the gzip compression and WWW URL form encoding (by adding the Exchange.SKIP_GZIP_ENCODING and Exchange.SKIP_WWW_FORM_URLENCODED headers to the consumed exchange). | false | boolean | *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean +| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean | *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean | *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean | *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...] diff --git a/components/camel-netty-http/src/generated/java/org/apache/camel/component/netty/http/NettyHttpConfigurationConfigurer.java b/components/camel-netty-http/src/generated/java/org/apache/camel/component/netty/http/NettyHttpConfigurationConfigurer.java index 9ab13aa..56fd5c8 100644 --- a/components/camel-netty-http/src/generated/java/org/apache/camel/component/netty/http/NettyHttpConfigurationConfigurer.java +++ b/components/camel-netty-http/src/generated/java/org/apache/camel/component/netty/http/NettyHttpConfigurationConfigurer.java @@ -73,6 +73,8 @@ public class NettyHttpConfigurationConfigurer extends org.apache.camel.support.c case "Encoding": target.setEncoding(property(camelContext, java.lang.String.class, value)); return true; case "host": case "Host": target.setHost(property(camelContext, java.lang.String.class, value)); return true; + case "hostnameverification": + case "HostnameVerification": target.setHostnameVerification(property(camelContext, boolean.class, value)); return true; case "keepalive": case "KeepAlive": target.setKeepAlive(property(camelContext, boolean.class, value)); return true; case "keystorefile": @@ -254,6 +256,8 @@ public class NettyHttpConfigurationConfigurer extends org.apache.camel.support.c case "Encoding": return java.lang.String.class; case "host": case "Host": return java.lang.String.class; + case "hostnameverification": + case "HostnameVerification": return boolean.class; case "keepalive": case "KeepAlive": return boolean.class; case "keystorefile": @@ -436,6 +440,8 @@ public class NettyHttpConfigurationConfigurer extends org.apache.camel.support.c case "Encoding": return target.getEncoding(); case "host": case "Host": return target.getHost(); + case "hostnameverification": + case "HostnameVerification": return target.isHostnameVerification(); case "keepalive": case "KeepAlive": return target.isKeepAlive(); case "keystorefile": diff --git a/components/camel-netty-http/src/generated/java/org/apache/camel/component/netty/http/NettyHttpEndpointUriFactory.java b/components/camel-netty-http/src/generated/java/org/apache/camel/component/netty/http/NettyHttpEndpointUriFactory.java index adbf07b..395b003 100644 --- a/components/camel-netty-http/src/generated/java/org/apache/camel/component/netty/http/NettyHttpEndpointUriFactory.java +++ b/components/camel-netty-http/src/generated/java/org/apache/camel/component/netty/http/NettyHttpEndpointUriFactory.java @@ -20,12 +20,13 @@ public class NettyHttpEndpointUriFactory extends org.apache.camel.support.compon private static final Set<String> PROPERTY_NAMES; private static final Set<String> SECRET_PROPERTY_NAMES; static { - Set<String> props = new HashSet<>(83); + Set<String> props = new HashSet<>(84); props.add("usingExecutorService"); props.add("disconnect"); props.add("enabledProtocols"); props.add("synchronous"); props.add("nettySharedHttpServer"); + props.add("hostnameVerification"); props.add("keyStoreFormat"); props.add("producerPoolMinIdle"); props.add("ssl"); diff --git a/components/camel-netty-http/src/generated/resources/org/apache/camel/component/netty/http/netty-http.json b/components/camel-netty-http/src/generated/resources/org/apache/camel/component/netty/http/netty-http.json index 9844149..54a9273 100644 --- a/components/camel-netty-http/src/generated/resources/org/apache/camel/component/netty/http/netty-http.json +++ b/components/camel-netty-http/src/generated/resources/org/apache/camel/component/netty/http/netty-http.json @@ -25,6 +25,7 @@ "componentProperties": { "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.netty.NettyConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the NettyConfiguration as configuration when creating endpoints." }, "disconnect": { "kind": "property", "displayName": "Disconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer." }, + "hostnameVerification": { "kind": "property", "displayName": "Hostname Verification", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "To enable\/disable hostname verification on SSLEngine" }, "keepAlive": { "kind": "property", "displayName": "Keep Alive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to ensure socket is not closed due to inactivity" }, "reuseAddress": { "kind": "property", "displayName": "Reuse Address", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Setting to facilitate socket multiplexing" }, "reuseChannel": { "kind": "property", "displayName": "Reuse Channel", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecy [...] @@ -106,6 +107,7 @@ "path": { "kind": "path", "displayName": "Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "Resource path" }, "bridgeEndpoint": { "kind": "parameter", "displayName": "Bridge Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "If the option is true, the producer will ignore the Exchange.HTTP_URI header, and use the endpoint [...] "disconnect": { "kind": "parameter", "displayName": "Disconnect", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and p [...] + "hostnameVerification": { "kind": "parameter", "displayName": "Hostname Verification", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "To enable\/disable hostname verification on SSLEngine" }, "keepAlive": { "kind": "parameter", "displayName": "Keep Alive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "Setting to ensure socket is not closed due to inactivity" }, "reuseAddress": { "kind": "parameter", "displayName": "Reuse Address", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "Setting to facilitate socket multiplexing" }, "reuseChannel": { "kind": "parameter", "displayName": "Reuse Channel", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.netty.http.NettyHttpConfiguration", "configurationField": "configuration", "description": "This option allows producers and consumers (in client mode) to reuse the same Netty Channel for [...] diff --git a/components/camel-netty-http/src/main/docs/netty-http-component.adoc b/components/camel-netty-http/src/main/docs/netty-http-component.adoc index 8bf47e3..22a8021 100644 --- a/components/camel-netty-http/src/main/docs/netty-http-component.adoc +++ b/components/camel-netty-http/src/main/docs/netty-http-component.adoc @@ -97,7 +97,7 @@ related to UDP transport. // component options: START -The Netty HTTP component supports 75 options, which are listed below. +The Netty HTTP component supports 76 options, which are listed below. @@ -106,6 +106,7 @@ The Netty HTTP component supports 75 options, which are listed below. | Name | Description | Default | Type | *configuration* (common) | To use the NettyConfiguration as configuration when creating endpoints. | | NettyConfiguration | *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean +| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean | *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean | *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean | *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...] @@ -213,7 +214,7 @@ with the following path and query parameters: |=== -=== Query Parameters (79 parameters): +=== Query Parameters (80 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -221,6 +222,7 @@ with the following path and query parameters: | Name | Description | Default | Type | *bridgeEndpoint* (common) | If the option is true, the producer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the throwExceptionOnFailure to be false to let the producer send all the fault response back. The consumer working in the bridge mode will skip the gzip compression and WWW URL form encoding (by adding the Exchange.SKIP_GZIP_ENCODING and Exchange.SKIP_WWW_FORM_URLENCODED headers to the consumed exchange). | false | boolean | *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean +| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean | *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean | *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean | *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...] diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyHttpComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyHttpComponentBuilderFactory.java index c682a08..9ba23e7 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyHttpComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/NettyHttpComponentBuilderFactory.java @@ -84,6 +84,22 @@ public interface NettyHttpComponentBuilderFactory { return this; } /** + * To enable/disable hostname verification on SSLEngine. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: common + * + * @param hostnameVerification the value to set + * @return the dsl builder + */ + default NettyHttpComponentBuilder hostnameVerification( + boolean hostnameVerification) { + doSetProperty("hostnameVerification", hostnameVerification); + return this; + } + /** * Setting to ensure socket is not closed due to inactivity. * * The option is a: <code>boolean</code> type. @@ -1391,6 +1407,7 @@ public interface NettyHttpComponentBuilderFactory { switch (name) { case "configuration": ((NettyHttpComponent) component).setConfiguration((org.apache.camel.component.netty.NettyConfiguration) value); return true; case "disconnect": getOrCreateConfiguration((NettyHttpComponent) component).setDisconnect((boolean) value); return true; + case "hostnameVerification": getOrCreateConfiguration((NettyHttpComponent) component).setHostnameVerification((boolean) value); return true; case "keepAlive": getOrCreateConfiguration((NettyHttpComponent) component).setKeepAlive((boolean) value); return true; case "reuseAddress": getOrCreateConfiguration((NettyHttpComponent) component).setReuseAddress((boolean) value); return true; case "reuseChannel": getOrCreateConfiguration((NettyHttpComponent) component).setReuseChannel((boolean) value); return true; diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyHttpEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyHttpEndpointBuilderFactory.java index 6054654..7500e7d 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyHttpEndpointBuilderFactory.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/NettyHttpEndpointBuilderFactory.java @@ -125,6 +125,39 @@ public interface NettyHttpEndpointBuilderFactory { return this; } /** + * To enable/disable hostname verification on SSLEngine. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: common + * + * @param hostnameVerification the value to set + * @return the dsl builder + */ + default NettyHttpEndpointConsumerBuilder hostnameVerification( + boolean hostnameVerification) { + doSetProperty("hostnameVerification", hostnameVerification); + return this; + } + /** + * To enable/disable hostname verification on SSLEngine. + * + * The option will be converted to a <code>boolean</code> + * type. + * + * Default: false + * Group: common + * + * @param hostnameVerification the value to set + * @return the dsl builder + */ + default NettyHttpEndpointConsumerBuilder hostnameVerification( + String hostnameVerification) { + doSetProperty("hostnameVerification", hostnameVerification); + return this; + } + /** * Setting to ensure socket is not closed due to inactivity. * * The option is a: <code>boolean</code> type. @@ -2389,6 +2422,39 @@ public interface NettyHttpEndpointBuilderFactory { return this; } /** + * To enable/disable hostname verification on SSLEngine. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: common + * + * @param hostnameVerification the value to set + * @return the dsl builder + */ + default NettyHttpEndpointProducerBuilder hostnameVerification( + boolean hostnameVerification) { + doSetProperty("hostnameVerification", hostnameVerification); + return this; + } + /** + * To enable/disable hostname verification on SSLEngine. + * + * The option will be converted to a <code>boolean</code> + * type. + * + * Default: false + * Group: common + * + * @param hostnameVerification the value to set + * @return the dsl builder + */ + default NettyHttpEndpointProducerBuilder hostnameVerification( + String hostnameVerification) { + doSetProperty("hostnameVerification", hostnameVerification); + return this; + } + /** * Setting to ensure socket is not closed due to inactivity. * * The option is a: <code>boolean</code> type. @@ -4146,6 +4212,39 @@ public interface NettyHttpEndpointBuilderFactory { return this; } /** + * To enable/disable hostname verification on SSLEngine. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: common + * + * @param hostnameVerification the value to set + * @return the dsl builder + */ + default NettyHttpEndpointBuilder hostnameVerification( + boolean hostnameVerification) { + doSetProperty("hostnameVerification", hostnameVerification); + return this; + } + /** + * To enable/disable hostname verification on SSLEngine. + * + * The option will be converted to a <code>boolean</code> + * type. + * + * Default: false + * Group: common + * + * @param hostnameVerification the value to set + * @return the dsl builder + */ + default NettyHttpEndpointBuilder hostnameVerification( + String hostnameVerification) { + doSetProperty("hostnameVerification", hostnameVerification); + return this; + } + /** * Setting to ensure socket is not closed due to inactivity. * * The option is a: <code>boolean</code> type. diff --git a/docs/components/modules/ROOT/pages/netty-http-component.adoc b/docs/components/modules/ROOT/pages/netty-http-component.adoc index 666b33c..ef7da9f 100644 --- a/docs/components/modules/ROOT/pages/netty-http-component.adoc +++ b/docs/components/modules/ROOT/pages/netty-http-component.adoc @@ -99,7 +99,7 @@ related to UDP transport. // component options: START -The Netty HTTP component supports 75 options, which are listed below. +The Netty HTTP component supports 76 options, which are listed below. @@ -108,6 +108,7 @@ The Netty HTTP component supports 75 options, which are listed below. | Name | Description | Default | Type | *configuration* (common) | To use the NettyConfiguration as configuration when creating endpoints. | | NettyConfiguration | *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean +| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean | *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean | *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean | *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...] @@ -215,7 +216,7 @@ with the following path and query parameters: |=== -=== Query Parameters (79 parameters): +=== Query Parameters (80 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -223,6 +224,7 @@ with the following path and query parameters: | Name | Description | Default | Type | *bridgeEndpoint* (common) | If the option is true, the producer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the throwExceptionOnFailure to be false to let the producer send all the fault response back. The consumer working in the bridge mode will skip the gzip compression and WWW URL form encoding (by adding the Exchange.SKIP_GZIP_ENCODING and Exchange.SKIP_WWW_FORM_URLENCODED headers to the consumed exchange). | false | boolean | *disconnect* (common) | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | false | boolean +| *hostnameVerification* (common) | To enable/disable hostname verification on SSLEngine | false | boolean | *keepAlive* (common) | Setting to ensure socket is not closed due to inactivity | true | boolean | *reuseAddress* (common) | Setting to facilitate socket multiplexing | true | boolean | *reuseChannel* (common) | This option allows producers and consumers (in client mode) to reuse the same Netty Channel for the lifecycle of processing the Exchange. This is useful if you need to call a server multiple times in a Camel route and want to use the same network connection. When using this, the channel is not returned to the connection pool until the Exchange is done; or disconnected if the disconnect option is set to true. The reused Channel is stored on the Exchange as an e [...]
