Repository: camel Updated Branches: refs/heads/master 271e03e33 -> e82f798b5
Added dataformat component docs to Gitbook Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e82f798b Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e82f798b Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e82f798b Branch: refs/heads/master Commit: e82f798b5e24d10e1b6979f41fa2edaf357af5a6 Parents: d241811 Author: Andrea Cosentino <[email protected]> Authored: Mon Jun 13 10:43:50 2016 +0200 Committer: Andrea Cosentino <[email protected]> Committed: Mon Jun 13 10:44:12 2016 +0200 ---------------------------------------------------------------------- camel-core/src/main/docs/dataformat.adoc | 88 +++++++++++++++++++++++++++ docs/user-manual/en/SUMMARY.md | 1 + 2 files changed, 89 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/e82f798b/camel-core/src/main/docs/dataformat.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/dataformat.adoc b/camel-core/src/main/docs/dataformat.adoc new file mode 100644 index 0000000..78f7048 --- /dev/null +++ b/camel-core/src/main/docs/dataformat.adoc @@ -0,0 +1,88 @@ +[[DataFormatComponent-DataFormatComponent]] +Data Format Component +~~~~~~~~~~~~~~~~~~~~~ + +*Available as of Camel 2.12* + +The *dataformat:* component allows to use link:data-format.html[Data +Format] as a Camel link:component.html[Component]. + +[[DataFormatComponent-URIformat]] +URI format +^^^^^^^^^^ + +[source,java] +--------------------------------------------- +dataformat:name:(marshal|unmarshal)[?options] +--------------------------------------------- + +Where *name* is the name of the link:data-format.html[Data Format]. And +then followed by the operation which must either be `marshal` or +`unmarshal`. The options is used for configuring the link:data-format.html[Data +Format] in use. See the link:data-format.html[Data Format] documentation +for which options it support. + +[[DataFormatComponent-Options]] +DataFormat Options +^^^^^^^^^^^^^^^^^^ + + +// component options: START +The Data Format component has no options. +// component options: END + + + +// endpoint options: START +The Data Format component supports 4 endpoint options which are listed below: + +{% raw %} +[width="100%",cols="2s,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| name | producer | | String | *Required* Name of data format +| operation | producer | | String | *Required* Operation to use either marshal or unmarshal +| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange. +| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). +|======================================================================= +{% endraw %} +// endpoint options: END + + +[[DataFormatComponent-Samples]] +Samples +^^^^^^^ + +For example to use the link:jaxb.html[JAXB] link:data-format.html[Data +Format] we can do as follows: + +[source,java] +------------------------------------------------------------- +from("activemq:My.Queue"). + to("dataformat:jaxb:unmarshal?contextPath=com.acme.model"). + to("mqseries:Another.Queue"); +------------------------------------------------------------- + +And in XML DSL you do: + +[source,xml] +----------------------------------------------------------------------- +<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> + <route> + <from uri="activemq:My.Queue"/> + <to uri="dataformat:jaxb:unmarshal?contextPath=com.acme.model"/> + <to uri="mqseries:Another.Queue"/> + </route> +</camelContext> +----------------------------------------------------------------------- + +[[DataFormatComponent-SeeAlso]] +See Also +^^^^^^^^ + +* link:configuring-camel.html[Configuring Camel] +* link:component.html[Component] +* link:endpoint.html[Endpoint] +* link:getting-started.html[Getting Started] +* link:data-format.html[Data Format] + http://git-wip-us.apache.org/repos/asf/camel/blob/e82f798b/docs/user-manual/en/SUMMARY.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md index 3b40998..b2a9bb4 100644 --- a/docs/user-manual/en/SUMMARY.md +++ b/docs/user-manual/en/SUMMARY.md @@ -79,6 +79,7 @@ * [Browse](browse.adoc) * [Class](class.adoc) * [Controlbus](controlbus.adoc) + * [Dataformat](dataformat.adoc) * [Mock](mock.adoc) * [Properties](properties.adoc)
