Hello Claus, You asked for thoughts, so here they are ;)
What about totally different approach, that would be a pattern parameter instead of a method name. Especially that those methods differ only in pattern set on the exchange. In fact I believe the best approach would be to have sendMessage() method that has pattern as a parameter and is overloaded with versions for sending only body, only one header, and a map of headers. Why the method name has to show what parameters already clarify? Romek 2009/4/19 Claus Ibsen <[email protected]>: > Hi > > Actually I think the naming convention should be: > > send = for in only > sendWithHeader > sendWithHeaders > > sendAndReceive = for in out > sendAndReceiveWithHeader > sendAndReceiveWithHeaders > > Its more intuitive than currently > send = for in only > request = for in out > > However what about the "body" method we can do it like > > sendAndReceiveBody > sendAndReceiveBodyWithHeader > sendAndReceiveBodyWithHeaders > > or > > sendBodyAndReceiveWihHeader > sendBodyAndReceiveWithHeaders > > I prefer the former as its sending a body and receving a body. > > > Any thoughts on this, as we still have time to for this API change > before 2.0 is ready for release. > However the clock is ticking!!! > > > > > On Sat, Apr 4, 2009 at 9:20 AM, Claus Ibsen <[email protected]> wrote: >> On Sat, Apr 4, 2009 at 8:38 AM, Ryan Gardner <[email protected]> wrote: >>> The requestBody method makes sense (it requests a body) - but >>> "requestBodyAndHeader" and "requestBodyAndHeaders" etc methods make less >>> sense - because I'm only requesting one thing (the body). >>> >>> maybe "requestBodyWithHeader" makes more sense? for the "sendBodyAndHeader" >>> methods, it makes sense because you are sending two things (the body and the >>> header) >>> >>> although, perhaps I'm just going crazy? >> No it makes sense. You only get the body as reply. >> >> But to make it consistent the sendBodyAndHeader could also be named as >> sendBodyWithHeader. >> >>> >>> Ryan >>> >> >> >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Open Source Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> Apache Camel Reference Card: >> http://refcardz.dzone.com/refcardz/enterprise-integration >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > Apache Camel Reference Card: > http://refcardz.dzone.com/refcardz/enterprise-integration >
