I've been implementing my own Endpoint class from DefaultEndpoint and I've
been looking at other implementations, such as FileEndpoint to get an idea
of how things are done and I've noticed something that I would have assumed
to be a bad design decision. I don't really know any better so I'm just
asking this question to get a better understanding.

So using FileEndpoint as the example, the thing that jumped out at me was
that a FileEndpoint instance is passed to the FileConsumer constructor and
then used by reference inside FileConsumer. Wouldn't doing this result in an
incredibly tight coupling between these two instances such that if the
FileEndPoint instance changes it could adversely affect the FileConsumer
instance? Wouldn't it be better if FileConsumer copied all the values it
needed from FileEndpoint instead of using it by reference?

--
View this message in context: 
http://camel.465427.n5.nabble.com/Endpoint-and-Consumer-class-design-question-tp5429013p5429013.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to