2009/7/8 Gert Vanthienen <[email protected]>:
> L.S.,
>
> I wonder if we should not make this a bit more pluggable.  It might
> make sense to be able to represent the same xxxDefinition in Groovy
> DSL, Java DSL, XML, Scala, ... so people can see the same route
> definition in multiple languages.  Perhaps we can (ab)use the type
> converter thing for this, converting an xxxDefinition instance to a
> GroovyRenderer or something...

Yeah; maybe we should have a pluggable RouteMarshaller which (rather
like Language/Expression & most other things) we can have multiple
implementations (XML, Java, Scala, Groovy etc) and folks can switch
between them at runtime.

something vaguely like

interface RouteMarshaller {
  marshal(RoutesDefinition routes, OutputStream out);
  RoutesDefinition unmarshal(InputStream in);
}

Then we can just create concrete implementations for the various DSLs.
(The Java one BTW could maybe just reuse something like BeanShell
maybe?). The XML one is kinda trivial, its just JAXB stuff

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Reply via email to