On Nov 7, 2007, at 1:55 AM, Curt Arnold wrote:
Okay, I'm about ready to fall over, but I looked at zeroconf and
see your motivation for moving the binding onto the main thread so
you continue the set up in
ZeroConfSocketHubAppender.activateOptions. However instead of
changing the behavior, I'd be more inclined to make a few changes
to SocketHubAppender to make it more amenable to extension but keep
the old behavior. I'd suggest:
Moving ServerMonitor out to a separate public class.
Move the self-start in ServerMonitor to SocketHubAppender.startServer.
Make SocketHubAppender.startServer protected and overload it in
ZeroConf.
Add a protected SocketHubAppender.stopServer and move the
ServerMonitor.stopMonitor code there.
I'd suggest that you not take code suggestions from me too seriously
this late at night. There is probably a cleaner way to be able to
provide a hook for the zeroconf registration code to run. Maybe
adding like adding
protected void socketBound(ServerSocket s) {
}
notification method to SocketHubAppender and then hook it at
ZeroConfSocketHubAppender to publish the address.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]