You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/03/02 07:26:03 UTC
[camel] 04/04: Added SetBody EIP docs
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 b31d260c683808733816ea25477d2808b74f26c4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 2 08:25:40 2018 +0100
Added SetBody EIP docs
---
camel-core/src/main/docs/eips/setBody-eip.adoc | 37 ++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/camel-core/src/main/docs/eips/setBody-eip.adoc b/camel-core/src/main/docs/eips/setBody-eip.adoc
new file mode 100644
index 0000000..a0734ca
--- /dev/null
+++ b/camel-core/src/main/docs/eips/setBody-eip.adoc
@@ -0,0 +1,37 @@
+== Set Body EIP
+
+The SetBody EIP allows you to set the body of your exchange.
+
+=== Options
+
+// eip options: START
+The Set Body EIP has no options.
+// eip options: END
+
+=== Examples
+
+The following example shows how to use the SetBody EIP
+
+[source,java]
+----
+RouteBuilder builder = new RouteBuilder() {
+ public void configure() {
+ from("direct:a")
+ .setBody(constant("test"))
+ .to("direct:b");
+ }
+};
+----
+
+
+And the same example using XML:
+
+[source,xml]
+----
+<camelContext xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <from uri="direct:a"/>
+ <setBody><constant>test</constant></setBody>
+ </route>
+</camelContext>
+----
--
To stop receiving notification emails like this one, please contact
acosentino@apache.org.