I think it could be very helpful to people implementing
DNS servers with this project if the Zone class were
split into an interface and an implementation (with all
of the other classes using the interface type of course).
(I've done this to my local copy of dnsjava in about 30
seconds using Eclipse without any problems.)
Logged In: YES
user_id=63197
This sounds like a good idea, but making Zone into an
interface could break existing code (although I'm not sure
how much existing code there is that uses Zones). I'd like
to see the changes as a patch, but I don't know if it could
be applied before a 2.1.0 release.
Logged In: YES
user_id=1307910
Right. I just made an interface named ZoneI withevery public
function from Zone, then replaced all inatances of Zone in
the DNSJava library with ZoneI.
This makes it source compatable, but not binary compatable,
with any existing code. It'd be cleaner to name the
interface Zone and the current Zone class like BasicZone or
whatever.
For a much smaller change to the software to make what I am
after possible I instead created a protected zero arg
constructor in Zone and reimplemented every single function.
This wastes a little memory on the instance variables in
Zone that I never use, but otherwise works fine. This
depends on the visibility of all the methods & members in
Zone being either PUBLIC, PROTECTED or PRIVATE, NO package
visability, as that would lead to things someone
reimplementing Zone from scratch could not replace.
Maybe that would be a better feature request.
Logged In: YES
user_id=1307910
Also, sorry I guess I submitted the original suggestion
anonymously. It was me.
Logged In: YES
user_id=1307910
Also SetResponse would need a bit of a change, just the
ability for a new Zone implementation to create and add
records to it. Making some methods protected instead of
package-only might be the smallest change to make this happen.
Ticket moved from /p/dnsjava/feature-requests/7/