camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject Idea - Chained Type Converters (using somekind of smart engine)
Date Sun, 12 Oct 2008 07:34:56 GMT
Hi

I have been wondering if it somehow would be possible to let Camel be very smart when it comes
to type converters. We have endpoints, components, etc. that expect and can only handle certain
types. So end-users get sometimes a issue that their payload type is not compatible.
https://issues.apache.org/activemq/browse/CAMEL-978

I was wondering if we could provide some kind of converter logic engine that could do chained
type converters (supporting only standard JDK types, so it's safe to convert a -> b ->
c, and not "loose" information) 

So for instance if you need a InputStream and there is already a type converter to String,
then the engine could do the last step

Type converter already in the component:
SomeType -> String

But we need an InputStream type. Then the engine could do the last converter ions as it's
a (String -> InputStream and both types are standard JDK types)

So the convertions would be:

SomeType -A-> String -B-> InputStream

Whereas A: is an existing type converter in the camel component (@Converter)
And B: is the new type converter engine.



Med venlig hilsen

Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk


Mime
View raw message