This is an automated email from the ASF dual-hosted git repository. nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers in repository https://gitbox.apache.org/repos/asf/camel.git
commit 94222bca9a4b170599e9fa78195bfce6d1e2ab87 Author: Nicolas Filotto <[email protected]> AuthorDate: Fri Apr 1 12:40:54 2022 +0200 CAMEL-17792: Add doc about the message headers of camel-netty --- .../resources/org/apache/camel/component/netty/netty.json | 13 +++++++++++++ components/camel-netty/src/main/docs/netty-component.adoc | 4 +++- .../org/apache/camel/component/netty/NettyConstants.java | 14 +++++++++++++- .../org/apache/camel/component/netty/NettyEndpoint.java | 2 +- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/components/camel-netty/src/generated/resources/org/apache/camel/component/netty/netty.json b/components/camel-netty/src/generated/resources/org/apache/camel/component/netty/netty.json index 4cbe2b2..519936f 100644 --- a/components/camel-netty/src/generated/resources/org/apache/camel/component/netty/netty.json +++ b/components/camel-netty/src/generated/resources/org/apache/camel/component/netty/netty.json @@ -96,6 +96,19 @@ "trustStoreResource": { "kind": "property", "displayName": "Trust Store Resource", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "Server side certificate keystore to be used for encryption. Is loaded by default from classpath, but you [...] "useGlobalSslContextParameters": { "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, + "headers": { + "CamelNettyCloseChannelWhenComplete": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Indicates whether the channel should be closed after complete." }, + "CamelNettyChannelHandlerContext": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "io.netty.channel.ChannelHandlerContext", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The channel handler context." }, + "CamelNettyRemoteAddress": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.net.SocketAddress", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The remote address." }, + "CamelNettyLocalAddress": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.net.SocketAddress", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The local address." }, + "CamelNettySSLSession": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "javax.net.ssl.SSLSession", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The SSL session." }, + "CamelNettySSLClientCertSubjectName": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The SSL client certificate subject name." }, + "CamelNettySSLClientCertIssuerName": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The SSL client certificate issuer name." }, + "CamelNettySSLClientCertSerialNumber": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The SSL client certificate serial number." }, + "CamelNettySSLClientCertNotBefore": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The SSL client certificate not before." }, + "CamelNettySSLClientCertNotAfter": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The SSL client certificate not after." }, + "CamelNettyRequestTimeout": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The read timeout." } + }, "properties": { "protocol": { "kind": "path", "displayName": "Protocol", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "enum": [ "tcp", "udp" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.netty.NettyConfiguration", "configurationField": "configuration", "description": "The protocol to use which can be tcp or udp." }, "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 [...] diff --git a/components/camel-netty/src/main/docs/netty-component.adoc b/components/camel-netty/src/main/docs/netty-component.adoc index 340c90b..aacaa9c 100644 --- a/components/camel-netty/src/main/docs/netty-component.adoc +++ b/components/camel-netty/src/main/docs/netty-component.adoc @@ -65,7 +65,9 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: START // endpoint options: END - +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END == Registry based Options diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConstants.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConstants.java index 68c8ded..bdd18bd 100644 --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConstants.java +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConstants.java @@ -16,22 +16,34 @@ */ package org.apache.camel.component.netty; +import org.apache.camel.spi.Metadata; + /** * Netty constants */ public final class NettyConstants { - + @Metadata(description = "Indicates whether the channel should be closed after complete.", javaType = "Boolean") public static final String NETTY_CLOSE_CHANNEL_WHEN_COMPLETE = "CamelNettyCloseChannelWhenComplete"; + @Metadata(description = "The channel handler context.", javaType = "io.netty.channel.ChannelHandlerContext") public static final String NETTY_CHANNEL_HANDLER_CONTEXT = "CamelNettyChannelHandlerContext"; public static final String NETTY_MESSAGE_EVENT = "CamelNettyMessageEvent"; + @Metadata(description = "The remote address.", javaType = "java.net.SocketAddress") public static final String NETTY_REMOTE_ADDRESS = "CamelNettyRemoteAddress"; + @Metadata(description = "The local address.", javaType = "java.net.SocketAddress") public static final String NETTY_LOCAL_ADDRESS = "CamelNettyLocalAddress"; + @Metadata(description = "The SSL session.", javaType = "javax.net.ssl.SSLSession") public static final String NETTY_SSL_SESSION = "CamelNettySSLSession"; + @Metadata(description = "The SSL client certificate subject name.", javaType = "String") public static final String NETTY_SSL_CLIENT_CERT_SUBJECT_NAME = "CamelNettySSLClientCertSubjectName"; + @Metadata(description = "The SSL client certificate issuer name.", javaType = "String") public static final String NETTY_SSL_CLIENT_CERT_ISSUER_NAME = "CamelNettySSLClientCertIssuerName"; + @Metadata(description = "The SSL client certificate serial number.", javaType = "String") public static final String NETTY_SSL_CLIENT_CERT_SERIAL_NO = "CamelNettySSLClientCertSerialNumber"; + @Metadata(description = "The SSL client certificate not before.", javaType = "java.util.Date") public static final String NETTY_SSL_CLIENT_CERT_NOT_BEFORE = "CamelNettySSLClientCertNotBefore"; + @Metadata(description = "The SSL client certificate not after.", javaType = "java.util.Date") public static final String NETTY_SSL_CLIENT_CERT_NOT_AFTER = "CamelNettySSLClientCertNotAfter"; + @Metadata(description = "The read timeout.", javaType = "Long") public static final String NETTY_REQUEST_TIMEOUT = "CamelNettyRequestTimeout"; public static final String NETTY_CHANNEL = "CamelNettyChannel"; public static final String NETTY_CLIENT_CONTINUE = "CamelClientContinue"; diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyEndpoint.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyEndpoint.java index 0b5163a..595290c 100644 --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyEndpoint.java +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyEndpoint.java @@ -42,7 +42,7 @@ import org.apache.camel.util.ObjectHelper; * Socket level networking using TCP or UDP with Netty 4.x. */ @UriEndpoint(firstVersion = "2.14.0", scheme = "netty", title = "Netty", syntax = "netty:protocol://host:port", - category = { Category.NETWORKING, Category.TCP, Category.UDP }) + category = { Category.NETWORKING, Category.TCP, Category.UDP }, headersClass = NettyConstants.class) public class NettyEndpoint extends DefaultEndpoint implements AsyncEndpoint { @UriParam private NettyConfiguration configuration;
