I was reading
Agile Software Development and there was a bit on the observer
pattern. For this bit he was discussing C++, but I wasn't paying much attention to that fact. He had made the "subject" an abstract class. I thought this was rather odd in that I would normally make this an interface. However, after I thought about it, an abstract class would have all the notification methods built right in so any users would not have to reimplement all the notificaiton methods. Plus, you can use multiple inheritance in C++, so you don't end up with the identity problem.
Is there any similar technique in
java that would allow me to capture all the notification methods in a single class? Delegation seems a likely choice and IIRC true delegation would not have the identity problem.
Just wondering if others are using a technique here, or reimplementing notification methods in each new observable they create.