On Thu, Mar 19, 2009 at 6:12 PM, Rafael Schloming <[email protected]> wrote:
> Robert Godfrey wrote: >> That is why I advocate an *interface* rather than casting into >> implementation classes. > > An interface if restricted to only permit features not accessible > through vanilla JMS would certainly help, but I still think casting as > part of the API unacceptably blurs the boundaries of the API. There is > no way to tell what types you're allowed to cast and which interfaces > you're allowed to cast it to. I've always hated that about Java. I'm pretty firm on the bondage-and-discipline side of the strong typing argument though, and I realise others mileage may vary. > access to the same broker extension. I would probably add an assertion > based on the destination, broker vendor/version, etc to verify that the > broker and recipient will understand what is being sent. I think if we implement non-standard features we should definitely do this. >> I understand that you have a pathalogical hatred of casts. The java >> syntax is certainly less than ideal. However where we are depending >> on AMQP specific behaviour it should be called out. > > It's not casts I dislike. It's casting as part of an API that I dislike > since it makes the API unnecessarily blurry. It's also quite trivial to > avoid assuming you don't have a pathological hatred of static methods. ;) are you talking about something like public static AMQDestination toAMQDestination(javax.jms.Destination dest) and that does the cast inside AMQDestination? >> Hopefully most AMQP/QPID extensions can be isolated in cofiguration >> rather than code... > > I think the destination abstraction is a reasonably useful way to do > this for most things. It gives us one mechanism that is mostly used via > configuration but can also be used through code as well with > createQueue(...) and friends. I'm a little confused, are we talking about client config or server config? - Aidan -- Apache Qpid - World Domination through Advanced Message Queueing http://qpid.apache.org --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
