camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <>
Subject [Discuss] How to create Exchanges?
Date Mon, 05 Sep 2011 13:04:10 GMT
Hi all,

I am currently trying to minimize the use of impl classes in components 
and check how to completely hide impl classes for 3.0.

So I will have to move several classes from impl to support as they are 
used as base classes anyway (e.g. DefaultEndpoint). A special case is 
DefaultExchange. It is not a base class, in fact it is the only 
implementation of Exchange.
So the big question is how do we want to handle exchange creation. There 
are two main solutions I can think of:

- Hide the implementation and offer factory methods on camelContext
- Move the implementation to support and so allow new DefaultExchange 
from any class

We also have factory methods for Exchange on Endpoint and 
DefaultEndpoint. The question is do we need these? DefaultEndpoint would 
not be able to hide the impl of DefaultExchange as it has to reside in 
support and is a base class. So if we want to hide DefaultExchange the 
factory impl must be in a real impl class like DefaultCamelContext.


Christian Schneider

Open Source Architect
Talend Application Integration Division

View raw message