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 a0e971515c45d74b0a8b7ca429c277ae84b29045 Author: Nicolas Filotto <[email protected]> AuthorDate: Wed Apr 6 16:34:28 2022 +0200 CAMEL-17792: Add doc about the message headers of camel-xmpp --- .../src/generated/resources/org/apache/camel/component/xmpp/xmpp.json | 3 +++ components/camel-xmpp/src/main/docs/xmpp-component.adoc | 4 +++- .../src/main/java/org/apache/camel/component/xmpp/XmppConstants.java | 3 +++ .../src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/components/camel-xmpp/src/generated/resources/org/apache/camel/component/xmpp/xmpp.json b/components/camel-xmpp/src/generated/resources/org/apache/camel/component/xmpp/xmpp.json index d00b5bbaa85..f86e8abdad3 100644 --- a/components/camel-xmpp/src/generated/resources/org/apache/camel/component/xmpp/xmpp.json +++ b/components/camel-xmpp/src/generated/resources/org/apache/camel/component/xmpp/xmpp.json @@ -27,6 +27,9 @@ "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...] "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...] }, + "headers": { + "CamelXmppDoc": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.jivesoftware.smack.packet.Message", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The XMPP message" } + }, "properties": { "host": { "kind": "path", "displayName": "Host", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Hostname for the chat server" }, "port": { "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": true, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Port number for the chat server" }, diff --git a/components/camel-xmpp/src/main/docs/xmpp-component.adoc b/components/camel-xmpp/src/main/docs/xmpp-component.adoc index a531fc4a328..9a0f03df26a 100644 --- a/components/camel-xmpp/src/main/docs/xmpp-component.adoc +++ b/components/camel-xmpp/src/main/docs/xmpp-component.adoc @@ -55,7 +55,9 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END - +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END == Headers and setting Subject or Language diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConstants.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConstants.java index 28e365751fe..99e86f515a5 100644 --- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConstants.java +++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConstants.java @@ -16,6 +16,8 @@ */ package org.apache.camel.component.xmpp; +import org.apache.camel.spi.Metadata; + /** * Constants used in Camel XMPP module */ @@ -33,5 +35,6 @@ public interface XmppConstants { String STANZA_ID = "CamelXmppStanzaID"; String TO = "CamelXmppTo"; + @Metadata(label = "consumer", description = "The XMPP message", javaType = "org.jivesoftware.smack.packet.Message") String DOC_HEADER = "CamelXmppDoc"; } diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java index ab189feac90..2acb8b8f387 100644 --- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java +++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java @@ -58,7 +58,7 @@ import org.slf4j.LoggerFactory; */ @UriEndpoint(firstVersion = "1.0", scheme = "xmpp", title = "XMPP", syntax = "xmpp:host:port/participant", alternativeSyntax = "xmpp:user:password@host:port/participant", - category = { Category.CHAT, Category.MESSAGING }) + category = { Category.CHAT, Category.MESSAGING }, headersClass = XmppConstants.class) public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrategyAware { private static final Logger LOG = LoggerFactory.getLogger(XmppEndpoint.class);
