Hi

Hadrian got the great idea (IMHO) to suggest that Exchange is final,
so we only have DefaultExchange as the implementation.

The ticket to track this is:
http://issues.apache.org/activemq/browse/CAMEL-1078

Even with James comment on the ticket I do feel that we should not
allow custom Exchange implementation.
The type safe getters for those specialized types can be added as the
same way we do type safe headers.

If we could come up with a good name:
MySpecialObject foo =
exchange.getSpecializedType(com.mycompany.MySpecialObject);

But maybe we really dont need this as they can be part of the Message instead.
And of course we can have custom org.apache.Message types for eg JMS,
File, CXF, and whatnot.

What we can do is to see how far we can get and refactor and remove
the custom Exchange we have in the Camel codebase.
If possible there might be 1 or 2 custom types that need a bit more
work to get it as DefaultExchange.

And at that time we can check whether its possible to make Exchange
final, and thus have paved the road for further optimizations in
Camel.

Any thoughts?




-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to