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 fe3b96d0acfcc5daae7e74e8aec5a25b1b601ffc Author: Nicolas Filotto <[email protected]> AuthorDate: Thu Mar 31 15:17:36 2022 +0200 CAMEL-17792: Add doc about the message headers of camel-mina --- .../generated/resources/org/apache/camel/component/mina/mina.json | 6 ++++++ components/camel-mina/src/main/docs/mina-component.adoc | 3 +++ .../main/java/org/apache/camel/component/mina/MinaConstants.java | 6 ++++++ .../src/main/java/org/apache/camel/component/mina/MinaEndpoint.java | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/components/camel-mina/src/generated/resources/org/apache/camel/component/mina/mina.json b/components/camel-mina/src/generated/resources/org/apache/camel/component/mina/mina.json index 93ea093..96ca2a4 100644 --- a/components/camel-mina/src/generated/resources/org/apache/camel/component/mina/mina.json +++ b/components/camel-mina/src/generated/resources/org/apache/camel/component/mina/mina.json @@ -51,6 +51,12 @@ "sslContextParameters": { "kind": "property", "displayName": "Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.mina.MinaConfiguration", "configurationField": "configuration", "description": "To configure SSL security." }, "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": { + "CamelMinaCloseSessionWhenComplete": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Indicates whether the session should be closed after complete" }, + "CamelMinaIoSession": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.apache.mina.core.session.IoSession", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "" }, + "CamelMinaLocalAddress": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "java.net.SocketAddress", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "" }, + "CamelMinaRemoteAddress": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "java.net.SocketAddress", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "" } + }, "properties": { "protocol": { "kind": "path", "displayName": "Protocol", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.mina.MinaConfiguration", "configurationField": "configuration", "description": "Protocol to use" }, "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.mina.MinaConfiguration", "configurationField": "configuration", "description": "Hostname to use. Use localhost or 0.0.0.0 for local server as consumer. For producer use the hostname or ip address of the remot [...] diff --git a/components/camel-mina/src/main/docs/mina-component.adoc b/components/camel-mina/src/main/docs/mina-component.adoc index a4ca920..95feb8a 100644 --- a/components/camel-mina/src/main/docs/mina-component.adoc +++ b/components/camel-mina/src/main/docs/mina-component.adoc @@ -80,6 +80,9 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END == Using a custom codec diff --git a/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConstants.java b/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConstants.java index 10073cc..4b32699 100644 --- a/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConstants.java +++ b/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConstants.java @@ -16,17 +16,23 @@ */ package org.apache.camel.component.mina; +import org.apache.camel.spi.Metadata; + /** * Mina constants */ public final class MinaConstants { + @Metadata(description = "Indicates whether the session should be closed after complete", javaType = "Boolean") public static final String MINA_CLOSE_SESSION_WHEN_COMPLETE = "CamelMinaCloseSessionWhenComplete"; /** The key of the IoSession which is stored in the message header */ + @Metadata(label = "consumer", javaType = "org.apache.mina.core.session.IoSession") public static final String MINA_IOSESSION = "CamelMinaIoSession"; /** The socket address of local machine that received the message. */ + @Metadata(label = "consumer", javaType = "java.net.SocketAddress") public static final String MINA_LOCAL_ADDRESS = "CamelMinaLocalAddress"; /** The socket address of the remote machine that send the message. */ + @Metadata(label = "consumer", javaType = "java.net.SocketAddress") public static final String MINA_REMOTE_ADDRESS = "CamelMinaRemoteAddress"; private MinaConstants() { diff --git a/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java b/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java index 416579a..33b2fda 100644 --- a/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java +++ b/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java @@ -31,7 +31,7 @@ import org.apache.camel.util.ObjectHelper; * Socket level networking using TCP or UDP with Apache Mina 2.x. */ @UriEndpoint(firstVersion = "2.10.0", scheme = "mina", title = "Mina", syntax = "mina:protocol:host:port", - category = { Category.NETWORKING, Category.TCP, Category.UDP }) + category = { Category.NETWORKING, Category.TCP, Category.UDP }, headersClass = MinaConstants.class) public class MinaEndpoint extends DefaultEndpoint implements MultipleConsumersSupport { @UriParam
