camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem jiang <>
Subject Re: Java DSL / GroovyExpression / Binding
Date Mon, 19 Aug 2013 06:33:48 GMT

You don't need to copy the class, you can just override the evaluate method to setup the binding
as you want.  

Willem Jiang

Red Hat, Inc.
Blog: ( (English)
 ( (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem

On Monday, August 19, 2013 at 12:47 PM, wrote:

> Hi all!
> Is there any chance to extend the binding of a GroovyExpression?
> Currently (in camel 2.11.1) the Groovy binding is defined on runtime based on the exchange
only and I did not find an extension point. My current solutions is to use a GroovyExpression2
class which is a copy of the original class and provided a new constructor method accepting
a Map<String,Object> parameter which is added to Binding. This allows me to add additional
parameters at time of route creation but I doubt this is the right way.  
> Due to the fact createBinding method is private and not protected I can not derive from
GroovyExpression and need to copy the class.  
> Thanks in advance
> Jens
> Von meinem iPad gesendet  

View raw message