[jdom-interest] RE: Adding a DocumentListener interface

Joseph Bowbeer jozart at csi.com
Tue Jul 25 14:26:12 PDT 2000


> However, couldn't adding a listener
> help with some other burning issues?
> If either a Vetoable change listener or
> JDOM specific variant were defined
> you could do things like ...
>

In my opinion, vetoable change listeners are tricky to use, which
is why, I suspect, I hardly ever see them used in the real world.

The vetoable change listener semantics are also a bit loose. If
you go this route, check out VetoableChangeMulticaster in Doug
Lea's util.concurrent package

http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurre
nt/

By the way, I think two kinds of listeners would be needed: (1) a
document listener to listen to document-level changes such as
setRootElement, and (2) an element listener to listen for changes
to attributes and content.

All in all, I think this is a big design effort.  What's the
benefit?

--
Joe Bowbeer






More information about the jdom-interest mailing list