On Thu, Jun 30, 2011 at 12:16 PM, <[email protected]> wrote: > Hi devs, > > does it make sense to extend the DSL with an additional from(...) method > that asserts the type of the in message body? This might also help with > the readability. > > for example, > from("direct:input", MyExpectedInput.class) > ...
No that does not make sense. There is a validate DSL you can use to assert the message body is a given type. http://camel.apache.org/validate from("direct:input") .validate(body().isInstanceOf(MyExpectedInput.class)) .to("xxxx") > > > Regards, > Mitko > > > > > InterComponentWare AG: > Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler > Aufsichtsratsvors.: Prof. Dr. Christof Hettich > Firmensitz: 69190 Walldorf, Altrottstraße 31 > AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516 -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
