Re: Annotation based DefaultProducer

2016-05-23 Thread Luca Burgazzoli
I definitively need to improve my class name generator skills :-) I'll go with: - BaseSelectorProducer (abstract) - HeaderSelectorProducer (implementation) Thx guys. --- Luca Burgazzoli On Mon, May 23, 2016 at 2:29 PM, Andrea Cosentino wrote: > IMO the solution with > > BaseSelectorProducer

Re: Annotation based DefaultProducer

2016-05-23 Thread Andrea Cosentino
IMO the solution with BaseSelectorProducer (abstract) HeaderSelectorProducer (implementation) . . . is the best one. -- Andrea Cosentino -- Apache Camel PMC Member Apache Karaf Committer Apache Servicemix Committer Email: ancosen1...@yahoo.com Twitter: @oscerd2 G

Re: Annotation based DefaultProducer

2016-05-23 Thread Claus Ibsen
On Mon, May 23, 2016 at 2:19 PM, Luca Burgazzoli wrote: > What would be a nice name for this new producer ? > Yeah naming ;) Brain storming SelectorProducer HeaderBasedSelectorProducer SwitchProducer SwitchByHeaderProducer We could also generalize it and have a base class and then a header b

Re: Annotation based DefaultProducer

2016-05-23 Thread Luca Burgazzoli
What would be a nice name for this new producer ? --- Luca Burgazzoli On Fri, May 13, 2016 at 2:21 PM, Luca Burgazzoli wrote: > Yep, Handler was added just as placeholder as you know, naming is hard :-) > Unless we want to use it also in bean binding, I think a new > annotation would be better

Re: Annotation based DefaultProducer

2016-05-13 Thread Luca Burgazzoli
Yep, Handler was added just as placeholder as you know, naming is hard :-) Unless we want to use it also in bean binding, I think a new annotation would be better to avoid confusion so I'd vote for @InvokeOnHeader --- Luca Burgazzoli On Fri, May 13, 2016 at 2:08 PM, Claus Ibsen wrote: > Hi > > Y

Re: Annotation based DefaultProducer

2016-05-13 Thread Claus Ibsen
Hi Yeah that can help with those kind of components. You may want to use a different name than @Handler as there is a @Handler already in org.apache.camel for bean binding. maybe @SwitchByHeader (if people really think of the java switch statement) or @InvokeFromHeader, @InvokeOnHeader or somethi

Annotation based DefaultProducer

2016-05-09 Thread Luca Burgazzoli
Hello, I'm working on some camel components (consul, ehcache, chronicle) and most of the time the process to write a Producer is: - extending DefaultProducer - write a - sometime big - switch/case to invoke the right method for an action So I'm wondering if it would make sense to have an annotat