Bean Component
The bean: component binds beans to Camel message exchanges.
URI format
Where someName can be any string which is used to lookup the bean in the Registry.
Using
Object instance that can receive invocations, must be explicitly registered with the PojoComponent.
Wiki Markup |
---|
{snippet:id=register|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java} |
Once an endpoint has been registered, you can build Camel routes that use it to process exchanges.
Wiki Markup |
---|
{snippet:id=route|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java} |
A pojo: endpoint cannot be defined as the input to the route. Consider using a direct: or queue: endpoint as the input for a PojoExchange. You can use the createProxy() methods on PojoComponent to create a proxy that will generate PojoExchanges and send them to any endpoint:
Wiki Markup |
---|
{snippet:id=invoke|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java} |
Include Page |
---|
| CAMEL:Bean Binding |
---|
| CAMEL:Bean Binding |
---|
|
Include Page |
---|
| CAMEL:Endpoint See Also |
---|
| CAMEL:Endpoint See Also |
---|
|
...