camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Possible to evaulate a expression without exchange?
Date Mon, 24 Dec 2012 07:38:09 GMT
On Mon, Dec 24, 2012 at 5:45 AM, orz <vlazyguy@gmail.com> wrote:
> Hi,
>
> Basically I just want to retrieve the property value during runtime.
>

You can use the API on CamelContext, there is a
resolvePropertyPlaceholders method.
Thought it returns the value as a String, which you would need to
convert to an int afterwards

String val = camelContext.resolvePropertyPlaceholders("{{number}}");



> E.g.
> int number = SimpleBuilder.simple("${properties:number}").evaluate(exchange,
> Integer.class);
>
> Is there a way for me to do so without the presence of exchange?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Possible-to-evaulate-a-expression-without-exchange-tp5724570.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message