Hi

If you have the CiA1 or 2 book then the algorithm is covered there in
much details.

But you also provided a link to the docs that kinda explains it.
The bean has 1 public method so it will be used.


On Sat, Dec 7, 2019 at 1:21 PM Sreyan Chakravarty
<sreyan.mail...@gmail.com> wrote:
>
> I am just starting out with Camel and saw a good youtube video(
> https://youtu.be/91UiQgazt3g?t=1859) on it from where this example baffled
> me.
>
> Given the following Java Bean:
>
> @Singleton
> public class SomeBean {
>
>       private int counter;
>       public int someMethod() {
>       return "Hello" + ++counter;
>       }
> }
>
> I have seen camel code calling the method of the bean like following:
>
> from(inputEndpoint).
>        setHeader("Header", method(someBean)
>
>
> *Notice that the method is not specified yet Camel can make out what method
> to invoke. How does it do that ?*
>
> Which of the bean binding(
> https://camel.apache.org/manual/latest/bean-binding.html#BeanBinding-Choosingthemethodtoinvoke)
> r*ules does Camel use in this case ?*
>
>
> --
> Regards,
> Sreyan



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to