concept bean method in category camel

appears as: be methods, be method
Camel in Action

This is an excerpt from Manning's book Camel in Action.

First you create an instance of SimpleRegistry and populate it with HelloBean under the helloBean name 1. Then, to use this registry with Camel, you pass the registry as a parameter to the DefaultCamelContext constructor 2. To aid when testing, you create ProducerTemplate, which makes it simple to send messages to Camel, as you can see in the test method. Finally, when the test is done, you clean up the resources by stopping ProducerTemplate and Camel 3. In the route, you use the bean method to invoke HelloBean by the helloBean name you gave it when it was enlisted in the registry 1.

Camel in Action

This is an excerpt from Manning's book Camel in Action.

When the compiler compiles this code, it can’t see that you want to invoke the echo method on the EchoBean. From the compiler’s point of view, EchoBean.class and "echo" are parameters to the bean method. All the compiler can check is that the EchoBean class exists; if you had misspelled the method name, perhaps typing "ekko", the compiler could not catch this mistake. The mistake would end up being caught at runtime, when the BeanProcessor would throw a MethodNotFoundException stating that the method named ekko does not exists.