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 2017/04/08 08:58:34 UTC

[1/2] camel git commit: Filter EIP docs updated

Repository: camel
Updated Branches:
  refs/heads/master 8a086bb0b -> db7cd8e1d


Filter EIP docs updated


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8e8666ad
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8e8666ad
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8e8666ad

Branch: refs/heads/master
Commit: 8e8666ad95b03f2f9ea6d959c7d476517b6cbc75
Parents: 8a086bb
Author: Andrea Cosentino <an...@gmail.com>
Authored: Sat Apr 8 10:49:06 2017 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Sat Apr 8 10:49:06 2017 +0200

----------------------------------------------------------------------
 camel-core/src/main/docs/eips/filter-eip.adoc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8e8666ad/camel-core/src/main/docs/eips/filter-eip.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/eips/filter-eip.adoc b/camel-core/src/main/docs/eips/filter-eip.adoc
index fafc14c..282f63a 100644
--- a/camel-core/src/main/docs/eips/filter-eip.adoc
+++ b/camel-core/src/main/docs/eips/filter-eip.adoc
@@ -11,6 +11,13 @@ The following example shows how to create a Message Filter route
 consuming messages from an endpoint called *queue:a*, which if the
 link:predicate.html[Predicate] is true will be dispatched to *queue:b*
 
+### EIP options
+
+// eip options: START
+The Filter EIP supports 0 options which are listed below:
+// eip options: END
+
+
 *Using the link:fluent-builders.html[Fluent Builders]*
 
 [source,java]
@@ -120,4 +127,4 @@ link:getting-started.html[Getting Started], you may also find the
 link:architecture.html[Architecture] useful particularly the description
 of link:endpoint.html[Endpoint] and link:uris.html[URIs]. Then you could
 try out some of the link:examples.html[Examples] first before trying
-this pattern out.
\ No newline at end of file
+this pattern out.


[2/2] camel git commit: Added Bean EIP docs

Posted by ac...@apache.org.
Added Bean EIP docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/db7cd8e1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/db7cd8e1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/db7cd8e1

Branch: refs/heads/master
Commit: db7cd8e1d5dac044eb64d28a462a5dcd9e708248
Parents: 8e8666a
Author: Andrea Cosentino <an...@gmail.com>
Authored: Sat Apr 8 10:53:49 2017 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Sat Apr 8 10:53:49 2017 +0200

----------------------------------------------------------------------
 camel-core/src/main/docs/eips/bean-eip.adoc | 97 ++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/db7cd8e1/camel-core/src/main/docs/eips/bean-eip.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/eips/bean-eip.adoc b/camel-core/src/main/docs/eips/bean-eip.adoc
new file mode 100644
index 0000000..f981cd1
--- /dev/null
+++ b/camel-core/src/main/docs/eips/bean-eip.adoc
@@ -0,0 +1,97 @@
+## Bean EIP
+### Message Filter
+
+The *bean:* component binds beans to Camel message exchanges.
+
+### URI Format
+
+[source,java]
+---------------------
+bean:beanID[?options]
+---------------------
+
+Where *beanID* can be any string which is used to look up the bean in
+the link:registry.html[Registry]
+
+### EIP options
+
+// eip options: START
+The Bean EIP supports 5 options which are listed below:
+
+
+[width="100%",cols="3,1m,6",options="header"]
+|=======================================================================
+| Name | Java Type | Description
+| ref | String | Sets a reference to a bean to use
+| method | String | Sets the method name on the bean to use
+| beanType | String | Sets the Class of the bean
+| cache | Boolean | Caches the bean lookup to avoid lookup up bean on every usage.
+| multiParameterArray | Boolean | Whether the message body is an array type.
+|=======================================================================
+// eip options: END
+
+### Bean as endpoint
+
+Camel also supports invoking link:bean.html[Bean] as an Endpoint. In the
+route below:
+
+What happens is that when the exchange is routed to the `myBean` Camel
+will use the link:bean-binding.html[Bean Binding] to invoke the bean. +
+ The source for the bean is just a plain POJO:
+
+Camel will use link:bean-binding.html[Bean Binding] to invoke the
+`sayHello` method, by converting the Exchange's In body to the `String`
+type and storing the output of the method on the Exchange Out body.
+
+### Java DSL bean syntax
+
+Java DSL comes with syntactic sugar for the link:bean.html[Bean]
+component. Instead of specifying the bean explicitly as the endpoint
+(i.e. `to("bean:beanName")`) you can use the following syntax:
+
+[source,java]
+-------------------------------------------------------
+// Send message to the bean endpoint
+// and invoke method resolved using Bean Binding.
+from("direct:start").beanRef("beanName");
+
+// Send message to the bean endpoint
+// and invoke given method.
+from("direct:start").beanRef("beanName", "methodName");
+-------------------------------------------------------
+
+Instead of passing name of the reference to the bean (so that Camel will
+lookup for it in the registry), you can specify the bean itself:
+
+[source,java]
+---------------------------------------------------------------
+// Send message to the given bean instance.
+from("direct:start").bean(new ExampleBean());
+
+// Explicit selection of bean method to be invoked.
+from("direct:start").bean(new ExampleBean(), "methodName");
+
+// Camel will create the instance of bean and cache it for you.
+from("direct:start").bean(ExampleBean.class);
+---------------------------------------------------------------
+
+### Bean binding
+
+How bean methods to be invoked are chosen (if they are not specified
+explicitly through the *method* parameter) and how parameter values are
+constructed from the link:message.html[Message] are all defined by the
+link:bean-binding.html[Bean Binding] mechanism which is used throughout
+all of the various link:bean-integration.html[Bean Integration]
+mechanisms in Camel.
+
+### See also
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+
+* link:class.html[Class] component
+* link:bean-binding.html[Bean Binding]
+* link:bean-integration.html[Bean Integration]
+