Hi all,
  In our camel routes we sometimes set header values dynamically, by doing
something like the following:

.setHeader(SOME_HEADER_NAME).method(SomeClass.class,
SOME_METHOD_SIGNATURE_STRING)

Ideally, we'd like to able to validate that the method specified by the
signature SOME_METHOD_SIGNATURE_STRING actually exists on SomeClass.class
*before* the route tries to invoke it at runtime and we potentially get a
runtime exception.  ideally, this validation should happen at compile time
or at least on route initialization.  What's the current camel best practice
here to minimize possible runtime exceptions if the signature string is
incorrect?

I imagine somewhere internally camel is parsing SOME_METHOD_SIGNATURE_STRING
and using reflection to do the method lookup based on the signature.  Is
that something currently exposed by the api that we can leverage?  Is there
a better way to do this?  Thanks!

-e



--
View this message in context: 
http://camel.465427.n5.nabble.com/Best-practice-for-checking-method-exists-on-class-when-building-route-tp5746752.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to