Setting properties on the created instance - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

In the endpoint uri you can specify properties to set on the created instance, for example, if it has a setPrefix method:

from("direct:start")
   .to("class:org.apache.camel.component.bean.MyPrefixBean?prefix=Bye")
   .to("mock:result");

You can also use the # syntax to refer to properties to be looked up in the Registry .

from("direct:start")
   .to("class:org.apache.camel.component.bean.MyPrefixBean?cool=#foo")
   .to("mock:result");

This will lookup a bean from the Registry with the id foo and invoke the setCool method on the created instance of the MyPrefixBean class.

Note

See more details at the Camel Component: Bean component as the class component works in much the same way.